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 not providing proper error message while moving name space from one project to another project #8770

Open
dasarinaidu opened this issue May 1, 2023 · 2 comments

Comments

@dasarinaidu
Copy link

Setup

  • Rancher version: v2.7.3
  • Browser type & version: Chrome

Describe the bug
UI not providing proper error message while moving name space from one project to another project.

While moving a name space from proj1 to proj2, the webhook validation is happening and throwing a n/w error if there is a authorization issue. In this case UI is on same move screen and not providing proper error message to the user. Just the button is change from Move to Error and after 2 seconds it went back to Move. Also, the screen shows the name space moved to a different project and it not came back till user refresh the screen.

To Reproduce

  1. Provision rancher
  2. Create a Downstream cluster
  3. Create a Standard User (user1)
  4. Create a project : "proj-read" (Add user1 as readonly)
  5. Create a Name Space (testns1)
  6. Create a project : "proj-write" (Add user1 as Owner)
  7. Create a Name Space (testns2)
  8. Login with user1
  9. From UI Try to move testns2 to the project "proj-read" OR
  10. From UI Try to move testns1 to the project "proj-write"
  11. Check for the behavior

Result

  1. User is on the same move popup screen and the button(Move)change to Error and there is NO error message on the screen
  2. In next 2 seconds the Error buttom changed to Move
  3. On the UI the name space got moved to the other project but after a screen refresh the name space did not moved
  4. Network call failed with 403 error
    {"type":"error","links":{},"code":"Unauthorized","message":"admission webhook "rancher.cattle.io.namespaces" denied the request: Unauthorized","status":403,"type":"error"}

Expected Result

  1. User should get appropriate error message on the screen
  2. The Name Space should not move to the other project (User no need to refresh)

Additional context
Before this change there is no errors while moving the name spaces and UI may not handle the error cases.

Screenshots

image
image
image

@dasarinaidu dasarinaidu added the team/area1 Team Neo label May 2, 2023
@dasarinaidu dasarinaidu modified the milestones: v2.7.x, v2.7.next2 May 2, 2023
@gaktive gaktive modified the milestones: v2.7.next2, v2.7.next3 May 9, 2023
@nwmac nwmac modified the milestones: v2.7.next3, v2.7.next4 Jun 8, 2023
@nwmac nwmac modified the milestones: v2.8.0, v2.8.next1 Aug 8, 2023
@nwmac nwmac modified the milestones: v2.8.next1, v2.8.next2 Nov 17, 2023
@nwmac nwmac modified the milestones: v2.8.next2, v2.10.0 Feb 27, 2024
@jonatan5524
Copy link
Contributor

jonatan5524 commented Jun 20, 2024

Hi, I will be glad to take this issue

@jonatan5524
Copy link
Contributor

I tried to investigate this issue, as I see it I have the Namespace object that gets updated with label and annotation and then saves the Namespace object (which makes a call to the API)
But because the same object is presented on the table using the same annotation that gets updated it changes in render before the save call is made and fails...
https://github.com/rancher/dashboard/blob/master/shell/components/MoveModal.vue#L63

@nwmac nwmac modified the milestones: v2.10.0, v2.11.0 Jul 4, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants