-
Notifications
You must be signed in to change notification settings - Fork 24.9k
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
Deprecate the 'local' parameter of /_cat/indices
#62198
Conversation
Pinging @elastic/es-core-features (:Core/Features/CAT APIs) |
@elasticmachine ok to test |
@elasticmachine update branch |
user doesn't have permission to update head repository |
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.
@boicehuang, thanks for addressing this issue. I think we can get this merged with a couple minor changes as noted below.
docs/reference/cat/indices.asciidoc
Outdated
+ | ||
-- | ||
`local`:: | ||
(Optional, boolean) If true, the request retrieves information from the local node | ||
only. Defaults to false, which means information is retrieved from the master node. | ||
deprecated::[8.0,This parameter does not cause this API to act locally. It will be | ||
removed in version 8.0.] | ||
-- |
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 creates two entries for the local
parameter, one pulled from the common-parms
file and this one. I'll solicit some input from our documentation writers on how best to handle this.
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.
@jrodewig, do you have any suggestions on how to handle this documentation case where a parameter pulled in from a common file needs to be marked as deprecated on a specific API?
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 left a suggestion here: #62198 (comment)
static final String LOCAL_DEPRECATED_MESSAGE = "Deprecated parameter [local] used. This parameter does not cause this API to act " + | ||
"locally, and should not be used. It will be unsupported in version 8.0."; |
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.
static final String LOCAL_DEPRECATED_MESSAGE = "Deprecated parameter [local] used. This parameter does not cause this API to act " + | |
"locally, and should not be used. It will be unsupported in version 8.0."; | |
static final String LOCAL_DEPRECATED_MESSAGE = "The parameter [local] is deprecated and will be removed in a future release."; |
"description":"Return local information, do not retrieve the state from master node (default: false)" | ||
"description":"Return local information, do not retrieve the state from master node (default: false)", | ||
"deprecated":{ | ||
"version":"8.0.0", |
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.
Shouldn't this be the release in which we deprecate the parameter? That should be before 8.0.0.
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.
We typically update the version when backporting to a release branch and then come back and update the master branch.
@elasticmachine update branch |
user doesn't have permission to update head repository |
@boicehuang Will you merge the latest changes from |
@boicehuang, could you enable the "Allow edits and access to secrets by maintainers" option on this PR? That will enable us to use some of our automated tooling to do things like merge in the master branch, etc. I'll re-review it shortly. From a quick glance, it looks like we'll be able to merge it. |
@danhermann ok |
@elasticmachine update branch |
user doesn't have permission to update head repository |
@danhermann sorry, try again |
@elasticmachine update branch |
@boicehuang, this is ready to merge with the one exception of the documentation line here: which should be:
|
@boicehuang, note that it is the line the |
Thanks, @boicehuang. I will get this merged. |
/_cat/indices
The cat indices APIs perform a ClusterStateAction then an IndicesStatsAction. They accept the ?local parameter and pass this to the ClusterStateAction but this parameter has no effect on the IndicesStatsAction.
This commit deprecates the ?local parameter on this API so that it can be removed in 8.0.
Related #60718