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

ODC-7735: Edit ci tests to have step to enable developer perspective #14684

Conversation

sanketpathak
Copy link
Contributor

@sanketpathak sanketpathak commented Jan 16, 2025

Description:

Fixing CI tests for the pr openshift/console-operator#954 to run green on CI

Story:

Checks for approving Epic scenarios Automation PR:

  • Execute the @to-do tagged gherkin scripts manually
  • Convert the @to-do gherkin scripts to cypress automation scripts
  • Once scripts are automated, replace tag @to-do with @epic-number
  • Execute the scripts in Remote cluster

Execution Commands:
Have a cluster and disable developer perspective in customization of console

export NO_HEADLESS=true && export CHROME_VERSION=$(/usr/bin/google-chrome-stable --version)
BRIDGE_KUBEADMIN_PASSWORD=YH3jN-PRFT2-Q429c-5KQDr
BRIDGE_BASE_ADDRESS=https://console-openshift-console.apps.dev-svc-4.8-042801.devcluster.openshift.com
export BRIDGE_KUBEADMIN_PASSWORD
export BRIDGE_BASE_ADDRESS
oc login -u kubeadmin -p $BRIDGE_KUBEADMIN_PASSWORD
oc apply -f ./frontend/packages/console-shared/src/test-data/htpasswd-secret.yaml
oc patch oauths cluster --patch "$(cat ./frontend/packages/console-shared/src/test-data/patch-htpasswd.yaml)" --type=merge
<!-- Under frontend folder run -->
./integration-tests/test-cypress.sh -p -console

Execute CI files in the following test packages:

./integration-tests/test-cypress.sh -p dev-console
./integration-tests/test-cypress.sh -p helm
./integration-tests/test-cypress.sh -p knative
./integration-tests/test-cypress.sh -p pipelines
./integration-tests/test-cypress.sh -p shipwright
./integration-tests/test-cypress.sh -p topology
./integration-tests/test-cypress.sh -p web-terminal

Screenshots:

Browser conformance:

  • Chrome
  • Firefox
  • Safari
  • Edge

@openshift-ci openshift-ci bot requested review from ppitonak and The-Anton January 16, 2025 07:40
@openshift-ci openshift-ci bot added component/dev-console Related to dev-console component/helm Related to helm-plugin approved Indicates a PR has been approved by an approver from all required OWNERS files. component/knative Related to knative-plugin component/pipelines Related to pipelines-plugin component/topology Related to topology labels Jan 16, 2025
@sanketpathak sanketpathak changed the title Edit ci tests to have step to enable developer perspective ODC-7735: Edit ci tests to have step to enable developer perspective Jan 16, 2025
@openshift-ci-robot
Copy link
Contributor

openshift-ci-robot commented Jan 16, 2025

@sanketpathak: This pull request references ODC-7735 which is a valid jira issue.

Warning: The referenced jira issue has an invalid target version for the target branch this PR targets: expected the sub-task to target the "4.19.0" version, but no target version was set.

In response to this:

Issue: https://issues.redhat.com/browse/ODC-7735

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 openshift-eng/jira-lifecycle-plugin repository.

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

openshift-ci-robot commented Jan 16, 2025

@sanketpathak: This pull request references ODC-7735 which is a valid jira issue.

Warning: The referenced jira issue has an invalid target version for the target branch this PR targets: expected the sub-task to target the "4.19.0" version, but no target version was set.

In response to this:

Issue: https://issues.redhat.com/browse/ODC-7718

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 openshift-eng/jira-lifecycle-plugin repository.

@@ -19,7 +20,14 @@ before(() => {
const bridgePasswordPassword: string = Cypress.env('BRIDGE_HTPASSWD_PASSWORD') || 'test';
cy.login(bridgePasswordIDP, bridgePasswordUsername, bridgePasswordPassword);
cy.document().its('readyState').should('eq', 'complete');
cy.exec(
`oc patch console.operator.openshift.io/cluster --type='merge' -p '{"spec":{"customization":{"perspectives":[{"id":"dev","visibility":{"state":"Enabled"}}]}}}'`,
{ failOnNonZeroExit: false },
Copy link
Member

@spadgett spadgett Jan 20, 2025

Choose a reason for hiding this comment

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

Why wouldn't we fail on non-zero codes?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

This was used for the case that each package(ODC) will be using this patch so to avoid any issue I used this, I'll update it

Comment on lines 10 to 12
cy.reload();
cy.document().its('readyState').should('eq', 'complete');
checkDeveloperPerspective(tries - 1);
Copy link
Member

Choose a reason for hiding this comment

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

It's probably better just to wait for the rollout using CLI commands after the oc patch

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Sure, I will find the rollout command and update the code

Comment on lines 22 to 29
cy.exec(
`oc patch console.operator.openshift.io/cluster --type='merge' -p '{"spec":{"customization":{"perspectives":[{"id":"dev","visibility":{"state":"Enabled"}}]}}}'`,
{ failOnNonZeroExit: false },
);
cy.reload(true);
cy.document().its('readyState').should('eq', 'complete');
guidedTour.close();
checkDeveloperPerspective();
Copy link
Member

Choose a reason for hiding this comment

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

Let's avoid duplicate code if we can (here and below)

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 these will be revamped based on your point here

@@ -19,7 +20,14 @@ before(() => {
const bridgePasswordPassword: string = Cypress.env('BRIDGE_HTPASSWD_PASSWORD') || 'test';
cy.login(bridgePasswordIDP, bridgePasswordUsername, bridgePasswordPassword);
cy.document().its('readyState').should('eq', 'complete');
cy.exec(
`oc patch console.operator.openshift.io/cluster --type='merge' -p '{"spec":{"customization":{"perspectives":[{"id":"dev","visibility":{"state":"Enabled"}}]}}}'`,
Copy link
Member

Choose a reason for hiding this comment

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

Is this only a stop-gap until we are able to update the tests?

We should be running most tests with default configuration if possible. I'd only expect a handful of tests to check the dev perspective works when enabled and the other tests be updated to use the admin perspective nav items to get to the same pages.

Copy link
Contributor Author

@sanketpathak sanketpathak Jan 21, 2025

Choose a reason for hiding this comment

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

Yes, I was thinking of this pr as a stop-gap to unblock the pr openshift/console-operator#954 but as admin tests are also being updated I will update the tests to point to the admin side of things wherever it can be used

Copy link
Member

Choose a reason for hiding this comment

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

Thanks @sanketpathak. There are a lot of test changes happening for the PF6 upgrade as well, so we should coordinate to avoid conflicts. @jhadvig @rhamilto FYI

@sanketpathak sanketpathak force-pushed the merge-admin-dev-perspective-ci-tests branch from 0268001 to 72901b1 Compare January 28, 2025 13:01
@openshift-ci openshift-ci bot added kind/cypress Related to Cypress e2e integration testing and removed approved Indicates a PR has been approved by an approver from all required OWNERS files. labels Jan 28, 2025
@sanketpathak sanketpathak force-pushed the merge-admin-dev-perspective-ci-tests branch from 72901b1 to f59261f Compare January 29, 2025 06:28
@openshift-ci-robot
Copy link
Contributor

openshift-ci-robot commented Jan 29, 2025

@sanketpathak: This pull request references ODC-7735 which is a valid jira issue.

Warning: The referenced jira issue has an invalid target version for the target branch this PR targets: expected the sub-task to target the "4.19.0" version, but no target version was set.

In response to this:

Description:

Fixing CI tests for the pr openshift/console-operator#954 to run green on CI

Story:

Checks for approving Epic scenarios Automation PR:

  • Execute the @to-do tagged gherkin scripts manually
  • Convert the @to-do gherkin scripts to cypress automation scripts
  • Once scripts are automated, replace tag @to-do with @epic-number
  • Execute the scripts in Remote cluster

Execution Commands:
Have a cluster and disable developer perspective in customization of console

export NO_HEADLESS=true && export CHROME_VERSION=$(/usr/bin/google-chrome-stable --version)
BRIDGE_KUBEADMIN_PASSWORD=YH3jN-PRFT2-Q429c-5KQDr
BRIDGE_BASE_ADDRESS=https://console-openshift-console.apps.dev-svc-4.8-042801.devcluster.openshift.com
export BRIDGE_KUBEADMIN_PASSWORD
export BRIDGE_BASE_ADDRESS
oc login -u kubeadmin -p $BRIDGE_KUBEADMIN_PASSWORD
oc apply -f ./frontend/packages/console-shared/src/test-data/htpasswd-secret.yaml
oc patch oauths cluster --patch "$(cat ./frontend/packages/console-shared/src/test-data/patch-htpasswd.yaml)" --type=merge

./integration-tests/test-cypress.sh -p -console

Execute CI files in the following test packages:

./integration-tests/test-cypress.sh -p dev-console
./integration-tests/test-cypress.sh -p helm
./integration-tests/test-cypress.sh -p knative
./integration-tests/test-cypress.sh -p pipelines
./integration-tests/test-cypress.sh -p shipwright
./integration-tests/test-cypress.sh -p topology
./integration-tests/test-cypress.sh -p web-terminal

Screenshots:

Browser conformance:

  • Chrome
  • Firefox
  • Safari
  • Edge

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 openshift-eng/jira-lifecycle-plugin repository.

Siteproxy
@sanketpathak sanketpathak force-pushed the merge-admin-dev-perspective-ci-tests branch 2 times, most recently from 8b0b1e1 to 3437be7 Compare January 29, 2025 21:13
@lokanandaprabhu
Copy link
Contributor

/retest

Copy link
Contributor

@lokanandaprabhu lokanandaprabhu left a comment

Choose a reason for hiding this comment

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

frontend/packages/dev-console/integration-tests/support/pages/add-flow/catalog-page.ts

I can see title referred as Developer Catalog.

Some of the tests fails due to this. We need to update all the references to Software Catalog.

Screenshot 2025-01-30 at 11 27 06 AM

@sanketpathak
Copy link
Contributor Author

@lokanandaprabhu The frontend/packages/dev-console/integration-tests/support/pages/add-flow/catalog-page.ts
file has Software catalog in the latest master

@sanketpathak
Copy link
Contributor Author

/retest

5 similar comments
@sanketpathak
Copy link
Contributor Author

/retest

@sanketpathak
Copy link
Contributor Author

/retest

@vikram-raj
Copy link
Member

/retest

@vikram-raj
Copy link
Member

/retest

@vikram-raj
Copy link
Member

/retest

@sanketpathak
Copy link
Contributor Author

/retest

1 similar comment
@sanketpathak
Copy link
Contributor Author

/retest

Copy link
Contributor

@lokanandaprabhu lokanandaprabhu left a comment

Choose a reason for hiding this comment

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

/lgtm

@openshift-ci openshift-ci bot added the lgtm Indicates that a PR is ready to be merged. label Feb 11, 2025
Copy link
Member

@vikram-raj vikram-raj left a comment

Choose a reason for hiding this comment

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

/approve

@openshift-ci openshift-ci bot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Feb 11, 2025
@vikram-raj
Copy link
Member

/label px-approved
/label docs-approved

@openshift-ci openshift-ci bot added px-approved Signifies that Product Support has signed off on this PR docs-approved Signifies that Docs has signed off on this PR labels Feb 11, 2025
@sanketpathak sanketpathak force-pushed the merge-admin-dev-perspective-ci-tests branch from c840b60 to e53787d Compare February 12, 2025 06:20
@openshift-ci openshift-ci bot removed the lgtm Indicates that a PR is ready to be merged. label Feb 12, 2025
@sanketpathak sanketpathak force-pushed the merge-admin-dev-perspective-ci-tests branch 3 times, most recently from 6307e79 to 93b1aef Compare February 13, 2025 13:14
@sanketpathak sanketpathak force-pushed the merge-admin-dev-perspective-ci-tests branch from 93b1aef to 5019fff Compare February 13, 2025 22:06
@sanketpathak
Copy link
Contributor Author

/test backend

Copy link
Contributor

@lokanandaprabhu lokanandaprabhu left a comment

Choose a reason for hiding this comment

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

/lgtm

@openshift-ci openshift-ci bot added the lgtm Indicates that a PR is ready to be merged. label Feb 14, 2025
Copy link
Contributor

openshift-ci bot commented Feb 14, 2025

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: lokanandaprabhu, sanketpathak, vikram-raj

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

@sanketpathak
Copy link
Contributor Author

/label qe-approved

@openshift-ci openshift-ci bot added the qe-approved Signifies that QE has signed off on this PR label Feb 14, 2025
@openshift-ci-robot
Copy link
Contributor

openshift-ci-robot commented Feb 14, 2025

@sanketpathak: This pull request references ODC-7735 which is a valid jira issue.

Warning: The referenced jira issue has an invalid target version for the target branch this PR targets: expected the sub-task to target the "4.19.0" version, but no target version was set.

In response to this:

Description:

Fixing CI tests for the pr openshift/console-operator#954 to run green on CI

Story:

Checks for approving Epic scenarios Automation PR:

  • Execute the @to-do tagged gherkin scripts manually
  • Convert the @to-do gherkin scripts to cypress automation scripts
  • Once scripts are automated, replace tag @to-do with @epic-number
  • Execute the scripts in Remote cluster

Execution Commands:
Have a cluster and disable developer perspective in customization of console

export NO_HEADLESS=true && export CHROME_VERSION=$(/usr/bin/google-chrome-stable --version)
BRIDGE_KUBEADMIN_PASSWORD=YH3jN-PRFT2-Q429c-5KQDr
BRIDGE_BASE_ADDRESS=https://console-openshift-console.apps.dev-svc-4.8-042801.devcluster.openshift.com
export BRIDGE_KUBEADMIN_PASSWORD
export BRIDGE_BASE_ADDRESS
oc login -u kubeadmin -p $BRIDGE_KUBEADMIN_PASSWORD
oc apply -f ./frontend/packages/console-shared/src/test-data/htpasswd-secret.yaml
oc patch oauths cluster --patch "$(cat ./frontend/packages/console-shared/src/test-data/patch-htpasswd.yaml)" --type=merge

./integration-tests/test-cypress.sh -p -console

Execute CI files in the following test packages:

./integration-tests/test-cypress.sh -p dev-console
./integration-tests/test-cypress.sh -p helm
./integration-tests/test-cypress.sh -p knative
./integration-tests/test-cypress.sh -p pipelines
./integration-tests/test-cypress.sh -p shipwright
./integration-tests/test-cypress.sh -p topology
./integration-tests/test-cypress.sh -p web-terminal

Screenshots:

Browser conformance:

  • Chrome
  • Firefox
  • Safari
  • Edge

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 openshift-eng/jira-lifecycle-plugin repository.

@sanketpathak
Copy link
Contributor Author

/label acknowledge-critical-fixes-only

@openshift-ci openshift-ci bot added the acknowledge-critical-fixes-only Indicates if the issuer of the label is OK with the policy. label Feb 14, 2025
@openshift-ci-robot
Copy link
Contributor

/retest-required

Remaining retests: 0 against base HEAD c6025b4 and 2 for PR HEAD 5019fff in total

Copy link
Contributor

openshift-ci bot commented Feb 14, 2025

@sanketpathak: 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-sigs/prow repository. I understand the commands that are listed here.

@openshift-merge-bot openshift-merge-bot bot merged commit fd129e6 into openshift:master Feb 15, 2025
7 checks passed
@openshift-bot
Copy link
Contributor

[ART PR BUILD NOTIFIER]

Distgit: openshift-enterprise-console
This PR has been included in build openshift-enterprise-console-container-v4.19.0-202502150439.p0.gfd129e6.assembly.stream.el9.
All builds following this will include this PR.

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/dev-console Related to dev-console component/helm Related to helm-plugin component/knative Related to knative-plugin component/pipelines Related to pipelines-plugin component/topology Related to topology docs-approved Signifies that Docs has signed off on this PR jira/valid-reference Indicates that this PR references a valid Jira ticket of any type. kind/cypress Related to Cypress e2e integration testing 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.

6 participants