Bug 1945312

Summary: project deletion does not reset UI project context
Product: OpenShift Container Platform Reporter: Judd Maltin <judd>
Component: Dev ConsoleAssignee: Rohit Rai <rorai>
Status: CLOSED ERRATA QA Contact: Mohammed Saud <msaud>
Severity: medium Docs Contact:
Priority: unspecified    
Version: 4.6.zCC: aballant, aos-bugs, dsantra, jokerman, msaud, nmukherj, rhamilto, rorai, spadgett
Target Milestone: ---   
Target Release: 4.8.0   
Hardware: All   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2021-07-27 22:57:00 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Attachments:
Description Flags
activeNamespace is undefined none

Description Judd Maltin 2021-03-31 16:10:42 UTC
Description of problem:

After deleting a project with the Management Console, project context is not reset.  The project dropdown continues to show the project, and the "+Add" component shows some (but not all) cards.  This confuses users into thinking that they may deploy some but not all kinds of cards into the deleted project.


Version-Release number of selected component (if applicable):

4.6.z


How reproducible:


Steps to Reproduce:
1. Login to console, developer perspective
2. Create a new project, then delete it through same.
3. Click "+Add" and cards appear to be able to deploy apps into project.


Actual results:

Cards appear.  The project selector dropdown is not refreshed to reflect project termination and deletion.

Expected results:

Project context should reset to null.
User should be asked to create or select a project.
User should not see cards for deployment options.

Additional info:

Comment 3 Robb Hamilton 2021-04-08 14:33:23 UTC
Investigating a proper fix.  We know why the bug is occurring, the question is how to fix.

Comment 4 Robb Hamilton 2021-04-12 14:29:40 UTC
https://github.com/openshift/console/pull/7433 introduced this regression.

Comment 5 Robb Hamilton 2021-04-12 15:45:23 UTC
Reassigning to Dev Console team since they introduced the regression.  

I believe the bug is occurring because the modal does not share the same context as app, thus `activeNamespace` at https://github.com/openshift/console/blob/master/frontend/public/components/modals/delete-namespace-modal.tsx#L33 is always `undefined`.

Comment 6 Robb Hamilton 2021-04-12 15:50:06 UTC
Created attachment 1771375 [details]
activeNamespace is undefined

Comment 8 Mohammed Saud 2021-06-02 15:19:35 UTC
Verified on:
Build: 4.8.0-0.nightly-2021-06-02-025513
Browser: Firefox 88

Comment 11 errata-xmlrpc 2021-07-27 22:57:00 UTC
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.8.2 bug fix and security 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-2021:2438