serhiy-bzhezytskyy opened a new issue, #70:
URL: https://github.com/apache/solr-orbit/issues/70
### Describe the bug
`builder.cluster_distribution_version` is documented as "Attempt to get the
cluster's distribution
version", but for a Solr cluster it returns a hardcoded string and never
asks the cluster anything
(`solrorbit/builder/builder.py:272`):
```python
client_instance = client_factory(hosts, client_options).create()
if isinstance(client_instance, client.SolrClient):
return "9.10.1"
return None
```
It creates a client and then ignores it. Every externally provisioned run
that does not pass
`--distribution-version` is therefore told the cluster is 9.10.1, whatever
it actually is.
This is not cosmetic, because that number selects the **workload branch**.
`WorkloadRepository.update`
calls `versions.best_match` on it (`solrorbit/utils/repo.py:71`), and:
```
versions.best_match(["main", "9", "10"], "9.10.1") -> '9'
versions.best_match(["main", "9", "10"], "10.0.0") -> '10'
```
`CONTRIBUTING.md` in `solr-orbit-workloads` documents this as the intended
behaviour — *"solr-orbit
automatically selects the workload branch that matches the Solr major
version being tested"* — so once a
`10` branch exists there, a Solr 10 cluster will be benchmarked with the
Solr 9 workloads and nothing
will say so.
The `minimum_solr_version` guard immediately after is also inert for the
same reason: it compares a
constant against a constant, so it can neither pass nor fail on the basis of
the real cluster.
### To reproduce
Against an unmodified `solr:latest` container:
```
$ curl -s 'http://localhost:8983/solr/admin/info/system?wt=json' | grep
solr-spec
"solr-spec-version":"10.0.0",
$ solr-orbit run --pipeline=benchmark-only --target-host=localhost:8983 \
--workload-path=<a workload> --test-mode
...
[INFO] Automatically derived distribution version [9.10.1]
```
The run then proceeds and succeeds, so nothing surfaces the mismatch.
### Expected behavior
Read the version from the cluster — `GET /solr/admin/info/system` returns it
as
`lucene.solr-spec-version` — and use that. If it cannot be read, say so
rather than substituting a
constant, since the value decides which workloads are run.
### Host / Environment
Solr 10.0.0 (`solr:latest`, `solr-impl 10.0.0 6c6c48a6f78`, Lucene 10.3.2),
macOS 15 arm64, Python 3.12,
solr-orbit at `81bbcab5`.
### Additional context
Found while collecting evidence for #68: I quoted the log line as the engine
version in a workload
report, and it disagreed with the cluster.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]