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: delete existing ISM policy when retention is disabled #17386

Merged
merged 1 commit into from
Apr 10, 2024

Conversation

mustafadagher
Copy link
Contributor

Description

Delete existing ISM policy when retention is disabled. This is a tryout to fix the OpensearchExporterIT flaky test, but it could be also solving an existing unnoticed bug

Related issues

closes #17279

this is a tryout to fix the OpensearchExporterIT flaky test, but it could be also solving an existing unnoticed bug
Copy link
Contributor

@megglos megglos left a comment

Choose a reason for hiding this comment

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

LGTM!
Let's also backport this to 8.5 and 8.4.

"DELETE", "_plugins/_ism/policies/" + configuration.retention.getPolicyName());

final var response = sendRequest(request, DeleteStateManagementPolicyResponse.class);
return response.result().equals(DeleteStateManagementPolicyResponse.DELETED);
Copy link
Contributor

@megglos megglos Apr 9, 2024

Choose a reason for hiding this comment

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

❓ so in case it doesn't exist this does not end up in a 404 but just returns a result. The API docs don't really answer that :/ but tests do:D

@megglos megglos added backport stable/8.4 Backport a pull request to 8.4.x backport stable/8.5 Backport a pull request to stable/8.5 labels Apr 10, 2024
@megglos megglos added this pull request to the merge queue Apr 10, 2024
Merged via the queue into main with commit 37c3c4f Apr 10, 2024
40 checks passed
@megglos megglos deleted the 17279-delete-ism-policy-when-retention-is-disabled branch April 10, 2024 06:44
@backport-action
Copy link
Collaborator

Backport failed for stable/8.4, because it was unable to cherry-pick the commit(s).

Please cherry-pick the changes locally and resolve any conflicts.

git fetch origin stable/8.4
git worktree add -d .worktree/backport-17386-to-stable/8.4 origin/stable/8.4
cd .worktree/backport-17386-to-stable/8.4
git switch --create backport-17386-to-stable/8.4
git cherry-pick -x 8f11aae6905fff244bae6cdb689ec12e28f5159e

@backport-action
Copy link
Collaborator

Successfully created backport PR for stable/8.5:

github-merge-queue bot pushed a commit that referenced this pull request Apr 10, 2024
…is disabled (#17410)

# Description
Backport of #17386 to `stable/8.5`.

relates to #17279
original author: @mustafadagher
github-merge-queue bot pushed a commit that referenced this pull request Apr 11, 2024
…is disabled (#17418)

# Description
Backport of #17386 to `stable/8.4`.

relates to #17279
original author: @mustafadagher
@Zelldon Zelldon added version:8.4.7 Marks an issue as being completely or in parts released in 8.4.7 version:8.5.1 Marks an issue as being completely or in parts released in 8.5.1 labels May 7, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport stable/8.4 Backport a pull request to 8.4.x backport stable/8.5 Backport a pull request to stable/8.5 component/zeebe Related to the Zeebe component/team kind/flake Categorizes issue or PR as related to a flaky test version:8.4.7 Marks an issue as being completely or in parts released in 8.4.7 version:8.5.1 Marks an issue as being completely or in parts released in 8.5.1
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Flaky test OpensearchExporterIT.shouldAddIndexLifecycleSettingsToExistingIndicesOnRerunWhenRetentionIsEnabled
4 participants