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 exec not working for another region #10539

Merged
merged 2 commits into from
May 13, 2021

Conversation

legege
Copy link
Contributor

@legege legege commented May 7, 2021

Fix for issue #10538

@hashicorp-cla
Copy link

hashicorp-cla commented May 7, 2021

CLA assistant check
All committers have signed the CLA.

@vercel vercel bot temporarily deployed to Preview – nomad May 10, 2021 20:22 Inactive
@backspace
Copy link
Contributor

backspace commented May 10, 2021

Thanks for the start on this, @legege. I added another commit to address two nuances:

  1. localStorage.nomadActiveRegion is effectively a cache for the region most recently chosen from the sidebar dropdown. Changing the region in the sidebar writes to localStorage but service:system.activeRegion is the source of truth for the frontmost application’s active region because localStorage is shared among all windows, but different windows/Ember applications can have a different activeRegion.
  2. In a setup without regions, this parameter should not be included in the exec call.

ETA this is not currently possible to exercise within Ember tests; socket URL construction could be extracted for testability, but I didn’t find that too helpful with the construction of exec popup window URLs 😞 but I tested this with both a multi-region setup and a non-region setup.

Copy link
Contributor

@DingoEatingFuzz DingoEatingFuzz left a comment

Choose a reason for hiding this comment

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

LGTM

@backspace backspace merged commit f75ceea into hashicorp:main May 13, 2021
@legege legege deleted the exec-fix-multi-region branch May 13, 2021 21:41
@tgross tgross added this to the 1.1.1 milestone May 17, 2021
@github-actions
Copy link

I'm going to lock this pull request because it has been closed for 120 days ⏳. This helps our maintainers find and focus on the active contributions.
If you have found a problem that seems related to this change, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Nov 20, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants