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

UI: namespace not preserved across clicks #12022

Closed
mr-karan opened this issue Feb 8, 2022 · 4 comments · Fixed by #12082
Closed

UI: namespace not preserved across clicks #12022

mr-karan opened this issue Feb 8, 2022 · 4 comments · Fixed by #12082

Comments

@mr-karan
Copy link
Contributor

mr-karan commented Feb 8, 2022

Nomad version

1.2.0

Operating system and Environment details

Arch Linux, Firefox (96.0.3 (64-bit))

Issue

In the UI, when I navigate to a certain Allocation (https://nomad.tld/ui/jobs/vector/vector) for example, I am able to see the list of running tasks etc normally:

image

However, when I reload the same page (using F5/Browser refresh button), I see this page:

image

I noticed this doesn't happen when ?namespace is in the URL. So:

  • https://nomad.tld/ui/jobs/vector/vector reload doesn't work
  • https://nomad.tld/ui/jobs/vector/vector?namespace=logging reload works.

I think the issue is that this ?namespace is actually stripped off from the part of the URL when navigating inside the jobs.

Reproduction steps

  1. Visit https://nomad.tld/ui/jobs?namespace=* which is the default page.
  2. Click on any job. For eg: vector takes me to: https://nomad.tld/ui/jobs/vector?namespace=logging
  3. Inside this page, if I click on Tasks/Allocation, the ?namepsace is removed from the URL: https://nomad.tld/ui/jobs/vector/vector or https://nomad.tld/ui/allocations/89f9516e-1583-fe6a-6af3-d08dc99147da
  4. Reloading the above URL, it throws 404 (probably trying to find this task/allocation in the default namepsace)

Expected Result

?namespace=<> should be preserved when navigating across different sections of the UI.

Actual Result

Since ?namespace isn't present, reloading the link (or clicking directly without the frontend clicks on the SPA) leads to a 404.

@tgross tgross changed the title UI is only rendered via clicks on SPA UI: namespace not preserved across clicks Feb 11, 2022
@Amier3
Copy link
Contributor

Amier3 commented Feb 14, 2022

Hey @mr-karan

Thanks for bringing this to our attention! We'll have to look into this more to see if the fix is as straight-foward as it seems 😅. We'll keep this issue updated with new info when we get to this

@ChaiWithJai ChaiWithJai linked a pull request Feb 17, 2022 that will close this issue
@ChaiWithJai
Copy link
Contributor

@Amier3 I'm on it!

@lgfa29
Copy link
Contributor

lgfa29 commented Feb 22, 2022

Thanks for the report @mr-karan. We noticed this happening as well (usually when sorting and searching, more details in #11327).

That's why @ChaiWithJai re-factored how namespaces are handled in the UI in #12082, which will be released in Nomad 1.3.0.

I just checked your reproduction steps in main and this problem is fixed, so I'm going to close this one.

@lgfa29 lgfa29 closed this as completed Feb 22, 2022
@ChaiWithJai ChaiWithJai added this to the 1.3.0 milestone Feb 24, 2022
@github-actions
Copy link

I'm going to lock this issue because it has been closed for 120 days ⏳. This helps our maintainers find and focus on the active issues.
If you have found a problem that seems similar to this, 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 Oct 11, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
Development

Successfully merging a pull request may close this issue.

5 participants