Bug 1661405 - Edit Annotation modal doesn't work on Overview details sidebar
Summary: Edit Annotation modal doesn't work on Overview details sidebar
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: OpenShift Container Platform
Classification: Red Hat
Component: Management Console
Version: 4.1.0
Hardware: Unspecified
OS: Unspecified
medium
medium
Target Milestone: ---
: 4.1.0
Assignee: Samuel Padgett
QA Contact: Yadan Pei
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2018-12-21 06:56 UTC by Yadan Pei
Modified: 2019-03-12 14:26 UTC (History)
5 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2019-01-28 12:22:47 UTC
Target Upstream Version:


Attachments (Terms of Use)

Description Yadan Pei 2018-12-21 06:56:59 UTC
Description of problem:
Edit Annotations modal in Overview details sidebar doesn't work, user can't edit annotations, while Actions -> Edit Annotations works correctly

Version-Release number of selected component (if applicable):
registry.svc.ci.openshift.org/openshift/origin-v4.0-2018-12-20-221917@sha256   2e5118bf01de4e2ee4285dda0e633357d7012e12c1f08066ce22c9af3d8bb312   43b646f5b084   8 hours ago     268 MB
openshift/console commit ID: 967b28133b5e43c4bdcb48b44d30f63d2cadff9e


How reproducible:
Always

Steps to Reproduce:
1. Create application
$ oc new-app centos/ruby-25-centos7~https://github.com/sclorg/ruby-ex.git
2. Go to Project status page -> Expand to see details
3. Try edit annotation modal on Overview of sidebar
4. Try Actions -> Edit Annotations

Actual results:
3. When user click "Save", nothing happens
4. Edit Annotations in Actions menu works

Expected results:
3. Click Save should add annotations successfully

Additional info:

Comment 1 Jon Jackson 2019-01-11 16:55:08 UTC
I was unable to reproduce this bug. I successfully created, edited, and deleted annotations using the 'Edit Annotations' modal that appears when selecting Actions -> Edit Annotations from the Overview sidebar. It seems to be working as expected.

Comment 2 Samuel Padgett 2019-01-17 14:11:24 UTC
I was able to reproduce:

Uncaught TypeError: Cannot read property 'apiVersion' of undefined
    at getK8sAPIPath (resource.js:9)
    at resourceURL (resource.js:29)
    at k8sPatch (resource.js:81)
    at TagsModal.push../public/components/modals/tags.jsx.TagsModal._submit (tags.jsx:52)
    at HTMLUnknownElement.callCallback (react-dom.development.js:104)
    at Object.invokeGuardedCallbackDev (react-dom.development.js:142)
    at Object.invokeGuardedCallback (react-dom.development.js:191)
    at Object.invokeGuardedCallbackAndCatchFirstError (react-dom.development.js:205)
    at executeDispatch (react-dom.development.js:470)
    at executeDispatchesInOrder (react-dom.development.js:492)

Comment 3 Samuel Padgett 2019-01-17 14:12:36 UTC
Note that this only happens when clicking the annotations link in the details, not through the Edit Annotations menu item.

Comment 4 Samuel Padgett 2019-01-17 14:33:24 UTC
The `apiVersion` property is not set in the resource we pass to `ResourceSummary`, which means we can't find the model for the resource.

Comment 5 Samuel Padgett 2019-01-17 16:29:20 UTC
https://github.com/openshift/console/pull/1099

Comment 6 Yadan Pei 2019-01-21 06:11:16 UTC
Latest console image (registry.svc.ci.openshift.org/ocp/4.0-art-latest-2019-01-18-115403@sha256:0c65f4d65acb6d7432637a33cdda6de8b23b5743706203f9fa58543530c26d21) in payload (4.0.0-0.alpha-2019-01-20-082408) doesn't include this fix, will verify on next 

$ oc image info registry.svc.ci.openshift.org/ocp/4.0-art-latest-2019-01-18-115403@sha256:0c65f4d65acb6d7432637a33cdda6de8b23b5743706203f9fa58543530c26d21
             io.openshift.source-repo-commit=2dc8614b6f0975fe579a21b2e2cedf1f186af8e4
             io.openshift.source-repo-url=https://github.com/openshift/console


$ git log 2dc8614b6f0975fe579a21b2e2cedf1f186af8e4 | grep '#1099'

Comment 7 Yadan Pei 2019-01-21 08:32:07 UTC
Issue has been fixed on origin, will check on next OCP build

Comment 8 Yadan Pei 2019-01-28 07:52:19 UTC
Verified on
$ oc get pods openshift-console-6d9974dd74-5hjqt -n openshift-console -o yaml | grep image
    image: quay.io/openshift-release-dev/ocp-v4.0-art-dev@sha256:a8f450c6f9047ab41cb624d5834e916e99c5d8ea43328211e40ec694363b8803
$ oc image info quay.io/openshift-release-dev/ocp-v4.0-art-dev@sha256:a8f450c6f9047ab41cb624d5834e916e99c5d8ea43328211e40ec694363b8803
             io.openshift.build.commit.id=5070df1f11d481f36152c0218f209a085eed9d64
             io.openshift.build.commit.url=https://github.com/openshift/console/commit/5070df1f11d481f36152c0218f209a085eed9d64

Edit Annotations works in overview details view


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