-
Notifications
You must be signed in to change notification settings - Fork 617
CAT API automation (Part II) #9060
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
Signed-off-by: Archer <[email protected]>
Signed-off-by: Archer <[email protected]>
Signed-off-by: Naarcha-AWS <[email protected]>
Signed-off-by: Archer <[email protected]>
Signed-off-by: Archer <[email protected]>
Signed-off-by: Archer <[email protected]>
Signed-off-by: Archer <[email protected]>
Signed-off-by: Archer <[email protected]>
Signed-off-by: Naarcha-AWS <[email protected]>
Signed-off-by: Archer <[email protected]>
Signed-off-by: Archer <[email protected]>
Thank you for submitting your PR. The PR states are In progress (or Draft) -> Tech review -> Doc review -> Editorial review -> Merged. Before you submit your PR for doc review, make sure the content is technically accurate. If you need help finding a tech reviewer, tag a maintainer. When you're ready for doc review, tag the assignee of this PR. The doc reviewer may push edits to the PR directly or leave comments and editorial suggestions for you to address (let us know in a comment if you have a preference). The doc reviewer will arrange for an editorial review. |
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 addition of the default column results in incorrect formatting.
_api-reference/cat/cat-aliases.md
Outdated
|
||
The following table lists the available query parameters. All query parameters are optional. | ||
|
||
Parameter | Data type | Description | Default |
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 "Default" column is not populated for some rows so the table is not displayed correctly (in all these files).
Also, since the table is automatically generated, could we have consistency in pipe symbols: either no pipe symbols on either end of the row, or pipe symbols on both ends of the row (the latter is more extensible).
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.
It makes sense to add |
's at the end and the beginning to me. @nhtruong, would that be difficult to change in the workflow?
The pretty
setting will add pipes but also add additional spacing. One solution is we could enable that by default, since the tables aren't going to be touched directly anyways.
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 just add pipe symbols regardless of pretty
. Also, there should be no empty cells in the table. Where there is no default, we should add N/A
. However, it's strange that there was no default automatically provided for expand_wildcards
. Is it missing from the spec?
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.
It's not difficult. Are you saying with pretty: false
(the default), the pipes are never present and with pretty: true
they are there? OR are you saying that with pretty: false
the pipes are there sometimes (this inconsistency would be a bug)
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.
Regarding Default values not showing: Are they on the spec but not in the generated tables?
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 go with adding pipes at the ends in any case (for pretty
either true
or false
). This way, all tables are consistent (have pipes at either end at all times).
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.
Right now, according to the expected output, pretty: true
does include pipes at the end and the beginning.
Signed-off-by: Archer <[email protected]>
Signed-off-by: Archer <[email protected]>
Signed-off-by: Archer <[email protected]>
Signed-off-by: Archer <[email protected]>
Signed-off-by: Archer <[email protected]>
Signed-off-by: Archer <[email protected]>
Signed-off-by: Archer <[email protected]>
Signed-off-by: Archer <[email protected]>
Signed-off-by: Archer <[email protected]>
Signed-off-by: Archer <[email protected]>
Signed-off-by: Archer <[email protected]>
Signed-off-by: Archer <[email protected]>
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.
_api-reference/cat/cat-aliases.md
Outdated
|
||
| Parameter | Data type | Description | Default | | ||
| :--- | :--- | :--- | :--- | | ||
| `expand_wildcards` | List or String | Expands wildcard expressions to concrete indexes. Combine multiple values with commas. Supported values are `all`, `open`, `closed`, `hidden`, and `none`. <br> Valid values are: <br> - `all`: Match any index, including hidden ones. </br> - `closed`: Match closed, non-hidden indexes. </br> - `hidden`: Match hidden indexes. Must be combined with open, closed, or both. </br> - `none`: Wildcard expressions are not accepted. </br> - `open`: Match open, non-hidden indexes. | N/A | |
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.
| `expand_wildcards` | List or String | Expands wildcard expressions to concrete indexes. Combine multiple values with commas. Supported values are `all`, `open`, `closed`, `hidden`, and `none`. <br> Valid values are: <br> - `all`: Match any index, including hidden ones. </br> - `closed`: Match closed, non-hidden indexes. </br> - `hidden`: Match hidden indexes. Must be combined with open, closed, or both. </br> - `none`: Wildcard expressions are not accepted. </br> - `open`: Match open, non-hidden indexes. | N/A | | |
| `expand_wildcards` | List or String | Specifies the type of index that wildcard expressions can match. Supports comma-separated values. Supported values are `all`, `open`, `closed`, `hidden`, and `none`. <br> Valid values are: <br> - `all`: Match any index, including hidden ones. </br> - `closed`: Match closed, non-hidden indexes. </br> - `hidden`: Match hidden indexes. Must be combined with `open`, `closed`, or both. </br> - `none`: Wildcard expressions are not accepted. </br> - `open`: Match open, non-hidden indexes. | N/A | |
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.
_api-reference/cat/cat-indices.md
Outdated
| :--- | :--- | :--- | :--- | | ||
| `bytes` | String | The units used to display byte values. <br> Valid values are: `b`, `kb`, `k`, `mb`, `m`, `gb`, `g`, `tb`, `t`, `pb`, `p` | N/A | | ||
| `cluster_manager_timeout` | String | The amount of time allowed to establish a connection to the cluster manager node. | N/A | | ||
| `expand_wildcards` | List or String | The type of index that wildcard patterns can match. Supported values are `all`, `open`, `closed`, `hidden`, and `none`. <br> Valid values are: <br> - `all`: Match any index, including hidden ones. </br> - `closed`: Match closed, non-hidden indexes. </br> - `hidden`: Match hidden indexes. Must be combined with open, closed, or both. </br> - `none`: Wildcard expressions are not accepted. </br> - `open`: Match open, non-hidden indexes. | N/A | |
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 descriptions for expand_wildcards
should be the same for all these files.
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 will get updated in the spec in a separate PR.
Signed-off-by: Archer <[email protected]>
Signed-off-by: Archer <[email protected]>
@kolchfa-aws: I addressed the tags issue. As far as the description consistency, that needs to be addressed in the spec and not here. The descriptions are grammatically and technically correct, and while yes, we need to address their consistency, that should not be a blocker to getting this PR merged. |
Absolutely - this needs to be addressed in the spec. In my view, it's a prerequisite to this PR. That way, we can avoid duplicated content:
I presume "Supported values are..." is coming from the description and "Valid values are" is generated. |
Signed-off-by: Archer <[email protected]>
@kolchfa-aws: Yes, 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.
LGTM
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-2.18 2.18
# Navigate to the new working tree
pushd ../.worktrees/backport-2.18
# Create a new branch
git switch --create backport/backport-9060-to-2.18
# Cherry-pick the merged commit of this pull request and resolve the conflicts
git cherry-pick -x --mainline 1 0713861ee2c33b642d4966c591e72a0576781095
# Push it to GitHub
git push --set-upstream origin backport/backport-9060-to-2.18
# Go back to the original working tree
popd
# Delete the working tree
git worktree remove ../.worktrees/backport-2.18 Then, create a pull request where the |
* Add CAT API automation Signed-off-by: Archer <[email protected]> * Add CAT API reference Signed-off-by: Archer <[email protected]> * Update cat-pit-segments.md Signed-off-by: Naarcha-AWS <[email protected]> * Fix mustache template Signed-off-by: Archer <[email protected]> * Fix table spacing Signed-off-by: Archer <[email protected]> * Updated expected output Signed-off-by: Archer <[email protected]> * Revert back to type Signed-off-by: Archer <[email protected]> * Fix pretty test expected result Signed-off-by: Archer <[email protected]> * Add updated tables. Signed-off-by: Archer <[email protected]> * Add CAT API automation with updated spec-insert Signed-off-by: Archer <[email protected]> * Add updated CAT API tables Signed-off-by: Archer <[email protected]> * See if an extra space will fix the table. Signed-off-by: Archer <[email protected]> * Update mustache template to add spaces Signed-off-by: Archer <[email protected]> * Mustache template update Signed-off-by: Archer <[email protected]> * Update expected output. Signed-off-by: Archer <[email protected]> * Add lines to renderer. Signed-off-by: Archer <[email protected]> * Add new lines Signed-off-by: Archer <[email protected]> * Try another way Signed-off-by: Archer <[email protected]> * Fix mustache spec Signed-off-by: Archer <[email protected]> * Add line breaks correctly. Signed-off-by: Archer <[email protected]> * Update endpoint expected output. Signed-off-by: Archer <[email protected]> * Fix renderer spacing. Fix tests. Signed-off-by: Archer <[email protected]> * Fix expected output. Signed-off-by: Archer <[email protected]> * Fix table Signed-off-by: Archer <[email protected]> * Update expected results Signed-off-by: Archer <[email protected]> * Fix output, again. Signed-off-by: Archer <[email protected]> * Add another test Signed-off-by: Archer <[email protected]> * Theoretically the correct spacing. Signed-off-by: Archer <[email protected]> * Add Theo's suggestions Signed-off-by: Archer <[email protected]> * Fix BR tags Signed-off-by: Archer <[email protected]> * Fix expected output. Signed-off-by: Archer <[email protected]> * Make wildcard defintion consistent. Signed-off-by: Archer <[email protected]> --------- Signed-off-by: Archer <[email protected]> Signed-off-by: Naarcha-AWS <[email protected]> (cherry picked from commit 0713861)
* Add CAT API automation Signed-off-by: Archer <[email protected]> * Add CAT API reference Signed-off-by: Archer <[email protected]> * Update cat-pit-segments.md Signed-off-by: Naarcha-AWS <[email protected]> * Fix mustache template Signed-off-by: Archer <[email protected]> * Fix table spacing Signed-off-by: Archer <[email protected]> * Updated expected output Signed-off-by: Archer <[email protected]> * Revert back to type Signed-off-by: Archer <[email protected]> * Fix pretty test expected result Signed-off-by: Archer <[email protected]> * Add updated tables. Signed-off-by: Archer <[email protected]> * Add CAT API automation with updated spec-insert Signed-off-by: Archer <[email protected]> * Add updated CAT API tables Signed-off-by: Archer <[email protected]> * See if an extra space will fix the table. Signed-off-by: Archer <[email protected]> * Update mustache template to add spaces Signed-off-by: Archer <[email protected]> * Mustache template update Signed-off-by: Archer <[email protected]> * Update expected output. Signed-off-by: Archer <[email protected]> * Add lines to renderer. Signed-off-by: Archer <[email protected]> * Add new lines Signed-off-by: Archer <[email protected]> * Try another way Signed-off-by: Archer <[email protected]> * Fix mustache spec Signed-off-by: Archer <[email protected]> * Add line breaks correctly. Signed-off-by: Archer <[email protected]> * Update endpoint expected output. Signed-off-by: Archer <[email protected]> * Fix renderer spacing. Fix tests. Signed-off-by: Archer <[email protected]> * Fix expected output. Signed-off-by: Archer <[email protected]> * Fix table Signed-off-by: Archer <[email protected]> * Update expected results Signed-off-by: Archer <[email protected]> * Fix output, again. Signed-off-by: Archer <[email protected]> * Add another test Signed-off-by: Archer <[email protected]> * Theoretically the correct spacing. Signed-off-by: Archer <[email protected]> * Add Theo's suggestions Signed-off-by: Archer <[email protected]> * Fix BR tags Signed-off-by: Archer <[email protected]> * Fix expected output. Signed-off-by: Archer <[email protected]> * Make wildcard defintion consistent. Signed-off-by: Archer <[email protected]> --------- Signed-off-by: Archer <[email protected]> Signed-off-by: Naarcha-AWS <[email protected]> (cherry picked from commit 0713861)
* Add CAT API automation Signed-off-by: Archer <[email protected]> * Add CAT API reference Signed-off-by: Archer <[email protected]> * Update cat-pit-segments.md Signed-off-by: Naarcha-AWS <[email protected]> * Fix mustache template Signed-off-by: Archer <[email protected]> * Fix table spacing Signed-off-by: Archer <[email protected]> * Updated expected output Signed-off-by: Archer <[email protected]> * Revert back to type Signed-off-by: Archer <[email protected]> * Fix pretty test expected result Signed-off-by: Archer <[email protected]> * Add updated tables. Signed-off-by: Archer <[email protected]> * Add CAT API automation with updated spec-insert Signed-off-by: Archer <[email protected]> * Add updated CAT API tables Signed-off-by: Archer <[email protected]> * See if an extra space will fix the table. Signed-off-by: Archer <[email protected]> * Update mustache template to add spaces Signed-off-by: Archer <[email protected]> * Mustache template update Signed-off-by: Archer <[email protected]> * Update expected output. Signed-off-by: Archer <[email protected]> * Add lines to renderer. Signed-off-by: Archer <[email protected]> * Add new lines Signed-off-by: Archer <[email protected]> * Try another way Signed-off-by: Archer <[email protected]> * Fix mustache spec Signed-off-by: Archer <[email protected]> * Add line breaks correctly. Signed-off-by: Archer <[email protected]> * Update endpoint expected output. Signed-off-by: Archer <[email protected]> * Fix renderer spacing. Fix tests. Signed-off-by: Archer <[email protected]> * Fix expected output. Signed-off-by: Archer <[email protected]> * Fix table Signed-off-by: Archer <[email protected]> * Update expected results Signed-off-by: Archer <[email protected]> * Fix output, again. Signed-off-by: Archer <[email protected]> * Add another test Signed-off-by: Archer <[email protected]> * Theoretically the correct spacing. Signed-off-by: Archer <[email protected]> * Add Theo's suggestions Signed-off-by: Archer <[email protected]> * Fix BR tags Signed-off-by: Archer <[email protected]> * Fix expected output. Signed-off-by: Archer <[email protected]> * Make wildcard defintion consistent. Signed-off-by: Archer <[email protected]> --------- Signed-off-by: Archer <[email protected]> Signed-off-by: Naarcha-AWS <[email protected]> Signed-off-by: Eric Pugh <[email protected]>
This PR also fixes the previous automation markers with the latest changes to
spec-insert
tool..Checklist
For more information on following Developer Certificate of Origin and signing off your commits, please check here.