From 4bb0a838d11fa48785edd1d706b97284bc46ed31 Mon Sep 17 00:00:00 2001 From: Gustavo Lira Date: Fri, 9 Jan 2026 13:00:26 -0300 Subject: [PATCH 1/5] fix: move orchestrator tests to nightly-only and fix log functions in subshells - Skip orchestrator E2E tests in mandatory PR job (e2e-ocp-helm) to speed up PRs - Skip orchestrator-infra chart installation in PR jobs - Skip orchestrator workflows deployment in PR jobs - Add PR-specific Helm values that disable orchestrator plugins and config - Export log functions in log.sh to make them available in subshells (fixes 'command not found' errors) - Update CI documentation to reflect orchestrator is nightly-only - Orchestrator tests continue running in all nightly jobs with full coverage This change reduces PR job execution time by avoiding unnecessary orchestrator infrastructure setup while maintaining complete orchestrator test coverage in nightly runs across all platforms (OCP, AKS, EKS, GKE). --- .ibm/pipelines/utils.sh | 74 +++++++++++++++---- .../diff-values_showcase-rbac_PR.yaml | 19 +++++ .../value_files/diff-values_showcase_PR.yaml | 19 +++++ docs/e2e-tests/CI.md | 28 ++++--- e2e-tests/playwright.config.ts | 7 ++ 5 files changed, 117 insertions(+), 30 deletions(-) create mode 100644 .ibm/pipelines/value_files/diff-values_showcase-rbac_PR.yaml create mode 100644 .ibm/pipelines/value_files/diff-values_showcase_PR.yaml diff --git a/.ibm/pipelines/utils.sh b/.ibm/pipelines/utils.sh index b3a5ed1a7f..79f197f173 100755 --- a/.ibm/pipelines/utils.sh +++ b/.ibm/pipelines/utils.sh @@ -82,6 +82,10 @@ yq_merge_value_files() { fi } +is_pr_e2e_ocp_helm_job() { + [[ "${JOB_NAME}" == *pull* ]] && [[ "${JOB_NAME}" == *e2e-ocp-helm* ]] +} + # Waits for a Kubernetes/OpenShift deployment to become ready within a specified timeout period wait_for_deployment() { local namespace=$1 @@ -945,11 +949,12 @@ cluster_setup_ocp_helm() { install_pipelines_operator install_crunchy_postgres_ocp_operator - # Skip orchestrator infra installation on OSD-GCP due to infrastructure limitations - if [[ ! "${JOB_NAME}" =~ osd-gcp ]]; then - install_orchestrator_infra_chart + # Skip orchestrator infra installation on OSD-GCP due to infrastructure limitations. + # Also skip it for the mandatory PR job (e2e-ocp-helm) to speed up presubmits. + if [[ "${JOB_NAME}" =~ osd-gcp ]] || is_pr_e2e_ocp_helm_job; then + echo "Skipping orchestrator-infra installation on this job: ${JOB_NAME}" else - echo "Skipping orchestrator-infra installation on OSD-GCP environment" + install_orchestrator_infra_chart fi # then wait for the right status one by one @@ -1056,9 +1061,27 @@ base_deployment() { local rhdh_base_url="https://${RELEASE_NAME}-developer-hub-${NAME_SPACE}.${K8S_CLUSTER_ROUTER_BASE}" apply_yaml_files "${DIR}" "${NAME_SPACE}" "${rhdh_base_url}" log::info "Deploying image from repository: ${QUAY_REPO}, TAG_NAME: ${TAG_NAME}, in NAME_SPACE: ${NAME_SPACE}" - perform_helm_install "${RELEASE_NAME}" "${NAME_SPACE}" "${HELM_CHART_VALUE_FILE_NAME}" - deploy_orchestrator_workflows "${NAME_SPACE}" + if is_pr_e2e_ocp_helm_job; then + local merged_pr_value_file="/tmp/merged-values_showcase_PR.yaml" + yq_merge_value_files "merge" "${DIR}/value_files/${HELM_CHART_VALUE_FILE_NAME}" "${DIR}/value_files/diff-values_showcase_PR.yaml" "${merged_pr_value_file}" + mkdir -p "${ARTIFACT_DIR}/${NAME_SPACE}" + cp -a "${merged_pr_value_file}" "${ARTIFACT_DIR}/${NAME_SPACE}/" || true + # shellcheck disable=SC2046 + helm upgrade -i "${RELEASE_NAME}" -n "${NAME_SPACE}" \ + "${HELM_CHART_URL}" --version "${CHART_VERSION}" \ + -f "${merged_pr_value_file}" \ + --set global.clusterRouterBase="${K8S_CLUSTER_ROUTER_BASE}" \ + $(get_image_helm_set_params) + else + perform_helm_install "${RELEASE_NAME}" "${NAME_SPACE}" "${HELM_CHART_VALUE_FILE_NAME}" + fi + + if is_pr_e2e_ocp_helm_job; then + log::warn "Skipping orchestrator workflows deployment on PR job: ${JOB_NAME}" + else + deploy_orchestrator_workflows "${NAME_SPACE}" + fi } rbac_deployment() { @@ -1070,20 +1093,41 @@ rbac_deployment() { local rbac_rhdh_base_url="https://${RELEASE_NAME_RBAC}-developer-hub-${NAME_SPACE_RBAC}.${K8S_CLUSTER_ROUTER_BASE}" apply_yaml_files "${DIR}" "${NAME_SPACE_RBAC}" "${rbac_rhdh_base_url}" log::info "Deploying image from repository: ${QUAY_REPO}, TAG_NAME: ${TAG_NAME}, in NAME_SPACE: ${RELEASE_NAME_RBAC}" - perform_helm_install "${RELEASE_NAME_RBAC}" "${NAME_SPACE_RBAC}" "${HELM_CHART_RBAC_VALUE_FILE_NAME}" + if is_pr_e2e_ocp_helm_job; then + local merged_pr_rbac_value_file="/tmp/merged-values_showcase-rbac_PR.yaml" + yq_merge_value_files "merge" "${DIR}/value_files/${HELM_CHART_RBAC_VALUE_FILE_NAME}" "${DIR}/value_files/diff-values_showcase-rbac_PR.yaml" "${merged_pr_rbac_value_file}" + mkdir -p "${ARTIFACT_DIR}/${NAME_SPACE_RBAC}" + cp -a "${merged_pr_rbac_value_file}" "${ARTIFACT_DIR}/${NAME_SPACE_RBAC}/" || true + # shellcheck disable=SC2046 + helm upgrade -i "${RELEASE_NAME_RBAC}" -n "${NAME_SPACE_RBAC}" \ + "${HELM_CHART_URL}" --version "${CHART_VERSION}" \ + -f "${merged_pr_rbac_value_file}" \ + --set global.clusterRouterBase="${K8S_CLUSTER_ROUTER_BASE}" \ + $(get_image_helm_set_params) + else + perform_helm_install "${RELEASE_NAME_RBAC}" "${NAME_SPACE_RBAC}" "${HELM_CHART_RBAC_VALUE_FILE_NAME}" + fi # NOTE: This is a workaround to allow the sonataflow platform to connect to the external postgres db using ssl. - # Wait for the sonataflow database creation job to complete with robust error handling - if ! wait_for_job_completion "${NAME_SPACE_RBAC}" "${RELEASE_NAME_RBAC}-create-sonataflow-database" 10 10; then - echo "❌ Failed to create sonataflow database. Aborting RBAC deployment." - return 1 + if is_pr_e2e_ocp_helm_job; then + log::warn "Skipping sonataflow (orchestrator) external DB SSL workaround on PR job: ${JOB_NAME}" + else + # Wait for the sonataflow database creation job to complete with robust error handling + if ! wait_for_job_completion "${NAME_SPACE_RBAC}" "${RELEASE_NAME_RBAC}-create-sonataflow-database" 10 10; then + echo "❌ Failed to create sonataflow database. Aborting RBAC deployment." + return 1 + fi + oc -n "${NAME_SPACE_RBAC}" patch sfp sonataflow-platform --type=merge \ + -p '{"spec":{"services":{"jobService":{"podTemplate":{"container":{"env":[{"name":"QUARKUS_DATASOURCE_REACTIVE_URL","value":"postgresql://postgress-external-db-primary.postgress-external-db.svc.cluster.local:5432/sonataflow?search_path=jobs-service&sslmode=require&ssl=true&trustAll=true"},{"name":"QUARKUS_DATASOURCE_REACTIVE_SSL_MODE","value":"require"},{"name":"QUARKUS_DATASOURCE_REACTIVE_TRUST_ALL","value":"true"}]}}}}}}' + oc rollout restart deployment/sonataflow-platform-jobs-service -n "${NAME_SPACE_RBAC}" fi - oc -n "${NAME_SPACE_RBAC}" patch sfp sonataflow-platform --type=merge \ - -p '{"spec":{"services":{"jobService":{"podTemplate":{"container":{"env":[{"name":"QUARKUS_DATASOURCE_REACTIVE_URL","value":"postgresql://postgress-external-db-primary.postgress-external-db.svc.cluster.local:5432/sonataflow?search_path=jobs-service&sslmode=require&ssl=true&trustAll=true"},{"name":"QUARKUS_DATASOURCE_REACTIVE_SSL_MODE","value":"require"},{"name":"QUARKUS_DATASOURCE_REACTIVE_TRUST_ALL","value":"true"}]}}}}}}' - oc rollout restart deployment/sonataflow-platform-jobs-service -n "${NAME_SPACE_RBAC}" # initiate orchestrator workflows deployment - deploy_orchestrator_workflows "${NAME_SPACE_RBAC}" + if is_pr_e2e_ocp_helm_job; then + log::warn "Skipping orchestrator workflows deployment on PR job: ${JOB_NAME}" + else + deploy_orchestrator_workflows "${NAME_SPACE_RBAC}" + fi } initiate_deployments() { diff --git a/.ibm/pipelines/value_files/diff-values_showcase-rbac_PR.yaml b/.ibm/pipelines/value_files/diff-values_showcase-rbac_PR.yaml new file mode 100644 index 0000000000..23d5f32a6a --- /dev/null +++ b/.ibm/pipelines/value_files/diff-values_showcase-rbac_PR.yaml @@ -0,0 +1,19 @@ +# This file is for the mandatory PR job only (e2e-ocp-helm). +# It is applied by `helm upgrade` after the `values_showcase-rbac.yaml` is applied and only contains complementary differences for PRs. +# Note, that it overwrites the whole key that is present in this file. +# The only exception is global.dynamic.plugins, that gets merged with the base file. + +# Disable orchestrator for PRs to speed up the mandatory presubmit job and avoid extra infra installs. +orchestrator: null + +global: + dynamic: + plugins: + # Disable orchestrator plugins for PRs - Official release (Backstage 1.45.3) + # These match the exact package strings from values_showcase-rbac.yaml so the merge logic de-duplicates correctly. + - package: "oci://ghcr.io/redhat-developer/rhdh-plugin-export-overlays/red-hat-developer-hub-backstage-plugin-orchestrator:bs_1.45.3__5.1.0!red-hat-developer-hub-backstage-plugin-orchestrator" + disabled: true + - package: "oci://ghcr.io/redhat-developer/rhdh-plugin-export-overlays/red-hat-developer-hub-backstage-plugin-orchestrator-backend:bs_1.45.3__8.3.0!red-hat-developer-hub-backstage-plugin-orchestrator-backend" + disabled: true + - package: "oci://ghcr.io/redhat-developer/rhdh-plugin-export-overlays/red-hat-developer-hub-backstage-plugin-orchestrator-form-widgets:bs_1.45.3__1.2.0!red-hat-developer-hub-backstage-plugin-orchestrator-form-widgets" + disabled: true diff --git a/.ibm/pipelines/value_files/diff-values_showcase_PR.yaml b/.ibm/pipelines/value_files/diff-values_showcase_PR.yaml new file mode 100644 index 0000000000..524b8e54fa --- /dev/null +++ b/.ibm/pipelines/value_files/diff-values_showcase_PR.yaml @@ -0,0 +1,19 @@ +# This file is for the mandatory PR job only (e2e-ocp-helm). +# It is applied by `helm upgrade` after the `values_showcase.yaml` is applied and only contains complementary differences for PRs. +# Note, that it overwrites the whole key that is present in this file. +# The only exception is global.dynamic.plugins, that gets merged with the base file. + +# Disable orchestrator for PRs to speed up the mandatory presubmit job and avoid extra infra installs. +orchestrator: null + +global: + dynamic: + plugins: + # Disable orchestrator plugins for PRs - Official release (Backstage 1.45.3) + # These match the exact package strings from values_showcase.yaml so the merge logic de-duplicates correctly. + - package: "oci://ghcr.io/redhat-developer/rhdh-plugin-export-overlays/red-hat-developer-hub-backstage-plugin-orchestrator:bs_1.45.3__5.1.0!red-hat-developer-hub-backstage-plugin-orchestrator" + disabled: true + - package: "oci://ghcr.io/redhat-developer/rhdh-plugin-export-overlays/red-hat-developer-hub-backstage-plugin-orchestrator-backend:bs_1.45.3__8.3.0!red-hat-developer-hub-backstage-plugin-orchestrator-backend" + disabled: true + - package: "oci://ghcr.io/redhat-developer/rhdh-plugin-export-overlays/red-hat-developer-hub-backstage-plugin-orchestrator-form-widgets:bs_1.45.3__1.2.0!red-hat-developer-hub-backstage-plugin-orchestrator-form-widgets" + disabled: true diff --git a/docs/e2e-tests/CI.md b/docs/e2e-tests/CI.md index 27b1ef86de..908dd5e1a5 100644 --- a/docs/e2e-tests/CI.md +++ b/docs/e2e-tests/CI.md @@ -16,7 +16,6 @@ When a new Pull Request (PR) is opened at [rhdh](https://github.com/redhat-devel For scenarios where tests are not automatically triggered, or when you need to manually initiate tests (e.g., for draft PRs or external contributions), you can use the following commands: 1. **Commenting `/ok-to-test`:** - - **Purpose:** This command is used to validate a PR for testing, especially important for external contributors or when tests are not automatically triggered. - **Who Can Use It:** Only members of the [janus-idp](https://github.com/janus-idp) GitHub organization can mark the PR with this comment. - **Use Cases:** @@ -29,15 +28,15 @@ For scenarios where tests are not automatically triggered, or when you need to m - `/test e2e-ocp-helm` for mandatory PR checks - **Note:** Avoid using `/test all` as it may trigger unnecessary jobs and consume CI resources. Instead, use `/test ?` to see available options and trigger only the specific tests you need. 3. **Triggering Optional Nightly Job Execution on Pull Requests:** - The following optional nightly jobs can be manually triggered on PRs targeting the `main` branch and `release-*` branches. These jobs help validate changes across various deployment environments by commenting the trigger command on PR. + The following optional nightly jobs can be manually triggered on PRs targeting the `main` branch and `release-*` branches. These jobs help validate changes across various deployment environments by commenting the trigger command on PR. - **Job Name Format:** Jobs follow the naming scheme `redhat-developer-rhdh-PLATFORM-[VERSION]-INSTALL_METHOD-[SPECIAL_TEST]-nightly` where: - - `PLATFORM`: The target platform (e.g., `ocp`, `aks`, `gke`) - - `VERSION`: The platform version (e.g., `v4-17`, `v4-18`, `v4-19`) - - `INSTALL_METHOD`: The deployment method (e.g., `helm`, `operator`) - - `SPECIAL_TEST`: Optional special test type (e.g., `auth-providers`, `upgrade`) + **Job Name Format:** Jobs follow the naming scheme `redhat-developer-rhdh-PLATFORM-[VERSION]-INSTALL_METHOD-[SPECIAL_TEST]-nightly` where: + - `PLATFORM`: The target platform (e.g., `ocp`, `aks`, `gke`) + - `VERSION`: The platform version (e.g., `v4-17`, `v4-18`, `v4-19`) + - `INSTALL_METHOD`: The deployment method (e.g., `helm`, `operator`) + - `SPECIAL_TEST`: Optional special test type (e.g., `auth-providers`, `upgrade`) - Use `/test ?` to see the complete list of available jobs for your specific branch and PR context. + Use `/test ?` to see the complete list of available jobs for your specific branch and PR context. These interactions are picked up by the OpenShift-CI service, which sets up a test environmentr. The configurations and steps for setting up this environment are defined in the `openshift-ci-tests.sh` script. For more details, see the [High-Level Overview of `openshift-ci-tests.sh`](#high-level-overview-of-openshift-ci-testssh). @@ -58,7 +57,6 @@ If the initial automatically triggered tests fail, OpenShift-CI will add a comme - Tests are executed on both **RBAC** (Role-Based Access Control) and **non-RBAC** namespaces. Different sets of tests are executed for both the **non-RBAC RHDH instance** and the **RBAC RHDH instance**, each deployed in separate namespaces. - **Access:** In order to access the environment, you can run the bash at `.ibm/pipelines/ocp-cluster-claim-login.sh`. You will be prompted the prow url (the url from the openshift agent, which looks like https://prow.ci.openshift.org/...). Once you test calimed a cluster, this script will forward the cluster web console url along with the credentials. - **Steps:** - 1. **Detection:** OpenShift-CI detects the PR event. 2. **Environment Setup:** The test environment is set up using the `openshift-ci-tests.sh` script (see the [High-Level Overview](#high-level-overview-of-openshift-ci-testssh)). - **Cluster Configuration:** Sets up the required namespaces and applies necessary configurations and secrets. @@ -66,6 +64,7 @@ If the initial automatically triggered tests fail, OpenShift-CI will add a comme 3. **Test Execution:** - **Running Tests:** Executes test suites using `yarn playwright test --project=` directly. - **Retry Logic:** Individual tests are retried up to 2 times as specified in the Playwright configuration. + - **Note:** Orchestrator tests and orchestrator infra setup are excluded from the mandatory PR job (`/test e2e-ocp-helm`) and run in nightly jobs instead. 4. **Artifact Collection:** - Collects test artifacts (logs, screenshots, recordings). - Stores artifacts in the designated `ARTIFACT_DIR` for a retention period of **6 months**. @@ -136,7 +135,6 @@ The nightly job for the `main` branch also runs against three OpenShift Containe ### Automation Processes - **Script Used:** - - **`openshift-ci-tests.sh`**: Automates the setup of the test environment, deployment of RHDH instances, and execution of tests. For more details, refer to the [High-Level Overview of `openshift-ci-tests.sh`](#high-level-overview-of-openshift-ci-testssh). ### High-Level Overview of `openshift-ci-tests.sh` @@ -167,12 +165,12 @@ All Playwright project names are defined in a single JSON file: [`e2e-tests/play When adding or modifying Playwright projects, update `projects.json` first. The project names are automatically available as: -| JSON Key | Shell Variable | Value | -|----------|----------------|-------| -| `SHOWCASE` | `$PW_PROJECT_SHOWCASE` | `showcase` | +| JSON Key | Shell Variable | Value | +| --------------- | --------------------------- | --------------- | +| `SHOWCASE` | `$PW_PROJECT_SHOWCASE` | `showcase` | | `SHOWCASE_RBAC` | `$PW_PROJECT_SHOWCASE_RBAC` | `showcase-rbac` | -| `SHOWCASE_K8S` | `$PW_PROJECT_SHOWCASE_K8S` | `showcase-k8s` | -| ... | ... | ... | +| `SHOWCASE_K8S` | `$PW_PROJECT_SHOWCASE_K8S` | `showcase-k8s` | +| ... | ... | ... | When the test run is complete, the status will be reported under your PR checks. diff --git a/e2e-tests/playwright.config.ts b/e2e-tests/playwright.config.ts index ffc07f9654..875f9a58df 100644 --- a/e2e-tests/playwright.config.ts +++ b/e2e-tests/playwright.config.ts @@ -4,6 +4,10 @@ import { PW_PROJECT } from "./playwright/projects"; process.env.JOB_NAME = process.env.JOB_NAME || ""; process.env.IS_OPENSHIFT = process.env.IS_OPENSHIFT || ""; +const isPrE2eOcpHelmJob = + process.env.JOB_NAME.includes("pull") && + process.env.JOB_NAME.includes("e2e-ocp-helm"); + // Set LOCALE based on which project is being run const args = process.argv; @@ -80,6 +84,9 @@ export default defineConfig({ "**/playwright/e2e/plugins/tekton/tekton.spec.ts", "**/playwright/e2e/dynamic-home-page-customization.spec.ts", "**/playwright/e2e/plugins/scorecard/scorecard.spec.ts", + ...(isPrE2eOcpHelmJob + ? ["**/playwright/e2e/plugins/orchestrator/**/*.spec.ts"] + : []), ], }, { From 960da57ad2f37786c3858e02d3c0fcdda8101f73 Mon Sep 17 00:00:00 2001 From: Gustavo Lira Date: Mon, 12 Jan 2026 09:59:40 -0300 Subject: [PATCH 2/5] refactor: use post-processing to disable orchestrator plugins in PR Address PR review feedback: - Remove hardcoded plugin versions from PR diff files - Use yq post-processing to disable all orchestrator plugins dynamically - This approach works with any plugin version without maintenance - Update documentation wording per reviewer suggestion The post-processing approach: 1. Merges base values with minimal PR diff (only orchestrator: null) 2. Post-processes merged file to disable all plugins containing 'orchestrator' 3. Avoids version hardcoding and works with future plugin updates --- .ibm/pipelines/utils.sh | 8 ++++++++ .../value_files/diff-values_showcase-rbac_PR.yaml | 13 +------------ .../value_files/diff-values_showcase_PR.yaml | 13 +------------ docs/e2e-tests/CI.md | 2 +- 4 files changed, 11 insertions(+), 25 deletions(-) diff --git a/.ibm/pipelines/utils.sh b/.ibm/pipelines/utils.sh index 79f197f173..7c432a3810 100755 --- a/.ibm/pipelines/utils.sh +++ b/.ibm/pipelines/utils.sh @@ -1065,6 +1065,10 @@ base_deployment() { if is_pr_e2e_ocp_helm_job; then local merged_pr_value_file="/tmp/merged-values_showcase_PR.yaml" yq_merge_value_files "merge" "${DIR}/value_files/${HELM_CHART_VALUE_FILE_NAME}" "${DIR}/value_files/diff-values_showcase_PR.yaml" "${merged_pr_value_file}" + + # Post-process: disable all orchestrator plugins (avoids hardcoding versions in diff file) + yq eval -i '(.global.dynamic.plugins[] | select(.package | contains("orchestrator")) | .disabled) = true' "${merged_pr_value_file}" + mkdir -p "${ARTIFACT_DIR}/${NAME_SPACE}" cp -a "${merged_pr_value_file}" "${ARTIFACT_DIR}/${NAME_SPACE}/" || true # shellcheck disable=SC2046 @@ -1096,6 +1100,10 @@ rbac_deployment() { if is_pr_e2e_ocp_helm_job; then local merged_pr_rbac_value_file="/tmp/merged-values_showcase-rbac_PR.yaml" yq_merge_value_files "merge" "${DIR}/value_files/${HELM_CHART_RBAC_VALUE_FILE_NAME}" "${DIR}/value_files/diff-values_showcase-rbac_PR.yaml" "${merged_pr_rbac_value_file}" + + # Post-process: disable all orchestrator plugins (avoids hardcoding versions in diff file) + yq eval -i '(.global.dynamic.plugins[] | select(.package | contains("orchestrator")) | .disabled) = true' "${merged_pr_rbac_value_file}" + mkdir -p "${ARTIFACT_DIR}/${NAME_SPACE_RBAC}" cp -a "${merged_pr_rbac_value_file}" "${ARTIFACT_DIR}/${NAME_SPACE_RBAC}/" || true # shellcheck disable=SC2046 diff --git a/.ibm/pipelines/value_files/diff-values_showcase-rbac_PR.yaml b/.ibm/pipelines/value_files/diff-values_showcase-rbac_PR.yaml index 23d5f32a6a..e6b3d428a9 100644 --- a/.ibm/pipelines/value_files/diff-values_showcase-rbac_PR.yaml +++ b/.ibm/pipelines/value_files/diff-values_showcase-rbac_PR.yaml @@ -4,16 +4,5 @@ # The only exception is global.dynamic.plugins, that gets merged with the base file. # Disable orchestrator for PRs to speed up the mandatory presubmit job and avoid extra infra installs. +# Orchestrator dynamic plugins are disabled via post-processing (see rbac_deployment in utils.sh) orchestrator: null - -global: - dynamic: - plugins: - # Disable orchestrator plugins for PRs - Official release (Backstage 1.45.3) - # These match the exact package strings from values_showcase-rbac.yaml so the merge logic de-duplicates correctly. - - package: "oci://ghcr.io/redhat-developer/rhdh-plugin-export-overlays/red-hat-developer-hub-backstage-plugin-orchestrator:bs_1.45.3__5.1.0!red-hat-developer-hub-backstage-plugin-orchestrator" - disabled: true - - package: "oci://ghcr.io/redhat-developer/rhdh-plugin-export-overlays/red-hat-developer-hub-backstage-plugin-orchestrator-backend:bs_1.45.3__8.3.0!red-hat-developer-hub-backstage-plugin-orchestrator-backend" - disabled: true - - package: "oci://ghcr.io/redhat-developer/rhdh-plugin-export-overlays/red-hat-developer-hub-backstage-plugin-orchestrator-form-widgets:bs_1.45.3__1.2.0!red-hat-developer-hub-backstage-plugin-orchestrator-form-widgets" - disabled: true diff --git a/.ibm/pipelines/value_files/diff-values_showcase_PR.yaml b/.ibm/pipelines/value_files/diff-values_showcase_PR.yaml index 524b8e54fa..e8ece9c8be 100644 --- a/.ibm/pipelines/value_files/diff-values_showcase_PR.yaml +++ b/.ibm/pipelines/value_files/diff-values_showcase_PR.yaml @@ -4,16 +4,5 @@ # The only exception is global.dynamic.plugins, that gets merged with the base file. # Disable orchestrator for PRs to speed up the mandatory presubmit job and avoid extra infra installs. +# Orchestrator dynamic plugins are disabled via post-processing (see base_deployment in utils.sh) orchestrator: null - -global: - dynamic: - plugins: - # Disable orchestrator plugins for PRs - Official release (Backstage 1.45.3) - # These match the exact package strings from values_showcase.yaml so the merge logic de-duplicates correctly. - - package: "oci://ghcr.io/redhat-developer/rhdh-plugin-export-overlays/red-hat-developer-hub-backstage-plugin-orchestrator:bs_1.45.3__5.1.0!red-hat-developer-hub-backstage-plugin-orchestrator" - disabled: true - - package: "oci://ghcr.io/redhat-developer/rhdh-plugin-export-overlays/red-hat-developer-hub-backstage-plugin-orchestrator-backend:bs_1.45.3__8.3.0!red-hat-developer-hub-backstage-plugin-orchestrator-backend" - disabled: true - - package: "oci://ghcr.io/redhat-developer/rhdh-plugin-export-overlays/red-hat-developer-hub-backstage-plugin-orchestrator-form-widgets:bs_1.45.3__1.2.0!red-hat-developer-hub-backstage-plugin-orchestrator-form-widgets" - disabled: true diff --git a/docs/e2e-tests/CI.md b/docs/e2e-tests/CI.md index 908dd5e1a5..2d6dbd899d 100644 --- a/docs/e2e-tests/CI.md +++ b/docs/e2e-tests/CI.md @@ -64,7 +64,7 @@ If the initial automatically triggered tests fail, OpenShift-CI will add a comme 3. **Test Execution:** - **Running Tests:** Executes test suites using `yarn playwright test --project=` directly. - **Retry Logic:** Individual tests are retried up to 2 times as specified in the Playwright configuration. - - **Note:** Orchestrator tests and orchestrator infra setup are excluded from the mandatory PR job (`/test e2e-ocp-helm`) and run in nightly jobs instead. + - **Note:** Orchestrator infra setup and subsequent associated tests are excluded from the mandatory PR job (`/test e2e-ocp-helm`) and run in nightly jobs instead. 4. **Artifact Collection:** - Collects test artifacts (logs, screenshots, recordings). - Stores artifacts in the designated `ARTIFACT_DIR` for a retention period of **6 months**. From 1ee24ca9fb84fbea217522245876aeb3ac2d7f81 Mon Sep 17 00:00:00 2001 From: Gustavo Lira Date: Mon, 12 Jan 2026 10:49:02 -0300 Subject: [PATCH 3/5] refactor: extract disable_orchestrator_plugins helper function Address PR review feedback - avoid duplicating post-processing logic since rbac_deployment is called after base_deployment in initiate_deployments. Extract the yq post-processing into a reusable helper function. --- .ibm/pipelines/utils.sh | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/.ibm/pipelines/utils.sh b/.ibm/pipelines/utils.sh index 7c432a3810..d29899e6cd 100755 --- a/.ibm/pipelines/utils.sh +++ b/.ibm/pipelines/utils.sh @@ -86,6 +86,13 @@ is_pr_e2e_ocp_helm_job() { [[ "${JOB_NAME}" == *pull* ]] && [[ "${JOB_NAME}" == *e2e-ocp-helm* ]] } +# Post-process merged Helm values to disable all orchestrator plugins +# This avoids hardcoding plugin versions in PR diff files +disable_orchestrator_plugins_in_values() { + local values_file=$1 + yq eval -i '(.global.dynamic.plugins[] | select(.package | contains("orchestrator")) | .disabled) = true' "${values_file}" +} + # Waits for a Kubernetes/OpenShift deployment to become ready within a specified timeout period wait_for_deployment() { local namespace=$1 @@ -1065,9 +1072,7 @@ base_deployment() { if is_pr_e2e_ocp_helm_job; then local merged_pr_value_file="/tmp/merged-values_showcase_PR.yaml" yq_merge_value_files "merge" "${DIR}/value_files/${HELM_CHART_VALUE_FILE_NAME}" "${DIR}/value_files/diff-values_showcase_PR.yaml" "${merged_pr_value_file}" - - # Post-process: disable all orchestrator plugins (avoids hardcoding versions in diff file) - yq eval -i '(.global.dynamic.plugins[] | select(.package | contains("orchestrator")) | .disabled) = true' "${merged_pr_value_file}" + disable_orchestrator_plugins_in_values "${merged_pr_value_file}" mkdir -p "${ARTIFACT_DIR}/${NAME_SPACE}" cp -a "${merged_pr_value_file}" "${ARTIFACT_DIR}/${NAME_SPACE}/" || true @@ -1100,9 +1105,7 @@ rbac_deployment() { if is_pr_e2e_ocp_helm_job; then local merged_pr_rbac_value_file="/tmp/merged-values_showcase-rbac_PR.yaml" yq_merge_value_files "merge" "${DIR}/value_files/${HELM_CHART_RBAC_VALUE_FILE_NAME}" "${DIR}/value_files/diff-values_showcase-rbac_PR.yaml" "${merged_pr_rbac_value_file}" - - # Post-process: disable all orchestrator plugins (avoids hardcoding versions in diff file) - yq eval -i '(.global.dynamic.plugins[] | select(.package | contains("orchestrator")) | .disabled) = true' "${merged_pr_rbac_value_file}" + disable_orchestrator_plugins_in_values "${merged_pr_rbac_value_file}" mkdir -p "${ARTIFACT_DIR}/${NAME_SPACE_RBAC}" cp -a "${merged_pr_rbac_value_file}" "${ARTIFACT_DIR}/${NAME_SPACE_RBAC}/" || true From 47738900094ad433b048edf9aedd74f5cf2d9e71 Mon Sep 17 00:00:00 2001 From: Gustavo Lira Date: Tue, 13 Jan 2026 14:56:27 -0300 Subject: [PATCH 4/5] fix: enable orchestrator on e2e-ocp-helm-nightly jobs Refactor is_pr_e2e_ocp_helm_job() to should_skip_orchestrator() with: - More intuitive function name that describes intent - Clear comments explaining the skip conditions - Exclude nightly jobs so orchestrator runs for full testing This ensures orchestrator infrastructure is installed on nightly jobs while still being skipped on mandatory PR presubmit jobs for faster CI. Co-Authored-By: Claude Opus 4.5 --- .ibm/pipelines/utils.sh | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) diff --git a/.ibm/pipelines/utils.sh b/.ibm/pipelines/utils.sh index d29899e6cd..81f845d1be 100755 --- a/.ibm/pipelines/utils.sh +++ b/.ibm/pipelines/utils.sh @@ -82,8 +82,10 @@ yq_merge_value_files() { fi } -is_pr_e2e_ocp_helm_job() { - [[ "${JOB_NAME}" == *pull* ]] && [[ "${JOB_NAME}" == *e2e-ocp-helm* ]] +# Skip orchestrator on mandatory PR presubmit job (e2e-ocp-helm) to speed up CI. +# Nightly jobs (e2e-ocp-helm-nightly) should run orchestrator for full testing. +should_skip_orchestrator() { + [[ "${JOB_NAME}" =~ e2e-ocp-helm ]] && [[ "${JOB_NAME}" != *nightly* ]] } # Post-process merged Helm values to disable all orchestrator plugins @@ -958,7 +960,7 @@ cluster_setup_ocp_helm() { # Skip orchestrator infra installation on OSD-GCP due to infrastructure limitations. # Also skip it for the mandatory PR job (e2e-ocp-helm) to speed up presubmits. - if [[ "${JOB_NAME}" =~ osd-gcp ]] || is_pr_e2e_ocp_helm_job; then + if [[ "${JOB_NAME}" =~ osd-gcp ]] || should_skip_orchestrator; then echo "Skipping orchestrator-infra installation on this job: ${JOB_NAME}" else install_orchestrator_infra_chart @@ -1069,7 +1071,7 @@ base_deployment() { apply_yaml_files "${DIR}" "${NAME_SPACE}" "${rhdh_base_url}" log::info "Deploying image from repository: ${QUAY_REPO}, TAG_NAME: ${TAG_NAME}, in NAME_SPACE: ${NAME_SPACE}" - if is_pr_e2e_ocp_helm_job; then + if should_skip_orchestrator; then local merged_pr_value_file="/tmp/merged-values_showcase_PR.yaml" yq_merge_value_files "merge" "${DIR}/value_files/${HELM_CHART_VALUE_FILE_NAME}" "${DIR}/value_files/diff-values_showcase_PR.yaml" "${merged_pr_value_file}" disable_orchestrator_plugins_in_values "${merged_pr_value_file}" @@ -1086,7 +1088,7 @@ base_deployment() { perform_helm_install "${RELEASE_NAME}" "${NAME_SPACE}" "${HELM_CHART_VALUE_FILE_NAME}" fi - if is_pr_e2e_ocp_helm_job; then + if should_skip_orchestrator; then log::warn "Skipping orchestrator workflows deployment on PR job: ${JOB_NAME}" else deploy_orchestrator_workflows "${NAME_SPACE}" @@ -1102,7 +1104,7 @@ rbac_deployment() { local rbac_rhdh_base_url="https://${RELEASE_NAME_RBAC}-developer-hub-${NAME_SPACE_RBAC}.${K8S_CLUSTER_ROUTER_BASE}" apply_yaml_files "${DIR}" "${NAME_SPACE_RBAC}" "${rbac_rhdh_base_url}" log::info "Deploying image from repository: ${QUAY_REPO}, TAG_NAME: ${TAG_NAME}, in NAME_SPACE: ${RELEASE_NAME_RBAC}" - if is_pr_e2e_ocp_helm_job; then + if should_skip_orchestrator; then local merged_pr_rbac_value_file="/tmp/merged-values_showcase-rbac_PR.yaml" yq_merge_value_files "merge" "${DIR}/value_files/${HELM_CHART_RBAC_VALUE_FILE_NAME}" "${DIR}/value_files/diff-values_showcase-rbac_PR.yaml" "${merged_pr_rbac_value_file}" disable_orchestrator_plugins_in_values "${merged_pr_rbac_value_file}" @@ -1120,7 +1122,7 @@ rbac_deployment() { fi # NOTE: This is a workaround to allow the sonataflow platform to connect to the external postgres db using ssl. - if is_pr_e2e_ocp_helm_job; then + if should_skip_orchestrator; then log::warn "Skipping sonataflow (orchestrator) external DB SSL workaround on PR job: ${JOB_NAME}" else # Wait for the sonataflow database creation job to complete with robust error handling @@ -1134,7 +1136,7 @@ rbac_deployment() { fi # initiate orchestrator workflows deployment - if is_pr_e2e_ocp_helm_job; then + if should_skip_orchestrator; then log::warn "Skipping orchestrator workflows deployment on PR job: ${JOB_NAME}" else deploy_orchestrator_workflows "${NAME_SPACE_RBAC}" From a084b7f67f214705e10167b0fc99249229cda0ba Mon Sep 17 00:00:00 2001 From: Gustavo Lira Date: Wed, 21 Jan 2026 08:13:15 -0300 Subject: [PATCH 5/5] Testing --- .ibm/pipelines/value_files/diff-values_showcase-rbac_PR.yaml | 2 +- e2e-tests/playwright.config.ts | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.ibm/pipelines/value_files/diff-values_showcase-rbac_PR.yaml b/.ibm/pipelines/value_files/diff-values_showcase-rbac_PR.yaml index e6b3d428a9..bd3068d394 100644 --- a/.ibm/pipelines/value_files/diff-values_showcase-rbac_PR.yaml +++ b/.ibm/pipelines/value_files/diff-values_showcase-rbac_PR.yaml @@ -5,4 +5,4 @@ # Disable orchestrator for PRs to speed up the mandatory presubmit job and avoid extra infra installs. # Orchestrator dynamic plugins are disabled via post-processing (see rbac_deployment in utils.sh) -orchestrator: null +#orchestrator: null diff --git a/e2e-tests/playwright.config.ts b/e2e-tests/playwright.config.ts index 875f9a58df..995d6cdc13 100644 --- a/e2e-tests/playwright.config.ts +++ b/e2e-tests/playwright.config.ts @@ -4,7 +4,7 @@ import { PW_PROJECT } from "./playwright/projects"; process.env.JOB_NAME = process.env.JOB_NAME || ""; process.env.IS_OPENSHIFT = process.env.IS_OPENSHIFT || ""; -const isPrE2eOcpHelmJob = +const isPrOcpHelmJob = process.env.JOB_NAME.includes("pull") && process.env.JOB_NAME.includes("e2e-ocp-helm"); @@ -84,7 +84,7 @@ export default defineConfig({ "**/playwright/e2e/plugins/tekton/tekton.spec.ts", "**/playwright/e2e/dynamic-home-page-customization.spec.ts", "**/playwright/e2e/plugins/scorecard/scorecard.spec.ts", - ...(isPrE2eOcpHelmJob + ...(isPrOcpHelmJob ? ["**/playwright/e2e/plugins/orchestrator/**/*.spec.ts"] : []), ],