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

OCPBUGS-18348: Add deprecation alert for DeploymentConfig #12968

Conversation

avivtur
Copy link
Contributor

@avivtur avivtur commented Jul 5, 2023

@openshift-ci-robot openshift-ci-robot added the jira/valid-reference Indicates that this PR references a valid Jira ticket of any type. label Jul 5, 2023
@openshift-ci-robot
Copy link
Contributor

openshift-ci-robot commented Jul 5, 2023

@avivtur: This pull request references OCPSTRAT-118 which is a valid jira issue.

In response to this:

Adding an alert for deprecation of DeploymentConfig.

More info:
Jira issue: https://issues.redhat.com/browse/OCPSTRAT-118
UX design doc: https://docs.google.com/document/d/1FXxHcsC8llE5IEFJmU3RTYDQBP9-dao718pEwAzKGQw/edit

Demo:
dc-create-yaml-deprecated
dc-create-form-deprecated
dc-empty-table-deprecated
dc-table-deprecated
dc-details-deprecated

TODO:

  • add URL for the "Learn more" link button

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.

@avivtur avivtur force-pushed the depracate-alert-deployment-config branch from 96f817b to 3db9cfa Compare July 5, 2023 07:28
@openshift-ci openshift-ci bot added component/core Related to console core functionality component/dev-console Related to dev-console kind/i18n Indicates issue or PR relates to internationalization or has content that needs to be translated labels Jul 5, 2023
@jhadvig jhadvig changed the title OCPSTRAT-118: Add deprecation alert for DeploymentConfig CONSOLE-3708: Add deprecation alert for DeploymentConfig Jul 11, 2023
@openshift-ci-robot
Copy link
Contributor

openshift-ci-robot commented Jul 11, 2023

@avivtur: This pull request references CONSOLE-3708 which is a valid jira issue.

In response to this:

Adding an alert for deprecation of DeploymentConfig.

More info:
Jira issue: https://issues.redhat.com/browse/OCPSTRAT-118
UX design doc: https://docs.google.com/document/d/1FXxHcsC8llE5IEFJmU3RTYDQBP9-dao718pEwAzKGQw/edit

Demo:
dc-create-yaml-deprecated
dc-create-form-deprecated
dc-empty-table-deprecated
dc-table-deprecated
dc-details-deprecated

TODO:

  • add URL for the "Learn more" link button

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.

@jhadvig
Copy link
Member

jhadvig commented Jul 17, 2023

@opayne1 could you please help to formulate the info alerts text here.
TBH Im not a big fan a alert that starts with We're or We'll. Also we should be avoiding abbreviations and also this type of generalisation.

Copy link
Contributor

@opayne1 opayne1 left a comment

Choose a reason for hiding this comment

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

@jhadvig Added a suggestion! Let me know if you would like to discuss more 😄

frontend/public/components/deployment-config.tsx Outdated Show resolved Hide resolved
@avivtur avivtur force-pushed the depracate-alert-deployment-config branch from 3db9cfa to 8a4e32c Compare July 20, 2023 12:47
@openshift-ci-robot
Copy link
Contributor

openshift-ci-robot commented Jul 20, 2023

@avivtur: This pull request references CONSOLE-3708 which is a valid jira issue.

In response to this:

Adding an alert for deprecation of DeploymentConfig.

More info:
Jira issue: https://issues.redhat.com/browse/OCPSTRAT-118
UX design doc: https://docs.google.com/document/d/1FXxHcsC8llE5IEFJmU3RTYDQBP9-dao718pEwAzKGQw/edit

Demo:
dc-deprecation4
dc-deprecation3
dc-deprecation2
dc-deprecation

Learn more URL:
https://access.redhat.com/documentation/en-us/openshift_container_platform/4.13/html/building_applications/deployments#doc-wrapper
TODO:

  • add URL for the "Learn more" link button

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.

@avivtur avivtur force-pushed the depracate-alert-deployment-config branch from 8a4e32c to 5c55307 Compare July 20, 2023 13:01
Copy link
Member

@jhadvig jhadvig left a comment

Choose a reason for hiding this comment

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

Sorry for not adding these sooner.

frontend/public/components/deployment-config.tsx Outdated Show resolved Hide resolved
frontend/public/components/deployment-config.tsx Outdated Show resolved Hide resolved
@avivtur avivtur force-pushed the depracate-alert-deployment-config branch from 5c55307 to 04a8fe5 Compare July 20, 2023 13:36
Copy link
Contributor

@opayne1 opayne1 left a comment

Choose a reason for hiding this comment

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

/label docs-approved

@openshift-ci openshift-ci bot added the docs-approved Signifies that Docs has signed off on this PR label Jul 20, 2023
Copy link
Member

@jhadvig jhadvig left a comment

Choose a reason for hiding this comment

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

Thanks @avivtur, PR looks good 👍
/lgtm
/approve

@jhadvig
Copy link
Member

jhadvig commented Jul 20, 2023

QE Approver:

/assign @yanpzhan
PX Approver:
/assign @RickJWagner

@openshift-ci openshift-ci bot added lgtm Indicates that a PR is ready to be merged. approved Indicates a PR has been approved by an approver from all required OWNERS files. labels Jul 20, 2023
@avivtur
Copy link
Contributor Author

avivtur commented Jul 23, 2023

/retest

@jhadvig
Copy link
Member

jhadvig commented Jul 24, 2023

Logging in as kubeadmin
      Installing operator: "Red Hat OpenShift Serverless"
      Operator Red Hat OpenShift Serverless was not yet installed.
      Performing Serverless post installation steps
  1) "before all" hook for "Create knative workload using Container image with extrenal registry on Add page: KN-05-TC05 (example #1)"
  0 passing (3m)
  1 failing
  1) Perform actions on knative service and revision
       "before all" hook for "Create knative workload using Container image with extrenal registry on Add page: KN-05-TC05 (example #1)":
     AssertionError: Timed out retrying after 40000ms: Expected to find element: `[data-test="dropdown-menu-item-link"]`, but never found it. Queried from element: <div.pf-c-menu.pf-m-scrollable.co-namespace-dropdown__menu>
