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

RHIDP-2128 [Test automation] Establish AKS nightly tests #1472

Open
wants to merge 42 commits into
base: main
Choose a base branch
from

Conversation

zdrapela
Copy link
Member

@zdrapela zdrapela commented Aug 8, 2024

Description

This PR is making it possible to test RHDH installation on AKS. E2E tests are limited to those that run immediately without further configuration of the cluster (skipped tests defined in: e2e-tests/playwright.config.ts). GitHub would be working, but we reached the maximum number of callback URLs.

To distinguish which configuration should be applied, the if [[ "$JOB_NAME" == *aks* ]] condition is used in .ibm/pipelines/openshift-ci-tests.sh.

It uses different value file for AKS instance: .ibm/pipelines/value_files/values_showcase_AKS.yaml

This PR adds the Azure CLI to the Dockerfile. The AKS test uses it to start the cluster and then to stop it after the test finishes. The account for Azure CLI was established using https://github.com/adrianriobo/mapt/blob/fix-272/hacks/azure/azure_setup.sh

I'm switching the analytics plugin test so:

  • in non-RBAC it is disabled
  • in RBAC it is enabled
    Testing, that it is disabled, is more important and this switch makes it possible to run this test on AKS straight away.

Which issue(s) does this PR fix

PR acceptance criteria

Please make sure that the following steps are complete:

  • GitHub Actions are completed and successful
  • Unit Tests are updated and passing
  • E2E Tests are updated and passing
  • Documentation is updated if necessary (requirement for new features)
  • Add a screenshot if the change is UX/UI related

How to test changes / Special notes to the reviewer

Copy link

openshift-ci bot commented Aug 8, 2024

Skipping CI for Draft Pull Request.
If you want CI signal for your change, please convert it to an actual PR.
You can still manually trigger a test run with /test all

@zdrapela
Copy link
Member Author

zdrapela commented Aug 8, 2024

/test all

Copy link
Contributor

github-actions bot commented Aug 8, 2024

The image is available at: quay.io/janus-idp/backstage-showcase:pr-1472!

@zdrapela
Copy link
Member Author

zdrapela commented Aug 8, 2024

/test all

Copy link
Contributor

github-actions bot commented Aug 8, 2024

The image is available at: quay.io/janus-idp/backstage-showcase:pr-1472!

@zdrapela
Copy link
Member Author

zdrapela commented Aug 8, 2024

/test all

Copy link
Contributor

github-actions bot commented Aug 8, 2024

The image is available at: quay.io/janus-idp/backstage-showcase:pr-1472!

@zdrapela
Copy link
Member Author

zdrapela commented Aug 8, 2024

/test all

@zdrapela zdrapela changed the title [WIP] AKS nightly e2e tests [WIP] RHIDP-2128 [Test automation] Establish AKS nightly tests Aug 8, 2024
Copy link
Contributor

github-actions bot commented Aug 8, 2024

The image is available at: quay.io/janus-idp/backstage-showcase:pr-1472!

1 similar comment
Copy link
Contributor

github-actions bot commented Aug 8, 2024

The image is available at: quay.io/janus-idp/backstage-showcase:pr-1472!

@zdrapela
Copy link
Member Author

zdrapela commented Aug 8, 2024

/test all

Copy link
Contributor

github-actions bot commented Aug 8, 2024

The image is available at: quay.io/janus-idp/backstage-showcase:pr-1472!

@zdrapela
Copy link
Member Author

zdrapela commented Aug 9, 2024

/test all

@@ -14,6 +14,7 @@
"showcase-rbac-1-2-x": "playwright test --project=showcase-rbac",
"showcase-ci-nightly": "playwright test --project=showcase",
"showcase-rbac-nightly": "playwright test --project=showcase-rbac",
"showcase-aks-ci-nightly": "playwright test --project=showcase-aks",
Copy link
Member

Choose a reason for hiding this comment

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

We can use existing showcase-ci-nightly and showcase-rbac-nightly

@@ -62,6 +62,25 @@ export default defineConfig({
'**/playwright/e2e/verify-tls-config-with-external-postgres-db.spec.ts',
],
},
{
name: 'showcase-aks',
Copy link
Member

Choose a reason for hiding this comment

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

any specific idea to have new project? I guess we want to run all tests on AKS.

Copy link
Member Author

Choose a reason for hiding this comment

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

I've got a two reasons for that:

  • we can start running tests on AKS before we do the manual setup that is needed for running all the tests (RHIDP-2128 demands installation and Azure integration tests only)
  • I believe that some tests might break only on AKS and it is good to have an option to disable them only for AKS

Copy link
Member

Choose a reason for hiding this comment

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

Agree, lets keep this way then.

Copy link
Member

Choose a reason for hiding this comment

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

I guess we are good with using existing value files for rbac and non-rbac. creating new value files will make things complex in future.

Copy link
Member Author

Choose a reason for hiding this comment

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

The config for AKS is slightly different. We might use the same file, but we will have to change it through the Helm install. I agree that maintaining two value files is worse than one. It is not that much values so it can be possible to change the values through the Helm install for AKS and use just one values file (well, one for non-RBAC, one for RBAC).

Screenshot 2024-08-09 at 10 36 52

Copy link
Member Author

Choose a reason for hiding this comment

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

I added diff-values_showcase_AKS.yaml file instead and use the values_showcase.yaml as a base. Both of the files are applied by helm upgrade -i https://github.com/janus-idp/backstage-showcase/pull/1472/files#diff-4d6549ba4c59a94aab379c14838198870ef2e610c26348b6c58c6fbffedc479bR372

echo "OCP version: $(oc version)"

API_SERVER_URL=$(oc whoami --show-server)
K8S_CLUSTER_ROUTER_BASE=$(oc get route console -n openshift-console -o=jsonpath='{.spec.host}' | sed 's/^[^.]*\.//')
if [[ "$JOB_NAME" == *aks* ]]; then
K8S_CLUSTER_ROUTER_BASE=$(kubectl get svc nginx --namespace app-routing-system -o jsonpath='{.status.loadBalancer.ingress[0].ip}')
Copy link
Member

@subhashkhileri subhashkhileri Aug 9, 2024

Choose a reason for hiding this comment

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

what if there is no nginx running, It will fail here.

Copy link
Member Author

Choose a reason for hiding this comment

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

I agree that it would be better to make sure it runs and enable it if it's not. As it is now, enabling it would be a manual step for setting up the cluster before using it for running tests.

Copy link
Member Author

Choose a reason for hiding this comment

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

@@ -360,23 +398,32 @@ main() {
NAME_SPACE="showcase-ci-nightly"
NAME_SPACE_RBAC="showcase-rbac-nightly"
NAME_SPACE_POSTGRES_DB="postgress-external-db-nightly"
NAME_SPACE_AKS="showcase-aks-ci-nightly"
Copy link
Member

Choose a reason for hiding this comment

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

new namespace is not needed, I guess idea is to deploy existing namespace showcase-ci-nightly and showcase-rbac-nightly on AKS cluster.

Copy link
Member Author

Choose a reason for hiding this comment

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

Right now, project that yarn runs the playwright tests for depends on the namespace name. So if we want different project for AKS, we need a different namespace, or change the script to use different value for that

"showcase-aks-ci-nightly": "playwright test --project=showcase-aks",

@zdrapela
Copy link
Member Author

zdrapela commented Sep 3, 2024

/test all

Copy link
Contributor

github-actions bot commented Sep 3, 2024

The image is available at: quay.io/janus-idp/backstage-showcase:pr-1472!

1 similar comment
Copy link
Contributor

github-actions bot commented Sep 4, 2024

The image is available at: quay.io/janus-idp/backstage-showcase:pr-1472!

@zdrapela
Copy link
Member Author

zdrapela commented Sep 4, 2024

/test all

Copy link
Contributor

github-actions bot commented Sep 4, 2024

The image is available at: quay.io/janus-idp/backstage-showcase:pr-1472!

Copy link

sonarcloud bot commented Sep 12, 2024

Copy link

openshift-ci bot commented Sep 12, 2024

@zdrapela: The following test failed, say /retest to rerun all failed tests or /retest-required to rerun all mandatory failed tests:

Test name Commit Details Required Rerun command
ci/prow/e2e-tests b49679c link true /test e2e-tests

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.

Copy link
Contributor

The image is available at: quay.io/janus-idp/backstage-showcase:pr-1472!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants