Skip to content

Conversation

Naarcha-AWS
Copy link
Contributor

@Naarcha-AWS Naarcha-AWS commented Jan 13, 2025

This PR also fixes the previous automation markers with the latest changes to spec-insert tool..

Checklist

  • By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license and subject to the Developers Certificate of Origin.
    For more information on following Developer Certificate of Origin and signing off your commits, please check here.

@Naarcha-AWS Naarcha-AWS added the Doc review PR: Doc review in progress label Jan 13, 2025
@Naarcha-AWS Naarcha-AWS self-assigned this Jan 13, 2025
Copy link

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.

@Naarcha-AWS Naarcha-AWS marked this pull request as ready for review January 13, 2025 22:46
@Naarcha-AWS Naarcha-AWS added the backport 2.18 PR: Backport label for 2.18 label Jan 13, 2025
@Naarcha-AWS Naarcha-AWS mentioned this pull request Jan 13, 2025
26 tasks
Copy link
Collaborator

@kolchfa-aws kolchfa-aws left a 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.


The following table lists the available query parameters. All query parameters are optional.

Parameter | Data type | Description | Default
Copy link
Collaborator

@kolchfa-aws kolchfa-aws Jan 14, 2025

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).

Screenshot 2025-01-14 at 8 55 55 AM

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).

Copy link
Contributor Author

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.

Copy link
Collaborator

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?

Copy link
Contributor

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)

Copy link
Contributor

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?

Copy link
Collaborator

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).

Copy link
Contributor Author

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.

Copy link
Collaborator

@kolchfa-aws kolchfa-aws left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A couple of things here:

  1. Please ensure that all descriptions for the same parameters are the same, as we discussed previously.
  2. The <br> tag does not have a closing counterpart. Please use <br> everywhere. Currently, tables are not displayed properly:
    Screenshot 2025-01-21 at 10 45 01 AM


| 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 |
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
| `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 |

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed.
Screenshot 2025-01-21 at 10 36 06 AM

| :--- | :--- | :--- | :--- |
| `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 |
Copy link
Collaborator

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.

Copy link
Contributor Author

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.

@Naarcha-AWS
Copy link
Contributor Author

@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.

@kolchfa-aws
Copy link
Collaborator

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:

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:

I presume "Supported values are..." is coming from the description and "Valid values are" is generated.

@Naarcha-AWS
Copy link
Contributor Author

@kolchfa-aws: Yes, the enums are generated. The definition has been updated and is now consistent. 1495f2a

Copy link
Collaborator

@kolchfa-aws kolchfa-aws left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@Naarcha-AWS Naarcha-AWS merged commit 0713861 into main Jan 22, 2025
8 checks passed
@opensearch-trigger-bot
Copy link
Contributor

The backport to 2.18 failed:

The process '/usr/bin/git' failed with exit code 128

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 base branch is 2.18 and the compare/head branch is backport/backport-9060-to-2.18.

Naarcha-AWS added a commit that referenced this pull request Jan 22, 2025
* 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)
Naarcha-AWS added a commit that referenced this pull request Jan 22, 2025
* 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)
@Naarcha-AWS Naarcha-AWS deleted the cat-api-automation branch April 4, 2025 22:15
epugh pushed a commit to o19s/documentation-website that referenced this pull request Jul 2, 2025
* 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]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

backport 2.18 PR: Backport label for 2.18 Doc review PR: Doc review in progress

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants