Bug 1945312 - project deletion does not reset UI project context
Summary: project deletion does not reset UI project context
Alias: None
Product: OpenShift Container Platform
Classification: Red Hat
Component: Dev Console
Version: 4.6.z
Hardware: All
OS: Unspecified
Target Milestone: ---
: 4.8.0
Assignee: Rohit Rai
QA Contact: Mohammed Saud
Depends On:
TreeView+ depends on / blocked
Reported: 2021-03-31 16:10 UTC by Judd Maltin
Modified: 2021-07-27 22:57 UTC (History)
9 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Last Closed: 2021-07-27 22:57:00 UTC
Target Upstream Version:

Attachments (Terms of Use)
activeNamespace is undefined (795.91 KB, image/png)
2021-04-12 15:50 UTC, Robb Hamilton
no flags Details

System ID Private Priority Status Summary Last Updated
Github openshift console pull 9003 0 None open Bug 1945312: Fix project deletion issue and reset active namespace 2021-05-21 16:18:39 UTC
Red Hat Product Errata RHSA-2021:2438 0 None None None 2021-07-27 22:57:28 UTC

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):


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.


Note You need to log in before you can comment on or make changes to this bug.