Repository navigation
SOLR-17731: Fix shadowed v2 alias and snapshot APIs - #5353
Conversation
…e the same structure as the detail. Nice bit of clean up!
|
Automated PR readiness judgements (LLM-generated; may be wrong; not updated on later pushes).
|
…nvetions. Adn fix shadowing bug.
|
@jaykay12 woudn't mind a review of these changes.... I suspect there are other older v2 apis that don't do the list versus detail view properly ;-( |
| } | ||
|
|
||
| @Test | ||
| public void testDeleteMissingSnapshot() throws Exception { |
There was a problem hiding this comment.
🤖 AI text below 🤖
Should deleting a missing snapshot remain a no-op for the CLI? It succeeded idempotently on v1. After this change the v2 404 prints “Failed,” but the command still exits 0. This test explicitly enforces both because run() requires exit 0. I’d preserve the CLI’s no-op for an already absent snapshot. If we want to make it a CLI error instead, the test should require a nonzero exit status.
| } | ||
|
|
||
| @Test | ||
| public void testCreateListAndDeleteSnapshot() throws Exception { |
There was a problem hiding this comment.
🤖 AI text below 🤖
Could we keep an async-create assertion in the new HTTP tests? The removed unit test checked that the body’s async ID reached the collection command; the replacement cases all submit synchronously. A generated-client test could assert the returned request ID, wait for terminal success via REQUESTSTATUS, and then check that the snapshot appears in the listing.
https://issues.apache.org/jira/browse/SOLR-17731
Description
The DELETE resource paths shadow
GET /api/aliases/{aliasName}andPOST /api/collections/{collName}/snapshots/{snapshotName}, causing valid requests to return HTTP 405. This PR restores both routes and brings the alias and collection snapshot APIs into line with the v2 conventions.Solution
GetAliasByNameResponsefor each entry in the v2 alias listing. Entries now containname, acollectionsarray, andproperties, matching the detail response. Update the Admin UI to consume this structure and preserve the v1LISTALIASESresponse format.bin/solr snapshot create,delete,list, anddescribeto the generated v2 clients. Use typed metadata directly when describing a snapshot, removing the legacy response parsing.Implementation and test development assisted by Claude and Codex.
Tests
Validation performed during development:
AdminUiCollectionsScreenTest: 7 passing Selenium tests, including alias collections and properties../gradlew tidy./gradlew check -x test./gradlew :solr:packaging:devFullThe snapshot BATS suite has not been run.