Because this error occurred during a `before all` hook we are skipping all of the remaining tests.
      at Object.selectProject (https://console-openshift-console.apps.ci-op-h5gshjvp-75d12.xxxxxxxxxxxxxxxxxxxxxx/__cypress/tests?p=support/commands/index.ts:57116:14)
      at createKnativeServing (https://console-openshift-console.apps.ci-op-h5gshjvp-75d12.xxxxxxxxxxxxxxxxxxxxxx/__cypress/tests?p=support/commands/index.ts:57875:28)
      at performPostInstallationSteps (https://console-openshift-console.apps.ci-op-h5gshjvp-75d12.xxxxxxxxxxxxxxxxxxxxxx/__cypress/tests?p=support/commands/index.ts:57755:61)
      at verifyAndInstallOperator (https://console-openshift-console.apps.ci-op-h5gshjvp-75d12.xxxxxxxxxxxxxxxxxxxxxx/__cypress/tests?p=support/commands/index.ts:57796:5)
      at verifyAndInstallKnativeOperator (https://console-openshift-console.apps.ci-op-h5gshjvp-75d12.xxxxxxxxxxxxxxxxxxxxxx/__cypress/tests?p=support/commands/index.ts:57806:42)
      at Context.eval (https://console-openshift-console.apps.ci-op-h5gshjvp-75d12.xxxxxxxxxxxxxxxxxxxxxx/__cypress/tests?p=support/commands/index.ts:62979:49)

/retest

Copy link

@RickJWagner RickJWagner left a comment

Choose a reason for hiding this comment

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

Just one question. Is peaceful light blue the correct color for a deprecation? It seems on the 'all is well' side of the spectrum, while light red or orange might better signal 'Hey, you'd better take care of this!'
Just questioning-- hopefully our UI SMEs will have already considered this.

@RickJWagner RickJWagner removed their assignment Jul 24, 2023
@openshift-ci-robot openshift-ci-robot added the jira/invalid-bug Indicates that a referenced Jira bug is invalid for the branch this PR is targeting. label Aug 30, 2023
@openshift-ci-robot
Copy link
Contributor

@avivtur: This pull request references Jira Issue OCPBUGS-18348, which is invalid:

  • expected the bug to target the "4.14.0" version, but no target version was set

Comment /jira refresh to re-evaluate validity if changes to the Jira bug are made, or edit the title of this pull request to link to a different bug.

The bug has been updated to refer to the pull request using the external bug tracker.

In response to this:

Adding an alert for deprecation of DeploymentConfig.

More info:
Jira issue: https://issues.redhat.com/browse/OCPSTRAT-118
UX design doc: https://docs.google.com/document/d/1FXxHcsC8llE5IEFJmU3RTYDQBP9-dao718pEwAzKGQw/edit

Demo:
dc-deprecation4
dc-deprecation3
dc-deprecation2
dc-deprecation
dc-deprecation-topology

Learn more URL:
https://access.redhat.com/documentation/en-us/openshift_container_platform/4.13/html/building_applications/deployments#doc-wrapper
TODO:

  • add URL for the "Learn more" link button

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.

@jhadvig
Copy link
Member

jhadvig commented Aug 30, 2023

/jira refresh
/retest

@jhadvig
Copy link
Member

jhadvig commented Aug 30, 2023

/label acknowledge-critical-fixes-only
/lgtm

@openshift-ci-robot
Copy link
Contributor

@jhadvig: This pull request references Jira Issue OCPBUGS-18348, which is invalid:

  • expected the bug to target the "4.14.0" version, but no target version was set

Comment /jira refresh to re-evaluate validity if changes to the Jira bug are made, or edit the title of this pull request to link to a different bug.

In response to this:

/jira refresh
/retest

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.

@jhadvig
Copy link
Member

jhadvig commented Aug 30, 2023

/jira refresh

@openshift-ci-robot openshift-ci-robot added jira/valid-bug Indicates that a referenced Jira bug is valid for the branch this PR is targeting. and removed jira/invalid-bug Indicates that a referenced Jira bug is invalid for the branch this PR is targeting. labels Aug 30, 2023
@openshift-ci-robot
Copy link
Contributor

@jhadvig: This pull request references Jira Issue OCPBUGS-18348, which is valid. The bug has been moved to the POST state.

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

Requesting review from QA contact:
/cc @XiyunZhao

In response to this:

/jira refresh

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 openshift-ci bot requested a review from XiyunZhao August 30, 2023 18:37
@openshift-ci openshift-ci bot added acknowledge-critical-fixes-only Indicates if the issuer of the label is OK with the policy. lgtm Indicates that a PR is ready to be merged. labels Aug 30, 2023
@openshift-ci-robot
Copy link
Contributor

/retest-required

Remaining retests: 0 against base HEAD 1160582 and 2 for PR HEAD 5b6283f in total

@openshift-ci-robot
Copy link
Contributor

/retest-required

Remaining retests: 0 against base HEAD 48a6d12 and 1 for PR HEAD 5b6283f in total

@jhadvig
Copy link
Member

jhadvig commented Sep 1, 2023

/retest

@jerolimov
Copy link
Member

Hey @avivtur @jhadvig,

I looked into why the Helm E2e job fails. Here is what I have done so far:

When you click in the latest CI job https://prow.ci.openshift.org/view/gs/origin-ci-test/pr-logs/pull/openshift_console/12968/pull-ci-openshift-console-master-e2e-gcp-console/1697364072602800128 on artifacts and follow this path to the screenshots, you can see multiple screenshots that shows that the topology crashes with this change: https://gcsweb-ci.apps.ci.l2s4.p1.openshiftapps.com/gcs/origin-ci-test/pr-logs/pull/openshift_console/12968/pull-ci-openshift-console-master-e2e-gcp-console/1697364072602800128/artifacts/e2e-gcp-console/test/artifacts/gui_test_screenshots/cypress/screenshots/helm-release.feature/

image

I will check out the PR to investigate why this happened and how this is related to this change. Until then, let's hold this PR please.

/hold

@openshift-ci openshift-ci bot added the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Sep 1, 2023
@@ -16,6 +18,11 @@ const SideBarHeading: React.FC<{ element: GraphElement }> = ({ element }) => {
<TopologyActions element={element} />
</div>
</h1>
{element.getData().resource.kind === DeploymentConfigModel.kind && (
Copy link
Member

@jerolimov jerolimov Sep 1, 2023

Choose a reason for hiding this comment

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

Hey @avivtur, the crash I mentioned above happens here, when the user selects a Helm Chart.

And the e2e test failed because it imports a Helm Chart (the Nodejs one from the Helm catalog) and then automatically selects the created Helm Chart. And then the error page is shown and Cypress waits to find the elements its looking for.

So the right way is to harden this code so that it doesn't crash.

The problem is that a Helm chart is not a k8s resource and so the getData() method doesn't return one. (It's mostly saved in a Secret, but there are other options.)

TypeError: Cannot read properties of undefined (reading 'kind')

Component trace:
at SideBarHeading (http://localhost:12968/static/dev-console/code-refs/topology~overview-list-page-f3b1fecca527617e2d8b.js:3145:27)

In this case, resource is undefined. But in other cases getData() could also return undefined, based on the type definition of this GraphElement.

So I recommend that you add a new variable at the beginning of the component:

  const resourceKind = element.getData()?.resource?.kind;

And then using this here:

Suggested change
{element.getData().resource.kind === DeploymentConfigModel.kind && (
{resourceKind === DeploymentConfigModel.kind && (

Of course, you can add this optional check also inline.


And FYI: The reason why it also crashes when you load the /topology after that is because we're saving the latest selection.

Copy link
Contributor Author

@avivtur avivtur Sep 3, 2023

Choose a reason for hiding this comment

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

@jerolimov Hi there 😄
Thank you very much for looking into this issue and for the very detailed explanation 💯
I'll change my code according to it

Signed-off-by: Aviv Turgeman <aturgema@redhat.com>
@avivtur avivtur force-pushed the depracate-alert-deployment-config branch from 5b6283f to b284167 Compare September 3, 2023 08:28
@openshift-ci openshift-ci bot removed the lgtm Indicates that a PR is ready to be merged. label Sep 3, 2023
@jerolimov
Copy link
Member

Force pushed changes looks good to me 👍

/retest
/unhold

@openshift-ci openshift-ci bot removed the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Sep 4, 2023
Copy link
Member

@jerolimov jerolimov left a comment

Choose a reason for hiding this comment

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

I tested this locally again and it works fine.

/lgtm

@openshift-ci openshift-ci bot added the lgtm Indicates that a PR is ready to be merged. label Sep 4, 2023
@openshift-ci
Copy link
Contributor

openshift-ci bot commented Sep 4, 2023

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: avivtur, jerolimov, jhadvig

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
Copy link
Contributor

openshift-ci bot commented Sep 4, 2023

@avivtur: all tests passed!

Full PR test history. Your PR dashboard.

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. I understand the commands that are listed here.

@openshift-merge-robot openshift-merge-robot merged commit cd8e893 into openshift:master Sep 4, 2023
6 checks passed
@openshift-ci-robot
Copy link
Contributor

@avivtur: Jira Issue OCPBUGS-18348: All pull requests linked via external trackers have merged:

Jira Issue OCPBUGS-18348 has been moved to the MODIFIED state.

In response to this:

Adding an alert for deprecation of DeploymentConfig.

More info:
Jira issue: https://issues.redhat.com/browse/OCPSTRAT-118
UX design doc: https://docs.google.com/document/d/1FXxHcsC8llE5IEFJmU3RTYDQBP9-dao718pEwAzKGQw/edit

Demo:
dc-deprecation4
dc-deprecation3
dc-deprecation2
dc-deprecation
dc-deprecation-topology

Learn more URL:
https://access.redhat.com/documentation/en-us/openshift_container_platform/4.13/html/building_applications/deployments#doc-wrapper
TODO:

  • add URL for the "Learn more" link button

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
acknowledge-critical-fixes-only Indicates if the issuer of the label is OK with the policy. approved Indicates a PR has been approved by an approver from all required OWNERS files. component/core Related to console core functionality component/dev-console Related to dev-console component/topology Related to topology docs-approved Signifies that Docs has signed off on this PR jira/valid-bug Indicates that a referenced Jira bug is valid for the branch this PR is targeting. jira/valid-reference Indicates that this PR references a valid Jira ticket of any type. kind/i18n Indicates issue or PR relates to internationalization or has content that needs to be translated lgtm Indicates that a PR is ready to be merged. px-approved Signifies that Product Support has signed off on this PR qe-approved Signifies that QE has signed off on this PR
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

10 participants