Description of problem: Project/namespace remains selected in main project dropdown after deletion. Version-Release number of selected component (if applicable): 4.6 How reproducible: Always Steps to Reproduce: 1. In the Admin perspective, Go to Pods 2. Create new project & select that project 3. go to project view in admin console 4. delete project 4. click "installed operators" Actual results: Note that the new project is still referenced in the Project dropdown Expected results: The deleted project should no longer be referenced in the Project dropdown Additional info: ** this happens regardless of the perspective
FYI @amobrem @ejacobs
Started looking into this and it turns out that this is working as expected. Further discussion found that his is an edge case in the original implementation. There are some cases where we still want the active namespace to remain, even if it's not a selectable item in the dropdown. Discussed with Sam Padgett who implemented the original behavior. The problem is that when a project is not present in that dropdown, we don't know why. It could have been deleted, or the user might not have permission to see it. In the case where a user doesn't have permission to see a project in the dropdown, they still might be able to view some info in the project via direct link. For that reason, the active namespace must be based on the url parameters and not the user's project permissions. All of that being said, we CAN handle the case where the delete action happened from the same browser instance (i.e. the case this bug presents). We can react directly to the delete action in the UI, and adjust the active namespace accordingly.
PR pending
1. Create a new project yapeitest and view project scope resource pages such as Workloads -> Pods, Operators -> Installed Operators, current active project `yapeitest` is selected automatically 2. Navigate to projects list page and delete `yapeitest` project from console, wait until project is successfully deleted 3. In the current browser window, navigate to project scope resource pages, such as Builds -> Build Configs, Networking -> Services, `all projects` is selected But when the project is deleted by CLI, the deleted project is still referenced/selected in project dropdown selector, this should be working as expected. @Jon I see you mentioned this `If a user deletes their currently active namespace from the UI, fall back to selecting "all namespaces" as the active namespace` in PR description, but I would like to double confirm with you. Current behavior(described above) is correct, right?
(In reply to Yadan Pei from comment #5) > 1. Create a new project yapeitest and view project scope resource pages such > as Workloads -> Pods, Operators -> Installed Operators, current active > project `yapeitest` is selected automatically > 2. Navigate to projects list page and delete `yapeitest` project from > console, wait until project is successfully deleted > 3. In the current browser window, navigate to project scope resource pages, > such as Builds -> Build Configs, Networking -> Services, `all projects` is > selected > > But when the project is deleted by CLI, the deleted project is still > referenced/selected in project dropdown selector, this should be working as > expected. > > @Jon I see you mentioned this `If a user deletes their currently active > namespace from the UI, fall back to selecting "all namespaces" as the active > namespace` in PR description, but I would like to double confirm with you. > Current behavior(described above) is correct, right? Yes, this is the correct behavior. We can't change the selected project when it is deleted in the "background". I explain a little bit about why this is in Comment 2: > Discussed with Sam Padgett who implemented the original behavior. The > problem is that when a project is not present in that dropdown, we don't > know why. It could have been deleted, or the user might not have > permission to see it. In the case where a user doesn't have permission > to see a project in the dropdown, they still might be able to view some > info in the project via direct link. So, we only want to fall back to "all-namespaces" when we know the project was deleted. The only time we know that is when the deletion happens through the console in the current browser session.
Thank you Jon pointing me the comment. Moving to VERIFIED
Since the problem described in this bug report should be resolved in a recent advisory, it has been closed with a resolution of ERRATA. For information on the advisory (Moderate: OpenShift Container Platform 4.7.0 security, bug fix, and enhancement update), and where to find the updated files, follow the link below. If the solution does not work for you, open a new bug report. https://access.redhat.com/errata/RHSA-2020:5633
The needinfo request[s] on this closed bug have been removed as they have been unresolved for 500 days