| Age | Commit message (Collapse) | Author |
|
The class docblock still described the engine as abstract, from
before commit 011eec1 reverted 'abstract class' to plain 'class'.
Updated wording to accurately describe the concrete engine and the
test-double's role.
π€ Generated by [robots](https://vyos.io)
|
|
A recent fixup cascade declared VyOSElasticModernFulltextStorageEngine
as 'abstract class' to enable test-doubling subclasses
(VyOSElasticModernHostTestEngine, VyOSElasticModernFulltextStorageEngineTestDouble).
That change broke production dispatch: Phorge's PhutilClassMapQuery
selects engines via PhutilSymbolLoader::loadObjects(), which calls
setConcreteOnly(true) and unsets any class where reflection reports
isAbstract(). The engine class would no longer be discoverable by
cluster.search[].type:elasticsearch-modern, and the test-fixture
subclasses live in src/__tests__/ which libphutil excludes from
runtime class-map loading.
Revert to plain 'class' (not 'final', not 'abstract'). Plain
'class' is discoverable by PhutilClassMapQuery; existing test
fixtures keep working without rewrite; operators can subclass if
they need to (harmless).
Also update VyOSElasticModernHostTestCase::testPlaceholderEngineIsAbstract
β testEngineIsConcreteForDispatch, inverting the assertion to document
the correct invariant and its rationale (setConcreteOnly reference).
All 22 tests pass.
π€ Generated by [robots](https://vyos.io)
|
|
1. TestDouble signatures: indexExists() and getIndexStats() in
VyOSElasticModernFulltextStorageEngineTestDouble were missing the
nullable host parameter added in E7/E8, causing a PHP fatal on
'arc unit --everything'.
2. buildSpec() zero-query sort bug: the falsy check
(!$query->getParameter('query')) incorrectly treats the string '0'
as empty (PHP falsy), enabling date-sorted path for a real search
term. Changed to explicit null/empty-string checks to match the
existing must-clause guard on line 316.
All 22 unit tests now pass.
π€ Generated by [robots](https://vyos.io)
|
|
1. strlen(\$query_string) β null-safe check
\$query->getParameter('query') may return null; strlen(null) is
deprecated in PHP 8.1+. Switch to explicit !== null && !== '' check.
2. ids.values nesting fix in buildSpec()
'values' => array(\$exclude) wraps an already-array \$exclude in a
nested array, producing invalid Elasticsearch ids syntax. Cast to
(array) then re-index with array_values() so both scalar PHID and
array-of-PHIDs produce a flat list.
3. initIndex() host consistency: pass write host to indexExists()
initIndex() called indexExists() without a host argument, which
fell back to the read host, then deleted via getHostForWrite().
A read/write split lag window could cause false-positive
"index doesn't exist" results. Pass the already-resolved write host.
4. getIndexStats() unchecked array access
\$res['indices'][\$this->index] was accessed without verifying the
key exists. If the index was just deleted or the name drifted, this
throws an undefined-offset PHP notice. Add an explicit isset() guard
with a clear exception message naming the index.
π€ Generated by [robots](https://vyos.io)
|
|
in tests
- str_replace('/', '', \$index) β trim(\$index, '/') to preserve internal
slashes in multi-segment index paths (e.g. 'phabricator/prod' must
stay intact; only leading/trailing slashes are stripped).
- Add empty-string guard: after trim, throw a clear exception if the
result is '' so misconfigured paths fail loudly at setService() rather
than silently at query time with a confusing endpoint URL.
- Replace direct new VyOSElasticModernFulltextStorageEngine() in the
four new test methods with \$this->newEngine() to avoid PHP fatal on
abstract class instantiation.
π€ Generated by [robots](https://vyos.io)
|
|
tests
π€ Generated by [robots](https://vyos.io)
|
|
body/comment/projectPHID
π€ Generated by [robots](https://vyos.io)
|
|
Single 'properties' block, documentType as a keyword field inside it,
no include_in_all anywhere (the field was removed in ES 6).
Relationships emit as keyword fields with doc_values: false, matching
the bundled engine's ES-5-mode behavior. Field-data multi-analyzer
shape (raw, keywords, stems) preserved.
π€ Generated by [robots](https://vyos.io)
|
|
π€ Generated by [robots](https://vyos.io)
|
|
π€ Generated by [robots](https://vyos.io)
|
|
π€ Generated by [robots](https://vyos.io)
|
|
π€ Generated by [robots](https://vyos.io)
|
|
π€ Generated by [robots](https://vyos.io)
|
|
π€ Generated by [robots](https://vyos.io)
|
|
TestDouble in tests
π€ Generated by [robots](https://vyos.io)
|
|
Engine accepts only versions 7 and above (covering ES 7.x, 8.x, and
OpenSearch 1.x/2.x/3.x via the typeless API). Anything below 7
raises with a clear message pointing at the bundled engine for ES 5
users.
π€ Generated by [robots](https://vyos.io)
|
|
|
|
- Engine class marked final (matches host class declaration; no
design intent to subclass).
- testConfigOverrides now also asserts host and port (these were
the most-likely-to-be-misconfigured fields; previously set but
unverified).
π€ Generated by [robots](https://vyos.io)
|
|
Host class mirrors PhabricatorElasticsearchHost's surface. Engine is
a stub providing only getEngineIdentifier() and getHostType() so the
host's tests can construct an engine instance; real engine
implementation lands in subsequent commits. All six abstract methods
of PhabricatorFulltextStorageEngine are implemented (four as throwing
stubs to be replaced in E7/E8).
.arcconfig gains "src/" in the load list so arc unit can discover the
extension library; test case extends PhutilTestCase (no DB needed for
pure-PHP host property assertions).
π€ Generated by [robots](https://vyos.io)
|