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

Add new parameters to snapshot restore to rename the restored aliases… #16292

Merged
merged 13 commits into from
Oct 23, 2024

Conversation

mispencer
Copy link
Contributor

@mispencer mispencer commented Oct 11, 2024

Description

Add new parameters to snapshot restore to rename the restored aliases similar to how you can currently rename the restored indexes.

Related Issues

Resolves #15632

Check List

  • Functionality includes testing.
  • API changes companion pull request created, if applicable. - PR 615
  • Public documentation issue/PR created, if applicable. - PR 8544

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.

Copy link
Contributor

❌ Gradle check result for 8e511d6: FAILURE

Please examine the workflow log, locate, and copy-paste the failure(s) below, then iterate to green. Is the failure a flaky test unrelated to your change?

Copy link
Contributor

❌ Gradle check result for 019c62f: FAILURE

Please examine the workflow log, locate, and copy-paste the failure(s) below, then iterate to green. Is the failure a flaky test unrelated to your change?

Signed-off-by: Spencer G. Jones <spencer.jones2@tylertech.com>
Signed-off-by: Spencer G. Jones <spencer.jones2@tylertech.com>
Signed-off-by: Spencer G. Jones <spencer.jones2@tylertech.com>
Signed-off-by: Spencer G. Jones <spencer.jones2@tylertech.com>
Signed-off-by: Spencer G. Jones <spencer.jones2@tylertech.com>
Signed-off-by: Spencer G. Jones <spencer.jones2@tylertech.com>
Signed-off-by: Spencer G. Jones <spencer.jones2@tylertech.com>
…2.18 later once it is backported into that version.

Signed-off-by: Spencer G. Jones <spencer.jones2@tylertech.com>
Signed-off-by: Spencer G. Jones <spencer.jones2@tylertech.com>
…t understand. Also some refactoring.

Signed-off-by: Spencer G. Jones <spencer.jones2@tylertech.com>
Signed-off-by: Spencer G. Jones <spencer.jones2@tylertech.com>
Copy link
Contributor

❌ Gradle check result for 50e07d3: FAILURE

Please examine the workflow log, locate, and copy-paste the failure(s) below, then iterate to green. Is the failure a flaky test unrelated to your change?

Signed-off-by: Daniel Widdis <widdis@gmail.com>
Copy link
Contributor

✅ Gradle check result for dbc3e5b: SUCCESS

@dbwiddis dbwiddis merged commit 9489a21 into opensearch-project:main Oct 23, 2024
37 of 39 checks passed
@opensearch-trigger-bot
Copy link
Contributor

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

Then, create a pull request where the base branch is 2.x and the compare/head branch is backport/backport-16292-to-2.x.

dbwiddis added a commit to dbwiddis/OpenSearch that referenced this pull request Oct 23, 2024
opensearch-project#16292)

* Add new parameters to snapshot restore to rename the restored aliases similar to the existing parameters to rename indexes

Signed-off-by: Spencer G. Jones <spencer.jones2@tylertech.com>

* Fix comment. Update changelog.

Signed-off-by: Spencer G. Jones <spencer.jones2@tylertech.com>

* New parameters needs to only used for new version

Signed-off-by: Spencer G. Jones <spencer.jones2@tylertech.com>

* Add missing equals and hash implemenation for new parameters

Signed-off-by: Spencer G. Jones <spencer.jones2@tylertech.com>

* Add some tests

Signed-off-by: Spencer G. Jones <spencer.jones2@tylertech.com>

* Add some more tests

Signed-off-by: Spencer G. Jones <spencer.jones2@tylertech.com>

* Use CountDownLatch

Signed-off-by: Spencer G. Jones <spencer.jones2@tylertech.com>

* Add two more tests. Refactoring and cleanup.

Signed-off-by: Spencer G. Jones <spencer.jones2@tylertech.com>

* Use CURRENT version to pass backward compatibility tests. Change to V2.18 later once it is backported into that version.

Signed-off-by: Spencer G. Jones <spencer.jones2@tylertech.com>

* Refactoring

Signed-off-by: Spencer G. Jones <spencer.jones2@tylertech.com>

* Overwriting aliases variable causes test failures for reasons I do not understand. Also some refactoring.

Signed-off-by: Spencer G. Jones <spencer.jones2@tylertech.com>

* Convert to paramaterized tests

Signed-off-by: Spencer G. Jones <spencer.jones2@tylertech.com>

---------

Signed-off-by: Spencer G. Jones <spencer.jones2@tylertech.com>
Signed-off-by: Daniel Widdis <widdis@gmail.com>
Co-authored-by: Daniel Widdis <widdis@gmail.com>
saratvemulapalli pushed a commit that referenced this pull request Oct 23, 2024
#16292) (#16447)

* Add new parameters to snapshot restore to rename the restored aliases similar to the existing parameters to rename indexes



* Fix comment. Update changelog.



* New parameters needs to only used for new version



* Add missing equals and hash implemenation for new parameters



* Add some tests



* Add some more tests



* Use CountDownLatch



* Add two more tests. Refactoring and cleanup.



* Use CURRENT version to pass backward compatibility tests. Change to V2.18 later once it is backported into that version.



* Refactoring



* Overwriting aliases variable causes test failures for reasons I do not understand. Also some refactoring.



* Convert to paramaterized tests



---------

Signed-off-by: Spencer G. Jones <spencer.jones2@tylertech.com>
Signed-off-by: Daniel Widdis <widdis@gmail.com>
Co-authored-by: Spencer G. Jones <spencer.jones2@tylertech.com>
@mispencer
Copy link
Contributor Author

@dbwiddis - do you intend to make a PR to update the versions in the RestoreSnapshotRequest.java, or do you want me to do that?

@dbwiddis
Copy link
Member

@dbwiddis - do you intend to make a PR to update the versions in the RestoreSnapshotRequest.java, or do you want me to do that?

@mispencer Please track this and follow it through to completion. I (and most maintainers) are juggling multiple workstreams.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport 2.x Backport to 2.x branch backport-failed enhancement Enhancement or improvement to existing feature or request Storage:Snapshots
Projects
Status: ✅ Done
Development

Successfully merging this pull request may close these issues.

[Feature Request] Snapshot restore should allow renaming aliases
4 participants