Skip to content

Conversation

lcawl
Copy link
Contributor

@lcawl lcawl commented Sep 22, 2025

The create or update alias API (https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-indices-put-alias) contained an example that did not match the specification:

POST _aliases
{
  "actions": [
    {
      "add": {
        "index": "my-data-stream",
        "alias": "my-alias"
      }
    }
  ]
}

In particular, when I test the POST /{index}/_aliases/{name} endpoint locally, it returns a parsing_exception error for the provided example. I've therefore tested and added examples that align with the https://www.elastic.co/docs/manage-data/data-store/aliases#write-index, https://www.elastic.co/docs/manage-data/data-store/aliases#filter-alias, and https://www.elastic.co/docs/manage-data/data-store/aliases#alias-routing examples

@lcawl lcawl requested a review from a team September 22, 2025 22:40
@lcawl lcawl marked this pull request as ready for review September 22, 2025 22:40
Copy link
Contributor

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 make validate target.

Copy link
Member

@pquentin pquentin left a comment

Choose a reason for hiding this comment

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

Thanks! LGTM.

@pquentin pquentin merged commit 2a84c0c into main Sep 24, 2025
14 of 16 checks passed
@pquentin pquentin deleted the alias-examples branch September 24, 2025 05:22
Copy link
Contributor

The backport to 8.19 failed:

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

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-5331-to-8.19
# Cherry-pick the merged commit of this pull request and resolve the conflicts
git cherry-pick -x --mainline 1 2a84c0ca0dd45f8806158d011748fe2c20b2547c
# Push it to GitHub
git push --set-upstream origin backport-5331-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 base branch is 8.19 and the compare/head branch is backport-5331-to-8.19.

Copy link
Contributor

The backport to 9.0 failed:

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

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.0 9.0
# Navigate to the new working tree
cd .worktrees/backport-9.0
# Create a new branch
git switch --create backport-5331-to-9.0
# Cherry-pick the merged commit of this pull request and resolve the conflicts
git cherry-pick -x --mainline 1 2a84c0ca0dd45f8806158d011748fe2c20b2547c
# Push it to GitHub
git push --set-upstream origin backport-5331-to-9.0
# Go back to the original working tree
cd ../..
# Delete the working tree
git worktree remove .worktrees/backport-9.0

Then, create a pull request where the base branch is 9.0 and the compare/head branch is backport-5331-to-9.0.

Copy link
Contributor

The backport to 9.1 failed:

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

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-5331-to-9.1
# Cherry-pick the merged commit of this pull request and resolve the conflicts
git cherry-pick -x --mainline 1 2a84c0ca0dd45f8806158d011748fe2c20b2547c
# Push it to GitHub
git push --set-upstream origin backport-5331-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 base branch is 9.1 and the compare/head branch is backport-5331-to-9.1.

lcawl added a commit that referenced this pull request Sep 24, 2025
* Fix alias API examples

* Generate output

* Format yaml

(cherry picked from commit 2a84c0c)
lcawl added a commit that referenced this pull request Sep 24, 2025
* Fix alias API examples

* Generate output

* Format yaml

(cherry picked from commit 2a84c0c)
lcawl added a commit that referenced this pull request Sep 24, 2025
* Fix alias API examples

* Generate output

* Format yaml

(cherry picked from commit 2a84c0c)
@lcawl
Copy link
Contributor Author

lcawl commented Sep 24, 2025

💚 All backports created successfully

Status Branch Result
9.1
9.0
8.19

Questions ?

Please refer to the Backport tool documentation

lcawl added a commit that referenced this pull request Sep 24, 2025
lcawl added a commit that referenced this pull request Sep 24, 2025
lcawl added a commit that referenced this pull request Sep 24, 2025
(cherry picked from commit 2a84c0c)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants