-
Notifications
You must be signed in to change notification settings - Fork 1.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
Implementing pagination for _cat/indices API #14718
Implementing pagination for _cat/indices API #14718
Conversation
❌ Gradle check result for 4924a71: FAILURE Please examine the workflow log, locate, and copy-paste the failure(s) below, then iterate to green. Is the failure a flaky test unrelated to your change? |
Signed-off-by: Harsh Garg <gkharsh@amazon.com>
4924a71
to
0cfb0e9
Compare
❌ Gradle check result for 0cfb0e9: FAILURE Please examine the workflow log, locate, and copy-paste the failure(s) below, then iterate to green. Is the failure a flaky test unrelated to your change? |
server/src/main/java/org/opensearch/rest/action/cat/RestIndicesAction.java
Outdated
Show resolved
Hide resolved
server/src/main/java/org/opensearch/rest/action/cat/RestIndicesAction.java
Outdated
Show resolved
Hide resolved
server/src/main/java/org/opensearch/rest/pagination/PaginationStrategy.java
Show resolved
Hide resolved
server/src/main/java/org/opensearch/rest/action/cat/RestIndicesAction.java
Outdated
Show resolved
Hide resolved
server/src/main/java/org/opensearch/rest/action/cat/RestIndicesAction.java
Outdated
Show resolved
Hide resolved
Signed-off-by: Harsh Garg <gkharsh@amazon.com>
❌ Gradle check result for d665722: FAILURE Please examine the workflow log, locate, and copy-paste the failure(s) below, then iterate to green. Is the failure a flaky test unrelated to your change? |
This looks like a great start. I would consider (don't feel strongly about it though) wrapping additional metadata into {
"metadata": {
"next_token" : "MSQxNzE5NDI3NDk3NDQ0JDE3MTk0Mjc1NTYzODEkaW5kZXg0LXRlc3Q=",
"total_count": 200
},
"indices" : [
{
"health" : "green",
"status" : "open",
"index" : "index4-test",
"uuid" : "s2AJ5CoYRru-8lbB871pWA",
"pri" : "2",
"rep" : "3",
"docs.count" : "0",
"docs.deleted" : "0",
"store.size" : "1.6kb",
"pri.store.size" : "416b"
}
]
} From the implementation POV, can we build |
server/src/main/java/org/opensearch/rest/action/list/RestIndicesListAction.java
Outdated
Show resolved
Hide resolved
server/src/main/java/org/opensearch/rest/action/list/RestIndicesListAction.java
Outdated
Show resolved
Hide resolved
server/src/main/java/org/opensearch/rest/action/list/RestIndicesListAction.java
Outdated
Show resolved
Hide resolved
server/src/main/java/org/opensearch/rest/action/list/RestIndicesListAction.java
Outdated
Show resolved
Hide resolved
Signed-off-by: Harsh Garg <gkharsh@amazon.com>
Signed-off-by: Harsh Garg <gkharsh@amazon.com>
❌ Gradle check result for fc4b6d9: FAILURE Please examine the workflow log, locate, and copy-paste the failure(s) below, then iterate to green. Is the failure a flaky test unrelated to your change? |
Signed-off-by: Harsh Garg <gkharsh@amazon.com>
fc4b6d9
to
c8261d4
Compare
0dba562
into
opensearch-project:main
The backport to
To backport manually, run these commands in your terminal: # Navigate to the root of your repository
cd $(git rev-parse --show-toplevel)
# Fetch latest updates from GitHub
git fetch
# Create a new working tree
git worktree add ../.worktrees/OpenSearch/backport-2.x 2.x
# Navigate to the new working tree
pushd ../.worktrees/OpenSearch/backport-2.x
# Create a new branch
git switch --create backport/backport-14718-to-2.x
# Cherry-pick the merged commit of this pull request and resolve the conflicts
git cherry-pick -x --mainline 1 0dba562f896a7294fc16eddf64081fe45b3aa3bb
# Push it to GitHub
git push --set-upstream origin backport/backport-14718-to-2.x
# Go back to the original working tree
popd
# Delete the working tree
git worktree remove ../.worktrees/OpenSearch/backport-2.x Then, create a pull request where the |
Sure @dblock. I'm already tracking this. Once |
* Implementing pagination for _cat/indices Signed-off-by: Harsh Garg <gkharsh@amazon.com>
* Implementing pagination for _cat/indices Signed-off-by: Harsh Garg <gkharsh@amazon.com>
* Implementing pagination for _cat/indices Signed-off-by: Harsh Garg <gkharsh@amazon.com>
Is there any tracking of documentation updates? I don't see anything on https://opensearch.org/docs/latest/api-reference, and don't see any open PRs on the website repo. |
Looks like the checklist on the PR template wasn't completed. |
@ohltyler @dbwiddis Sorry for the inconvenience, I'm working on adding API specs for now. Let me open the respective Github issues for public documentation in parallel.
As for this, it would be made available from OS version 2.18 in opensource/public documentation. |
* Implementing pagination for _cat/indices Signed-off-by: Harsh Garg <gkharsh@amazon.com>
* Implementing pagination for _cat/indices Signed-off-by: Harsh Garg <gkharsh@amazon.com>
* Implementing pagination for _cat/indices Signed-off-by: Harsh Garg <gkharsh@amazon.com>
Description
Changes include:
_list/indices
API which will display paginated results.Functional Testing on a local cluster:
_list API:
All the indices in the cluster
Retrieving indices in pages of size=1, using _list API, in plain text format:
Retrieving indices in pages of size=1, using _list API, in JSON format:
Related Issues
Resolves #14258
Check List
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.
For more information on following Developer Certificate of Origin and signing off your commits, please check here.