-
Notifications
You must be signed in to change notification settings - Fork 102
Fix indices/ validation errors #4018
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Following you can find the validation results for the APIs you have changed.
You can validate these APIs yourself by using the |
query_parameters: { | ||
/** | ||
* Index used to derive the analyzer. | ||
* If specified, the `analyzer` or field parameter overrides this value. | ||
* If no index is specified or the index does not have a default analyzer, the analyze API uses the standard analyzer. | ||
* @doc_id analysis-standard-analyzer | ||
*/ | ||
index?: IndexName | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This index parameter is read in https://github.com/elastic/elasticsearch/blob/d9e751602dc4a874ef381797844f80044889fbef/server/src/main/java/org/elasticsearch/rest/action/admin/indices/RestAnalyzeAction.java#L49 and has been there at least since 7.3.
/** | ||
* Comma-separated list of data streams, indices, and aliases used to limit the request. | ||
* Supports wildcards (`*`). | ||
* To target all data streams and indices, omit this parameter or use `*` or `_all`. | ||
*/ | ||
index?: Indices |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The index parameter is read in https://github.com/elastic/elasticsearch/blob/d9e751602dc4a874ef381797844f80044889fbef/server/src/main/java/org/elasticsearch/rest/action/admin/indices/RestClearIndicesCacheAction.java#L43 and has been there since at least 5.0.
/** | ||
* If true, the request retrieves information from the local node only. Defaults to false, which means information is retrieved from the master node. | ||
* @server_default false | ||
*/ | ||
local?: boolean | ||
/** | ||
* If true, returns settings in flat format. | ||
* @server_default false | ||
*/ | ||
flat_settings?: boolean |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't know where those settings are read, but can confirm that they are accepted by the API. It's a bit weird because they don't have any practical effect, but that's how HEAD works and the symmetry with the get_index_template
API can be useful.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
somewhere here I suspect. and yes it's exactly the same API so let's keep them in sync
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ah here's local
/** | ||
* The number of shard copies that must be active before proceeding with the operation. | ||
* Set to all or any positive integer up to the total number of shards in the index (`number_of_replicas+1`). | ||
* @server_default 1 | ||
*/ | ||
wait_for_active_shards?: WaitForActiveShards |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This parameter is not read in https://github.com/elastic/elasticsearch/blob/d9e751602dc4a874ef381797844f80044889fbef/server/src/main/java/org/elasticsearch/rest/action/admin/indices/RestFieldUsageStatsAction.java#L41-L52 - I also checked that it was not accepted in practice.
/** | ||
* Whether to close and reopen the index to apply non-dynamic settings. | ||
* If set to `true` the indices to which the settings are being applied | ||
* will be closed temporarily and then reopened in order to apply the changes. | ||
* @server_default false | ||
*/ | ||
reopen?: boolean |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
/** | ||
* Changed resource to reload analyzers from if applicable | ||
*/ | ||
resource?: string |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
/** | ||
* If set to true, the rollover action will only mark a data stream to signal that it needs to be rolled over at the next write. | ||
* Only allowed on data streams. | ||
* @server_default false | ||
*/ | ||
lazy?: boolean |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
/** | ||
* Whether the index template we optionally defined in the body should only be dry-run added if new or can also replace an existing one | ||
* @server_default false | ||
*/ | ||
create?: boolean | ||
/** User defined reason for dry-run creating the new template for simulation purposes | ||
* @server_default false | ||
*/ | ||
cause?: string |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
/** | ||
* User defined reason for dry-run creating the new template for simulation purposes | ||
*/ | ||
cause?: string |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
"indices.put_template": { | ||
"request": [ | ||
"Request: query parameter 'cause' does not exist in the json spec" | ||
], | ||
"response": [] | ||
}, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Opened elastic/elasticsearch#125189
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, thanks for thoroughly checking all of these!
The backport to
To backport manually, run these commands in your terminal: # Fetch latest updates from GitHub
git fetch
# Create a new working tree
git worktree add .worktrees/backport-8.x 8.x
# Navigate to the new working tree
cd .worktrees/backport-8.x
# Create a new branch
git switch --create backport-4018-to-8.x
# Cherry-pick the merged commit of this pull request and resolve the conflicts
git cherry-pick -x --mainline 1 10af925072a632ec236ef50dc72a0c039314db2a
# Push it to GitHub
git push --set-upstream origin backport-4018-to-8.x
# Go back to the original working tree
cd ../..
# Delete the working tree
git worktree remove .worktrees/backport-8.x Then, create a pull request where the |
The backport to
To backport manually, run these commands in your terminal: # Fetch latest updates from GitHub
git fetch
# Create a new working tree
git worktree add .worktrees/backport-8.17 8.17
# Navigate to the new working tree
cd .worktrees/backport-8.17
# Create a new branch
git switch --create backport-4018-to-8.17
# Cherry-pick the merged commit of this pull request and resolve the conflicts
git cherry-pick -x --mainline 1 10af925072a632ec236ef50dc72a0c039314db2a
# Push it to GitHub
git push --set-upstream origin backport-4018-to-8.17
# Go back to the original working tree
cd ../..
# Delete the working tree
git worktree remove .worktrees/backport-8.17 Then, create a pull request where the |
The backport to
To backport manually, run these commands in your terminal: # Fetch latest updates from GitHub
git fetch
# Create a new working tree
git worktree add .worktrees/backport-8.18 8.18
# Navigate to the new working tree
cd .worktrees/backport-8.18
# Create a new branch
git switch --create backport-4018-to-8.18
# Cherry-pick the merged commit of this pull request and resolve the conflicts
git cherry-pick -x --mainline 1 10af925072a632ec236ef50dc72a0c039314db2a
# Push it to GitHub
git push --set-upstream origin backport-4018-to-8.18
# Go back to the original working tree
cd ../..
# Delete the working tree
git worktree remove .worktrees/backport-8.18 Then, create a pull request where the |
(cherry picked from commit 10af925)
(cherry picked from commit 10af925) # Conflicts: # output/openapi/elasticsearch-serverless-openapi.json # output/schema/validation-errors.json
(cherry picked from commit 10af925) # Conflicts: # output/openapi/elasticsearch-serverless-openapi.json # output/schema/validation-errors.json
💔 Some backports could not be created
Manual backportTo create the backport manually run:
Questions ?Please refer to the Backport tool documentation |
The remaining
indices.put_template
error is on the rest-api-spec side.