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

Bug 1840355: self-provisioner cannot find command line terminal workspace #5554

Merged
merged 4 commits into from May 27, 2020

Conversation

christianvogt
Copy link
Contributor

@christianvogt christianvogt commented May 25, 2020

Fixes:
https://issues.redhat.com/browse/ODC-3794

Analysis / Root cause:
A user with only self-provisioner access is unable to list workspace resources at the cluster scope. Therefore they always get an error when trying to open the command line terminal

Solution Description:
If the user does not have access to list workspace resources at the cluster scope, loop through all available namespaces looking for a matching command line terminal namespace. Once found, save the namespace in localstorage to shortcut this lookup process in the future.

Screen shots / Gifs for design review:
No UI changes.

Unit test coverage report:

image

Test setup:
Depends on
#5332
openshift/console-operator#432

Browser conformance:

  • Chrome
  • Firefox
  • Safari
  • Edge

@openshift-ci-robot openshift-ci-robot added the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label May 25, 2020
@openshift-ci-robot openshift-ci-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label May 25, 2020
@christianvogt christianvogt force-pushed the cli-ns branch 4 times, most recently from c1efd5e to 2e3a0f5 Compare May 26, 2020 18:58
@christianvogt christianvogt changed the title [WIP] self-provisioner cannot find command line terminal workspace Bug 1840355: self-provisioner cannot find command line terminal workspace May 26, 2020
@openshift-ci-robot openshift-ci-robot added bugzilla/severity-medium Referenced Bugzilla bug's severity is medium for the branch this PR is targeting. bugzilla/valid-bug Indicates that a referenced Bugzilla bug is valid for the branch this PR is targeting. and removed do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. labels May 26, 2020
@openshift-ci-robot
Copy link
Contributor

@christianvogt: This pull request references Bugzilla bug 1840355, which is valid. The bug has been moved to the POST state. The bug has been updated to refer to the pull request using the external bug tracker.

3 validation(s) were run on this bug
  • bug is open, matching expected state (open)
  • bug target release (4.5.0) matches configured target release for branch (4.5.0)
  • bug is in the state NEW, which is one of the valid states (NEW, ASSIGNED, ON_DEV, POST, POST)

In response to this:

Bug 1840355: self-provisioner cannot find command line terminal workspace

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

@openshift-ci-robot
Copy link
Contributor

@christianvogt: This pull request references Bugzilla bug 1840355, which is valid.

3 validation(s) were run on this bug
  • bug is open, matching expected state (open)
  • bug target release (4.5.0) matches configured target release for branch (4.5.0)
  • bug is in the state POST, which is one of the valid states (NEW, ASSIGNED, ON_DEV, POST, POST)

In response to this:

Bug 1840355: self-provisioner cannot find command line terminal workspace

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

if (initError) {
return <LoadError message={initError} label="OpenShift command line terminal" />;
}

if (!loaded || (workspaceName && !initData)) {
// loading the workspace resource
if (!loaded) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: Did we need to split it? It could've been <TerminalLoadingBox message={!loaded?"":undefined} />

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes it must be split because the other one is wrapped in another div for the background.

@christianvogt
Copy link
Contributor Author

To test this PR, we must build the console front end and deploy the new image because the backend doesn't work with a local bridge.
This is something we will look to improve for development in the future.

Copy link
Contributor

@rohitkrai03 rohitkrai03 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

/lgtm

Verified on a cluster with latest frontend image delpoyed.

@openshift-ci-robot openshift-ci-robot added the lgtm Indicates that a PR is ready to be merged. label May 27, 2020
@openshift-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: christianvogt, rohitkrai03

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@openshift-merge-robot openshift-merge-robot merged commit 9a732b5 into openshift:master May 27, 2020
@openshift-ci-robot
Copy link
Contributor

@christianvogt: All pull requests linked via external trackers have merged: openshift/console#5554. Bugzilla bug 1840355 has been moved to the MODIFIED state.

In response to this:

Bug 1840355: self-provisioner cannot find command line terminal workspace

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

@christianvogt christianvogt deleted the cli-ns branch August 20, 2020 16:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. bugzilla/severity-medium Referenced Bugzilla bug's severity is medium for the branch this PR is targeting. bugzilla/valid-bug Indicates that a referenced Bugzilla bug is valid for the branch this PR is targeting. component/core Related to console core functionality lgtm Indicates that a PR is ready to be merged.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

6 participants