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 1822112: include OpenShift Project as part of deployImage flow #5196

Conversation

invincibleJai
Copy link
Member

@invincibleJai invincibleJai commented Apr 27, 2020

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

Analysis / Root cause:
The "openshift" has been always there to provide templates and images, user can use those via CLI but can't fetch images in deploy image flow from DevConsole

Solution Description:
include OpenShift Project as part of deployImage flow irrespective of user-role

Screen shots / Gifs for design review:
Apr-27-2020 18-41-28

Screenshot 2020-04-27 at 7 02 07 PM

Browser conformance:

  • Chrome
  • Firefox
  • Safari
  • Edge

@openshift-ci-robot openshift-ci-robot added the bugzilla/severity-medium Referenced Bugzilla bug's severity is medium for the branch this PR is targeting. label Apr 27, 2020
@openshift-ci-robot
Copy link
Contributor

@invincibleJai: This pull request references Bugzilla bug 1822112, 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 1822112: include OpenShift Project as part of deployImage flow

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 openshift-ci-robot added the bugzilla/valid-bug Indicates that a referenced Bugzilla bug is valid for the branch this PR is targeting. label Apr 27, 2020
@openshift-ci-robot openshift-ci-robot added component/dev-console Related to dev-console component/shared Related to console-shared labels Apr 27, 2020
@openshift-ci-robot
Copy link
Contributor

@invincibleJai: This pull request references Bugzilla bug 1822112, 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 1822112: include OpenShift Project as part of deployImage flow

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.

@@ -22,6 +22,7 @@ export interface ResourceDropdownFieldProps extends DropdownFieldProps {
actionTitle: string;
actionKey: string;
}[];
appendItems?: object;
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
appendItems?: object;
appendItems?: { [key: string] : string };

Copy link
Member Author

Choose a reason for hiding this comment

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

Done

@@ -66,6 +66,7 @@ interface ResourceDropdownProps {
onLoad?: (items: { [key: string]: string }) => void;
showBadge?: boolean;
autocompleteFilter?: (strText: string, item: object) => boolean;
appendItems?: object;
Copy link
Contributor

Choose a reason for hiding this comment

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

same as above

Comment on lines 66 to 69
onLoad?: (items: { [key: string]: string }) => void;
showBadge?: boolean;
autocompleteFilter?: (strText: string, item: object) => boolean;
appendItems?: { [key: string]: string | React.ReactElement };
Copy link
Contributor

Choose a reason for hiding this comment

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

can we could extract this as a ResourceDropdownItemsType and use it in other places like onLoad for consistency

Copy link
Member Author

Choose a reason for hiding this comment

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

Updated

@karthikjeeyar
Copy link
Contributor

karthikjeeyar commented Apr 28, 2020

Openshift namespace has a lot of imagestreams in it but in my opinion we should show only the builder images in the list because thats how 3.11 shows at the moment.
eg:
image

@invincibleJai
Copy link
Member Author

Openshift namespace has a lot of imagestreams in it but in my opinion we should show only the builder images in the list because thats how 3.11 shows at the moment.
eg:
image

@karthikjeeyar i don
t think we should filter based on builder images as in 3.11 i verified , all imageStreams are shown there and even in BZ redis is mentioned which is not a builder image

Screenshot 2020-04-28 at 4 03 41 PM

@karthikjeeyar
Copy link
Contributor

Verified locally and it works fine with limited permissions as well
/lgtm

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

@sahil143 sahil143 left a comment

Choose a reason for hiding this comment

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

/lgtm

@invincibleJai
Copy link
Member Author

Thanks @karthikjeeyar @sahil143

/assign @christianvogt

}: ResourceDropdownProps,
updateSelection: boolean,
) => {
const unsortedList = {};
let unsortedList = {};
Copy link
Contributor

Choose a reason for hiding this comment

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

Can you not simply init the list upfront?

Suggested change
let unsortedList = {};
const unsortedList = { ...appendItems };

Comment on lines 190 to 194
_.keys(appendItems).forEach((key) => {
if (!_.has(unsortedList, key)) {
unsortedList = { ...unsortedList, ...{ [key]: appendItems[key] } };
}
});
Copy link
Contributor

Choose a reason for hiding this comment

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

Unnecessary if you init unsortedList with appendItems

Copy link
Member Author

Choose a reason for hiding this comment

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

Thanks , have updated

@openshift-ci-robot openshift-ci-robot removed the lgtm Indicates that a PR is ready to be merged. label Apr 30, 2020
@christianvogt
Copy link
Contributor

/lgtm
/approve

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

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: christianvogt, invincibleJai, karthikjeeyar, sahil143

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-ci-robot openshift-ci-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label May 4, 2020
@openshift-merge-robot openshift-merge-robot merged commit 7daf932 into openshift:master May 4, 2020
@openshift-ci-robot
Copy link
Contributor

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

In response to this:

Bug 1822112: include OpenShift Project as part of deployImage flow

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.

@spadgett spadgett added this to the v4.5 milestone May 5, 2020
@invincibleJai
Copy link
Member Author

/cherry-pick release-4.4

@openshift-cherrypick-robot

@invincibleJai: #5196 failed to apply on top of branch "release-4.4":

error: Failed to merge in the changes.
Using index info to reconstruct a base tree...
M	frontend/packages/console-shared/src/components/dropdown/ResourceDropdown.tsx
M	frontend/packages/console-shared/src/components/formik-fields/ResourceDropdownField.tsx
Falling back to patching base and 3-way merge...
Auto-merging frontend/packages/console-shared/src/components/formik-fields/ResourceDropdownField.tsx
CONFLICT (content): Merge conflict in frontend/packages/console-shared/src/components/formik-fields/ResourceDropdownField.tsx
Auto-merging frontend/packages/console-shared/src/components/dropdown/ResourceDropdown.tsx
CONFLICT (content): Merge conflict in frontend/packages/console-shared/src/components/dropdown/ResourceDropdown.tsx
Patch failed at 0001 include OpenShift ns for picking up images for user role doesn't have access to ns

In response to this:

/cherry-pick release-4.4

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.

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/dev-console Related to dev-console component/shared Related to console-shared 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

8 participants