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: bugs during internal bugathon and fix the alias deletion issue in security mode. #704

Merged
merged 13 commits into from
Apr 17, 2023

Conversation

SuZhou-Joe
Copy link
Member

@SuZhou-Joe SuZhou-Joe commented Apr 14, 2023

Description

[Describe what this change achieves]

Issues Resolved

[List any issues this PR will resolve]

Check List

  • Commits are signed per the DCO using --signoff

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: suzhou <suzhou@amazon.com>
Signed-off-by: suzhou <suzhou@amazon.com>
Signed-off-by: suzhou <suzhou@amazon.com>
Signed-off-by: suzhou <suzhou@amazon.com>
Signed-off-by: suzhou <suzhou@amazon.com>
Signed-off-by: suzhou <suzhou@amazon.com>
Signed-off-by: suzhou <suzhou@amazon.com>
@SuZhou-Joe SuZhou-Joe requested a review from a team April 14, 2023 01:50
Signed-off-by: suzhou <suzhou@amazon.com>
@SuZhou-Joe SuZhou-Joe self-assigned this Apr 14, 2023
@SuZhou-Joe SuZhou-Joe added bug Something isn't working backport main v2.7.0 labels Apr 14, 2023
@codecov-commenter
Copy link

Codecov Report

Merging #704 (b1b4853) into 2.x (7f877ac) will decrease coverage by 0.23%.
The diff coverage is n/a.

❗ Current head b1b4853 differs from pull request most recent head 9e05f2b. Consider uploading reports for the commit 9e05f2b to get more accurate results

📣 This organization is not using Codecov’s GitHub App Integration. We recommend you install it so Codecov can continue to function properly for your repositories. Learn more

@@            Coverage Diff             @@
##              2.x     #704      +/-   ##
==========================================
- Coverage   58.97%   58.74%   -0.23%     
==========================================
  Files         296      318      +22     
  Lines        9806    10543     +737     
  Branches     1826     2011     +185     
==========================================
+ Hits         5783     6194     +411     
- Misses       3572     3833     +261     
- Partials      451      516      +65     

see 49 files with indirect coverage changes

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

Signed-off-by: suzhou <suzhou@amazon.com>
@@ -44,14 +45,25 @@ export default function DeleteAliasModal(props: DeleteAliasModalProps) {
const onConfirm = useCallback(async () => {
if (services) {
const result = await services.commonService.apiCaller({
endpoint: "indices.deleteAlias",
endpoint: "indices.updateAliases",
Copy link
Contributor

Choose a reason for hiding this comment

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

Why not using delete alias API and specifying concrete index names to delete all of the aliases, maybe simpler than this?

Copy link
Member Author

@SuZhou-Joe SuZhou-Joe Apr 14, 2023

Choose a reason for hiding this comment

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

I was not sure what the expression will be like if there are multiple indexes + multiple aliases. But after some testing I found it works well. Will change to that approach.

Signed-off-by: suzhou <suzhou@amazon.com>
Signed-off-by: suzhou <suzhou@amazon.com>
Signed-off-by: suzhou <suzhou@amazon.com>
Signed-off-by: suzhou <suzhou@amazon.com>
@SuZhou-Joe SuZhou-Joe merged commit 1503264 into opensearch-project:2.x Apr 17, 2023
opensearch-trigger-bot bot pushed a commit that referenced this pull request Apr 17, 2023
…n security mode. (#704)

* feat: Update Template Detail snapshot

Signed-off-by: suzhou <suzhou@amazon.com>

* feat: Update helpText for component template

Signed-off-by: suzhou <suzhou@amazon.com>

* fix: expand size for search index

Signed-off-by: suzhou <suzhou@amazon.com>

* feat: enable removeWhenEmpty on index setting

Signed-off-by: suzhou <suzhou@amazon.com>

* feat: add empty remove in component template

Signed-off-by: suzhou <suzhou@amazon.com>

* feat: enable duplicate mappings

Signed-off-by: suzhou <suzhou@amazon.com>

* fix: remove alias in security mode

Signed-off-by: suzhou <suzhou@amazon.com>

* feat: update release-notes

Signed-off-by: suzhou <suzhou@amazon.com>

* feat: fix unit test cases

Signed-off-by: suzhou <suzhou@amazon.com>

* feat: change to a simpler approach

Signed-off-by: suzhou <suzhou@amazon.com>

* feat: add exactSearch in getIndices method

Signed-off-by: suzhou <suzhou@amazon.com>

* feat: change unit test

Signed-off-by: suzhou <suzhou@amazon.com>

* feat: modify replicas

Signed-off-by: suzhou <suzhou@amazon.com>

---------

Signed-off-by: suzhou <suzhou@amazon.com>
(cherry picked from commit 1503264)
SuZhou-Joe added a commit that referenced this pull request Apr 19, 2023
…n security mode. (#704) (#707)

* feat: Update Template Detail snapshot

Signed-off-by: suzhou <suzhou@amazon.com>

* feat: Update helpText for component template

Signed-off-by: suzhou <suzhou@amazon.com>

* fix: expand size for search index

Signed-off-by: suzhou <suzhou@amazon.com>

* feat: enable removeWhenEmpty on index setting

Signed-off-by: suzhou <suzhou@amazon.com>

* feat: add empty remove in component template

Signed-off-by: suzhou <suzhou@amazon.com>

* feat: enable duplicate mappings

Signed-off-by: suzhou <suzhou@amazon.com>

* fix: remove alias in security mode

Signed-off-by: suzhou <suzhou@amazon.com>

* feat: update release-notes

Signed-off-by: suzhou <suzhou@amazon.com>

* feat: fix unit test cases

Signed-off-by: suzhou <suzhou@amazon.com>

* feat: change to a simpler approach

Signed-off-by: suzhou <suzhou@amazon.com>

* feat: add exactSearch in getIndices method

Signed-off-by: suzhou <suzhou@amazon.com>

* feat: change unit test

Signed-off-by: suzhou <suzhou@amazon.com>

* feat: modify replicas

Signed-off-by: suzhou <suzhou@amazon.com>

---------

Signed-off-by: suzhou <suzhou@amazon.com>
(cherry picked from commit 1503264)

Co-authored-by: suzhou <suzhou@amazon.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport main bug Something isn't working v2.7.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants