janhoy opened a new pull request, #112:
URL: https://github.com/apache/solr-orbit/pull/112
Fixes #111.
`create_collection` posts the collection's properties as the request body,
which is the shape Solr takes after its V2 API rework. Before it, Solr takes a
command envelope and says so exactly:
```
Unknown operation 'name' available ops are
'[set-alias-property, delete-alias, backup-collection, create, create-alias,
restore-collection]'
```
`create` is in that list. So: send the current shape, and retry with
`{"create": {...}}` when Solr answers that it wanted one.
Asking `get_version()` instead would mean keeping a table of which release
changed the API and being wrong about a release nobody tested. Letting Solr say
so costs one extra request, once, and only on the clusters that need it. Every
other 400 still surfaces as the failure it is — "already exists" must not turn
into a retry.
**Verified against real containers**, not mocks: created and deleted a
collection on Solr 9.0.0, which takes the retry, and on 9.9.0, which does not.
Three unit tests cover both shapes and the unrelated-400 case.
This fixes the first task a run hits. Later tasks against old releases may
surface their own incompatibilities; those will name their endpoint the same
way.
🤖 Assisted by Claude Code
--
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]