-
Notifications
You must be signed in to change notification settings - Fork 25.6k
Deprecate the 'local' parameter of /_cat/shards
#62197
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/shards
#62197
Conversation
|
Pinging @elastic/es-core-features (:Core/Features/CAT APIs) |
|
@elasticmachine ok to test |
|
@elasticmachine run elasticsearch-ci/docs |
danhermann
left a comment
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, this looks pretty good, too. There are a couple simple changes necessary below that are similar to the ones on your other PR.
docs/reference/cat/shards.asciidoc
Outdated
| include::{es-repo-dir}/rest-api/common-parms.asciidoc[tag=local] | ||
| + | ||
| -- | ||
| `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.
| include::{es-repo-dir}/rest-api/common-parms.asciidoc[tag=local] | |
| + | |
| -- | |
| `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.] | |
| -- | |
| `local`:: | |
| (Optional, boolean) | |
| + | |
| deprecated::[8.0.0,"This parameter does not affect the request. It will be removed in a future version."] |
| 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."; |
|
@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. |
|
@danhermann i can't find the "Allow edits and access to secrets by maintainers" option on the PR. but I have merged the master branch into it. Can you merge it? The same on #62198 |
That might be because the PR originates from the TencentCloudES repository rather than your personal fork of the Elasticsearch repository. That will just mean that we can't use our automated tooling to merge in master. In order to get this PR merged, we need all the tests to pass. Right now, one test is failing due to:
which should be an easy fix. A second test is failing for what is probably an unrelated reason, but they will be re-run after you remove the unused import above. |
|
@danhermann I have fixed it. |
|
Thanks, @boicehuang. Almost everything looks good on this. I apologize for not catching this earlier, but the documentation line here: should read:
because we're already past the point at which code changes are going into the 7.10 release. We'll make sure that documentation is correctly updated to the appropriate 7.x release before we get to the 7.11 release. |
|
@boicehuang, note that it is the line the |
|
Thanks, @boicehuang. I will get this merged. |
/_cat/shards

The cat shards 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