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

[BUG][NewHomePage] Temp Solution to avoid crash for user with no write permission #7054

Merged
merged 2 commits into from
Jun 19, 2024

Conversation

ananzh
Copy link
Member

@ananzh ananzh commented Jun 18, 2024

Description

Allow new home page shown for user with no write permission

2024-06-18_15-22-22.mp4

Compared it without the change

2024-06-18_15-25-00.mp4

Issues Resolved

#6320

Changelog

  • fix: [BUG][NewHomePage] Temp Solution to avoid crash for anonymous user with no write permission

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

Copy link

codecov bot commented Jun 18, 2024

Codecov Report

Attention: Patch coverage is 0% with 1 line in your changes missing coverage. Please review.

Project coverage is 67.46%. Comparing base (0db5848) to head (2d6f65d).

Files Patch % Lines
.../home/public/services/section_type/section_type.ts 0.00% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #7054      +/-   ##
==========================================
+ Coverage   67.44%   67.46%   +0.01%     
==========================================
  Files        3445     3445              
  Lines       67886    67884       -2     
  Branches    11037    11037              
==========================================
+ Hits        45788    45798      +10     
+ Misses      19431    19418      -13     
- Partials     2667     2668       +1     
Flag Coverage Δ
Linux_1 33.08% <0.00%> (+<0.01%) ⬆️
Linux_2 55.11% <ø> (ø)
Linux_3 45.25% <0.00%> (+<0.01%) ⬆️
Linux_4 34.86% <0.00%> (+<0.01%) ⬆️
Windows_1 33.12% <0.00%> (+0.02%) ⬆️
Windows_2 55.06% <ø> (ø)
Windows_3 45.25% <0.00%> (-0.01%) ⬇️
Windows_4 34.86% <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.

@ananzh ananzh changed the title [BUG][NewHomePage] Temp Solution to avoid crash for anonymous user with no write permission [BUG][NewHomePage] Temp Solution to avoid crash for user with no write permission Jun 18, 2024
.save({})
.then(() => error$.next(undefined))
.catch((e) => error$.next(e));
homepage.save({});
Copy link
Collaborator

Choose a reason for hiding this comment

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

is there anything that tracks fixing this permanently?

Copy link
Member Author

Choose a reason for hiding this comment

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

I could open an issue. Currently we are using this tmp one for unblocking purpose.

Copy link
Member Author

Choose a reason for hiding this comment

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

actually we could keep the issue open and revisit to see if there is better solution

Copy link
Collaborator

Choose a reason for hiding this comment

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

Hi Anan. Will this fix have some potential issue as it swallowed the error. Will it show information that not suppose to show to user?

Copy link
Member

Choose a reason for hiding this comment

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

Maybe we could leave a comment here to describe why it's crashed(I'm curious ;)

Copy link
Member

Choose a reason for hiding this comment

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

+1

@ananzh ananzh merged commit 25009ba into opensearch-project:main Jun 19, 2024
68 of 69 checks passed
opensearch-trigger-bot bot pushed a commit that referenced this pull request Jun 19, 2024
…e permission (#7054)

* [BUG][NewHomePage] Temp Solution to avoid crash for anonymous user with no write permission

Issue Resolve:
#6320

---------

Signed-off-by: Anan Zhuang <[email protected]>
Co-authored-by: opensearch-changeset-bot[bot] <154024398+opensearch-changeset-bot[bot]@users.noreply.github.com>
(cherry picked from commit 25009ba)
Signed-off-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
opensearch-trigger-bot bot pushed a commit that referenced this pull request Jun 19, 2024
…e permission (#7054)

* [BUG][NewHomePage] Temp Solution to avoid crash for anonymous user with no write permission

Issue Resolve:
#6320

---------

Signed-off-by: Anan Zhuang <[email protected]>
Co-authored-by: opensearch-changeset-bot[bot] <154024398+opensearch-changeset-bot[bot]@users.noreply.github.com>
(cherry picked from commit 25009ba)
Signed-off-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
ananzh pushed a commit that referenced this pull request Jun 19, 2024
…e permission (#7054) (#7063)

* [BUG][NewHomePage] Temp Solution to avoid crash for anonymous user with no write permission

Issue Resolve:
#6320

---------



(cherry picked from commit 25009ba)

Signed-off-by: Anan Zhuang <[email protected]>
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>
ananzh pushed a commit that referenced this pull request Jun 19, 2024
…e permission (#7054) (#7064)

* [BUG][NewHomePage] Temp Solution to avoid crash for anonymous user with no write permission

Issue Resolve:
#6320

---------



(cherry picked from commit 25009ba)

Signed-off-by: Anan Zhuang <[email protected]>
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>
mengweieric pushed a commit to mengweieric/OpenSearch-Dashboards that referenced this pull request Jun 24, 2024
…e permission (opensearch-project#7054)

* [BUG][NewHomePage] Temp Solution to avoid crash for anonymous user with no write permission

Issue Resolve:
opensearch-project#6320

---------

Signed-off-by: Anan Zhuang <[email protected]>
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.

6 participants