-
Notifications
You must be signed in to change notification settings - Fork 114
Add common cat API parameters for unit rendering #5298
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
Describes the `?bytes=`, `?size=` and `?time=` parameters which are accepted by all the `GET _cat/...` APIs.
* If given, size values are rendered as an integer with no suffix, representing the value of the column in the chosen unit. | ||
* Values that are not an exact multiple of the chosen unit are rounded down. | ||
*/ | ||
size?: '' | 'k' | 'm' | 'g' | 't' | 'p' |
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.
Not sure what to do with this one - it doesn't seem to be defined anywhere yet.
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 would add a new UnitSize
enum in _types/common.ts
next to Bytes
.
It's telling me to run Also this seems problematic:
The |
The last time we had such an issue, we decided to remove the affected parameter from the common cat parameters and explicitly place it in each API where it made sense. Doing this will be easier than fighting the TypeScript compiler which correctly errors out here. |
Ok I looked more deeply and I think the Edit: also opened elastic/elasticsearch#134871 to drop the |
Following you can find the validation changes against the target branch for the APIs. No changes detected. You can validate these APIs yourself by using the |
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.
Thank you! LGTM.
Thanks Quentin. Do I need to wait for elastic/elasticsearch#134870 to land and then adjust things here, or is it ok to merge this first? |
It's OK to merge this first. We have automation to sync the rest-api-spec from Elasticsearch to the specification that will remove the errors. (I did check that the changes were the same in both places.) |
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.19 8.19
# Navigate to the new working tree
cd .worktrees/backport-8.19
# Create a new branch
git switch --create backport-5298-to-8.19
# Cherry-pick the merged commit of this pull request and resolve the conflicts
git cherry-pick -x --mainline 1 e22c10134264a91aca0f736153460a3e988c27b5
# Push it to GitHub
git push --set-upstream origin backport-5298-to-8.19
# Go back to the original working tree
cd ../..
# Delete the working tree
git worktree remove .worktrees/backport-8.19 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-9.1 9.1
# Navigate to the new working tree
cd .worktrees/backport-9.1
# Create a new branch
git switch --create backport-5298-to-9.1
# Cherry-pick the merged commit of this pull request and resolve the conflicts
git cherry-pick -x --mainline 1 e22c10134264a91aca0f736153460a3e988c27b5
# Push it to GitHub
git push --set-upstream origin backport-5298-to-9.1
# Go back to the original working tree
cd ../..
# Delete the working tree
git worktree remove .worktrees/backport-9.1 Then, create a pull request where the |
Describes the `?bytes=` and `?time=` parameters which are accepted by all the `GET _cat/...` APIs.
Describes the `?bytes=` and `?time=` parameters which are accepted by all the `GET _cat/...` APIs. Backport of #5298 to `9.1`
Describes the `?bytes=` and `?time=` parameters which are accepted by all the `GET _cat/...` APIs. Backport of #5298 to `9.1`
Relates elastic/elasticsearch-specification#5298 Co-authored-by: Quentin Pradet <[email protected]>
Relates elastic/elasticsearch-specification#5298 Co-authored-by: Quentin Pradet <[email protected]> (cherry picked from commit d0ea79a) # Conflicts: # rest-api-spec/src/main/resources/rest-api-spec/api/cat.aliases.json
Relates elastic/elasticsearch-specification#5298 Co-authored-by: Quentin Pradet <[email protected]> (cherry picked from commit d0ea79a) # Conflicts: # rest-api-spec/src/main/resources/rest-api-spec/api/cat.aliases.json
Relates elastic/elasticsearch-specification#5298 Co-authored-by: Quentin Pradet <[email protected]>
Relates elastic/elasticsearch-specification#5298 Co-authored-by: Quentin Pradet <[email protected]> (cherry picked from commit d0ea79a) # Conflicts: # rest-api-spec/src/main/resources/rest-api-spec/api/cat.aliases.json Co-authored-by: David Turner <[email protected]>
Relates elastic/elasticsearch-specification#5298 Co-authored-by: Quentin Pradet <[email protected]> (cherry picked from commit d0ea79a) # Conflicts: # rest-api-spec/src/main/resources/rest-api-spec/api/cat.aliases.json Co-authored-by: David Turner <[email protected]>
Describes the `?bytes=` and `?time=` parameters which are accepted by all the `GET _cat/...` APIs.
Describes the
?bytes=
and?time=
parameters which are accepted byall the
GET _cat/...
APIs.