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: staled closure inside chrome_service #8783

Merged
merged 6 commits into from
Nov 1, 2024

Conversation

SuZhou-Joe
Copy link
Member

@SuZhou-Joe SuZhou-Joe commented Nov 1, 2024

Description

Fix staled closure issue inside chrome_service. The staled closure is toggling the chrome from visible to unvisible and visible in a short time and it makes the page header remount multiple times.

Issues Resolved

Screenshot

Before fix

20241101135015249.mp4

After fix

20241101135140983.mp4

Testing the changes

Changelog

  • fix: staled closure inside chrome_service

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
Contributor

github-actions bot commented Nov 1, 2024

❌ Changelog Entry Missing Hyphen

Changelog entries must begin with a hyphen (-).

Copy link

codecov bot commented Nov 1, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 60.75%. Comparing base (92e0766) to head (89390b2).
Report is 81 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #8783   +/-   ##
=======================================
  Coverage   60.75%   60.75%           
=======================================
  Files        3798     3798           
  Lines       90690    90690           
  Branches    14277    14277           
=======================================
  Hits        55101    55101           
  Misses      32090    32090           
  Partials     3499     3499           
Flag Coverage Δ
Linux_1 29.05% <ø> (ø)
Linux_2 56.39% <ø> (ø)
Linux_3 37.61% <ø> (+<0.01%) ⬆️
Linux_4 29.82% <ø> (ø)
Windows_1 29.07% <ø> (ø)
Windows_2 56.34% <ø> (ø)
Windows_3 37.61% <ø> (-0.01%) ⬇️
Windows_4 29.82% <ø> (ø)

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.

Hailong-am
Hailong-am previously approved these changes Nov 1, 2024
const appHidden$ = merge(
// For the isVisible$ logic, having no mounted app is equivalent to having a hidden app
// in the sense that the chrome UI should not be displayed until a non-chromeless app is mounting or mounted
of(true),
application.currentAppId$.pipe(
flatMap((appId) =>
application.applications$.pipe(
flatMap((appId) => {
Copy link
Member

Choose a reason for hiding this comment

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

Seems change to switchMap could solve the issue?

Signed-off-by: SuZhou-Joe <[email protected]>
Signed-off-by: SuZhou-Joe <[email protected]>
Signed-off-by: SuZhou-Joe <[email protected]>
@ruanyl ruanyl merged commit e11b401 into opensearch-project:main Nov 1, 2024
54 of 55 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-Dashboards/backport-2.x 2.x
# Navigate to the new working tree
pushd ../.worktrees/OpenSearch-Dashboards/backport-2.x
# Create a new branch
git switch --create backport/backport-8783-to-2.x
# Cherry-pick the merged commit of this pull request and resolve the conflicts
git cherry-pick -x --mainline 1 e11b4013599fa5fe39097275a53e68a39de44570
# Push it to GitHub
git push --set-upstream origin backport/backport-8783-to-2.x
# Go back to the original working tree
popd
# Delete the working tree
git worktree remove ../.worktrees/OpenSearch-Dashboards/backport-2.x

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

@opensearch-trigger-bot
Copy link
Contributor

The backport to 2.18 failed:

The process '/usr/bin/git' failed with exit code 1

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

Then, create a pull request where the base branch is 2.18 and the compare/head branch is backport/backport-8783-to-2.18.

amsiglan pushed a commit to amsiglan/OpenSearch-Dashboards that referenced this pull request Nov 1, 2024
SuZhou-Joe added a commit to SuZhou-Joe/OpenSearch-Dashboards that referenced this pull request Nov 2, 2024
SuZhou-Joe added a commit to SuZhou-Joe/OpenSearch-Dashboards that referenced this pull request Nov 2, 2024
SuZhou-Joe added a commit that referenced this pull request Nov 4, 2024
(cherry picked from commit e11b401)
Signed-off-by: SuZhou-Joe <[email protected]>
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