Skip to content
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

Fix bucket selector aggregation writeable name. #773

Merged
merged 3 commits into from
Jan 28, 2025

Conversation

AWSHurneyt
Copy link
Collaborator

@AWSHurneyt AWSHurneyt commented Jan 25, 2025

Description

  1. Fix bucket selector aggregation writeable name.

This PR will have a follow-up PR in the alerting plugin to fix the way we register the aggregation.

Backporting

This change is needed back to v1.1; however, these assets were only moved to the common utils repo from alerting in v2.4. Will raise separate PRs to backport these changes further.

Related Issues

Resolves #[Issue number to be closed when this PR is merged]

Check List

  • New functionality includes testing.
  • New functionality has been documented.
  • API changes companion pull request created.
  • Commits are signed per the DCO using --signoff.
  • Public documentation issue/PR created.

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.

Signed-off-by: AWSHurneyt <hurneyt@amazon.com>
Signed-off-by: AWSHurneyt <hurneyt@amazon.com>
var bucketIndices: List<Int?>

constructor(
name: String?,
Copy link
Member

Choose a reason for hiding this comment

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

should we rename this to indicate we dont use this variable anymore?

Copy link

Choose a reason for hiding this comment

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

The name still gets passed to super. It's a fundamental part of InternalAggregation.

But it's different from the writeableName. The writeableName is the key used to find the deserializer.

The idea is that the serializer writes it as part of the stream, then the deserialization logic does lookup. The writeableName is the serializer side. The deserializer side is handled by the addResultReader on the AggregationSpec in the plugin.

@AWSHurneyt AWSHurneyt merged commit c876ad5 into opensearch-project:main Jan 28, 2025
9 checks passed
opensearch-trigger-bot bot pushed a commit that referenced this pull request Jan 28, 2025
* Fixed writeable name. Added constructor for stream input.

Signed-off-by: AWSHurneyt <hurneyt@amazon.com>

* Moved unit tests from alerting into this package.

Signed-off-by: AWSHurneyt <hurneyt@amazon.com>

---------

Signed-off-by: AWSHurneyt <hurneyt@amazon.com>
(cherry picked from commit c876ad5)
Signed-off-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
@opensearch-trigger-bot
Copy link
Contributor

The backport to 2.4 failed:

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

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

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

@opensearch-trigger-bot
Copy link
Contributor

The backport to 2.5 failed:

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

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

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

@opensearch-trigger-bot
Copy link
Contributor

The backport to 2.6 failed:

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

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

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

@opensearch-trigger-bot
Copy link
Contributor

The backport to 2.7 failed:

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

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

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

@opensearch-trigger-bot
Copy link
Contributor

The backport to 2.9 failed:

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

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

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

@opensearch-trigger-bot
Copy link
Contributor

The backport to 2.10 failed:

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

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

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

@opensearch-trigger-bot
Copy link
Contributor

The backport to 2.8 failed:

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

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

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

@opensearch-trigger-bot
Copy link
Contributor

The backport to 2.11 failed:

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

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

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

@opensearch-trigger-bot
Copy link
Contributor

The backport to 2.12 failed:

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

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

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

@opensearch-trigger-bot
Copy link
Contributor

The backport to 2.13 failed:

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

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

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

@opensearch-trigger-bot
Copy link
Contributor

The backport to 2.14 failed:

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

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

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

@opensearch-trigger-bot
Copy link
Contributor

The backport to 2.15 failed:

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

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

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

@opensearch-trigger-bot
Copy link
Contributor

The backport to 2.16 failed:

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

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

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

@opensearch-trigger-bot
Copy link
Contributor

The backport to 2.17 failed:

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

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

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

@opensearch-trigger-bot
Copy link
Contributor

The backport to 2.18 failed:

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

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

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

AWSHurneyt pushed a commit that referenced this pull request Jan 28, 2025
* Fixed writeable name. Added constructor for stream input.



* Moved unit tests from alerting into this package.



---------


(cherry picked from commit c876ad5)

Signed-off-by: AWSHurneyt <hurneyt@amazon.com>
Signed-off-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
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.

5 participants