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

[Workspace] Fix non-workspace admin update defaultIndex #8675

Conversation

yubonluo
Copy link
Contributor

Description

When no workspace user navigate to Maps/Visualization page, the defaultIndex will be updated and show the error toast.
image

After fixing, no workspace admin will not update default index.

Issues Resolved

Screenshot

Testing the changes

Changelog

  • fix: [Workspace] Fix non-workspace admin update defaultIndex

Check List

  • All tests pass
    • yarn test:jest
    • yarn test:jest_integration
  • New functionality includes testing.
  • New functionality has been documented.
  • Update CHANGELOG.md
  • Commits are signed per the DCO using --signoff

Signed-off-by: yubonluo <yubonluo@amazon.com>
Copy link

codecov bot commented Oct 22, 2024

Codecov Report

Attention: Patch coverage is 44.44444% with 5 lines in your changes missing coverage. Please review.

Project coverage is 60.85%. Comparing base (5d74306) to head (f9f38b3).
Report is 2 commits behind head on main.

Files with missing lines Patch % Lines
src/plugins/data/public/plugin.ts 0.00% 3 Missing ⚠️
...rns/index_patterns/ensure_default_index_pattern.ts 0.00% 2 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #8675      +/-   ##
==========================================
- Coverage   60.86%   60.85%   -0.01%     
==========================================
  Files        3793     3793              
  Lines       90381    90387       +6     
  Branches    14185    14188       +3     
==========================================
  Hits        55006    55006              
- Misses      31898    31903       +5     
- Partials     3477     3478       +1     
Flag Coverage Δ
Linux_1 29.09% <44.44%> (+<0.01%) ⬆️
Linux_2 56.38% <0.00%> (-0.01%) ⬇️
Linux_3 37.68% <0.00%> (+<0.01%) ⬆️
Linux_4 29.81% <0.00%> (-0.01%) ⬇️
Windows_1 29.10% <44.44%> (+<0.01%) ⬆️
Windows_2 56.34% <0.00%> (-0.01%) ⬇️
Windows_3 37.69% <0.00%> (-0.01%) ⬇️
Windows_4 29.81% <0.00%> (-0.01%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Signed-off-by: yubonluo <yubonluo@amazon.com>
Signed-off-by: yubonluo <yubonluo@amazon.com>
Signed-off-by: yubonluo <yubonluo@amazon.com>
@Hailong-am Hailong-am merged commit 41ab14d into opensearch-project:main Oct 22, 2024
71 of 72 checks passed
opensearch-trigger-bot bot pushed a commit that referenced this pull request Oct 22, 2024
* Fix updating defaultIndex at workspace uiSetting level

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

* Changeset file for PR #8675 created/updated

* optimize the code

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

* optimize the code

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

* optimize the code

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

---------

Signed-off-by: yubonluo <yubonluo@amazon.com>
Co-authored-by: opensearch-changeset-bot[bot] <154024398+opensearch-changeset-bot[bot]@users.noreply.github.com>
(cherry picked from commit 41ab14d)
Signed-off-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
ruanyl pushed a commit that referenced this pull request Oct 23, 2024
* Fix updating defaultIndex at workspace uiSetting level



* Changeset file for PR #8675 created/updated

* optimize the code



* optimize the code



* optimize the code



---------



(cherry picked from commit 41ab14d)

Signed-off-by: yubonluo <yubonluo@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>
Co-authored-by: opensearch-changeset-bot[bot] <154024398+opensearch-changeset-bot[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.

4 participants