feat(api): indices as alias for indexes - #6747
Conversation
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 15f6378d52
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| pub use self::split_resource::{ListSplitsQueryParams, ListSplitsResponse}; | ||
|
|
||
| fn indexes_path_segment() -> impl Filter<Extract = (), Error = Rejection> + Clone { | ||
| warp::path("indexes").or(warp::path("indices")).unify() |
There was a problem hiding this comment.
Preserve delete-task routes for an index named indices
When an existing index ID is literally indices—which is permitted by validate_identifier—GET or POST /api/v1/indices/delete-tasks no longer reaches the /{index_id}/delete-tasks handlers. This new prefix consumes indices as the collection alias: GET is interpreted as a metadata lookup for an index named delete-tasks, while POST is handled by the index-management recovery path; api_v1_routes mounts that recovered filter before delete_task_api_handlers. Route the generic delete-task endpoint before this alias or otherwise disambiguate this valid index ID.
Useful? React with 👍 / 👎.
There was a problem hiding this comment.
@codex correct but this also seems to be true for "indexes" as well so its not a new issue ?
There was a problem hiding this comment.
To use Codex here, create an environment for this repo.
Resolves #3540
Description
Adds indices as an alias for indexes across all index management REST API routes, including index, split, source, and source-shard endpoints. indexes remains the canonical spelling in OpenAPI and documentation examples.
The alias uses a shared path-segment filter, avoiding duplicated handlers or business logic. A redirect was not used because these routes include methods such as POST, PUT, and DELETE with request bodies; redirect handling may not
reliably preserve the method and body across clients and would add an unnecessary round trip.
The REST API documentation was updated accordingly.
How was this PR tested?