diff --git a/.ci/pipelines/jobs/ocp-localization.sh b/.ci/pipelines/jobs/ocp-localization.sh new file mode 100644 index 0000000000..0ac9b3d593 --- /dev/null +++ b/.ci/pipelines/jobs/ocp-localization.sh @@ -0,0 +1,40 @@ +#!/bin/bash + +# shellcheck source=.ci/pipelines/lib/log.sh +source "$DIR"/lib/log.sh +# shellcheck source=.ci/pipelines/lib/common.sh +source "$DIR"/lib/common.sh +# shellcheck source=.ci/pipelines/utils.sh +source "$DIR"/utils.sh +# shellcheck source=.ci/pipelines/lib/testing.sh +source "$DIR"/lib/testing.sh +# shellcheck source=.ci/pipelines/playwright-projects.sh +source "$DIR"/playwright-projects.sh + +handle_ocp_localization() { + export NAME_SPACE="${NAME_SPACE:-showcase-localization-nightly}" + + common::oc_login + + K8S_CLUSTER_ROUTER_BASE=$(oc get route console -n openshift-console -o=jsonpath='{.spec.host}' | sed 's/^[^.]*\.//') + export K8S_CLUSTER_ROUTER_BASE + + cluster_setup_ocp_helm + base_deployment "${PW_PROJECT_SHOWCASE}" + deploy_test_backstage_customization_provider "${NAME_SPACE}" + + run_localization_tests +} + +run_localization_tests() { + local url="https://${RELEASE_NAME}-developer-hub-${NAME_SPACE}.${K8S_CLUSTER_ROUTER_BASE}" + local locales=("DE" "ES" "FR" "IT" "JA") + + log::section "Running localization tests" + for locale in "${locales[@]}"; do + local project_var="PW_PROJECT_SHOWCASE_LOCALIZATION_${locale}" + local project="${!project_var}" + log::info "Running localization test for ${locale} (project: ${project})" + testing::check_and_test "${RELEASE_NAME}" "${NAME_SPACE}" "${project}" "${url}" "" "" "${project}" + done +} diff --git a/.ci/pipelines/jobs/ocp-nightly.sh b/.ci/pipelines/jobs/ocp-nightly.sh index c8fa57c0d2..bb3acccedd 100644 --- a/.ci/pipelines/jobs/ocp-nightly.sh +++ b/.ci/pipelines/jobs/ocp-nightly.sh @@ -37,12 +37,6 @@ handle_ocp_nightly() { run_standard_deployment_tests run_runtime_config_change_tests run_sanity_plugins_check - - # Skip localization tests for OSD-GCP jobs - if [[ "${JOB_NAME}" != *osd-gcp* ]]; then - run_localization_tests - fi - } run_standard_deployment_tests() { @@ -90,17 +84,3 @@ run_sanity_plugins_check() { initiate_sanity_plugin_checks_deployment "${RELEASE_NAME}" "${NAME_SPACE_SANITY_PLUGINS_CHECK}" "${sanity_plugins_url}" "${PW_PROJECT_SHOWCASE_SANITY_PLUGINS}" testing::check_and_test "${RELEASE_NAME}" "${NAME_SPACE_SANITY_PLUGINS_CHECK}" "${PW_PROJECT_SHOWCASE_SANITY_PLUGINS}" "${sanity_plugins_url}" } - -run_localization_tests() { - local url="https://${RELEASE_NAME}-developer-hub-${NAME_SPACE}.${K8S_CLUSTER_ROUTER_BASE}" - local locales=("DE" "ES" "FR" "IT" "JA") - - log::section "Running localization tests" - # Loop through all locales - uses project name as artifacts_subdir to avoid overwriting test artifacts - for locale in "${locales[@]}"; do - local project_var="PW_PROJECT_SHOWCASE_LOCALIZATION_${locale}" - local project="${!project_var}" - log::info "Running localization test for ${locale} (project: ${project})" - testing::check_and_test "${RELEASE_NAME}" "${NAME_SPACE}" "${project}" "${url}" "" "" "${project}" - done -} diff --git a/.ci/pipelines/openshift-ci-tests.sh b/.ci/pipelines/openshift-ci-tests.sh index e76b59c99d..55b3679cbc 100755 --- a/.ci/pipelines/openshift-ci-tests.sh +++ b/.ci/pipelines/openshift-ci-tests.sh @@ -121,6 +121,13 @@ main() { log::info "Calling helm upgrade" handle_ocp_helm_upgrade ;; + *ocp*helm*localization*nightly*) + log::info "Sourcing ocp-localization.sh" + # shellcheck source=.ci/pipelines/jobs/ocp-localization.sh + source "${DIR}/jobs/ocp-localization.sh" + log::info "Calling handle_ocp_localization" + handle_ocp_localization + ;; *ocp*helm*nightly*) log::info "Sourcing ocp-nightly.sh" # shellcheck source=.ci/pipelines/jobs/ocp-nightly.sh diff --git a/.claude/rules/ci-e2e-testing.md b/.claude/rules/ci-e2e-testing.md index 15d2c60fc2..b83edead86 100644 --- a/.claude/rules/ci-e2e-testing.md +++ b/.claude/rules/ci-e2e-testing.md @@ -119,7 +119,7 @@ test.beforeAll(async ({ }, testInfo) => { 7. **Localization Tests** (`playwright/e2e/localization/`) - Verify UI displays correctly translated strings - Supports **German (de)**, **Spanish (es)**, **French (fr)**, **Italian (it)**, and **Japanese (ja)** - - Runs as part of OCP nightly job (skipped for OSD-GCP) + - Runs in a dedicated `e2e-ocp-helm-localization-nightly` nightly job - Uses `showcase-localization-de`, `showcase-localization-es`, `showcase-localization-fr`, `showcase-localization-it`, `showcase-localization-ja` Playwright projects - Translation files located in `translations/` directory - Test helper: `e2e-tests/playwright/e2e/localization/locale.ts` @@ -339,6 +339,7 @@ The main script dispatches to job-specific handlers in `.ci/pipelines/jobs/`: - `handle_eks_helm` / `handle_eks_operator`: EKS Helm/Operator deployment - `handle_gke_helm` / `handle_gke_operator`: GKE Helm/Operator deployment - `handle_ocp_nightly`: OCP Helm nightly tests (also handles OSD-GCP Helm) +- `handle_ocp_localization`: OCP Helm localization nightly tests - `handle_ocp_operator`: OCP Operator nightly tests (also handles OSD-GCP Operator) - `handle_ocp_pull`: OCP PR checks - `handle_auth_providers`: Auth provider tests diff --git a/.claude/rules/e2e-fix-workflow.md b/.claude/rules/e2e-fix-workflow.md index 8d82a23c0c..f8b1c38d80 100644 --- a/.claude/rules/e2e-fix-workflow.md +++ b/.claude/rules/e2e-fix-workflow.md @@ -46,7 +46,8 @@ BRANCH=$(echo "$JOB_NAME" | grep -oE '\-rhdh-(main|release-[0-9]+\.[0-9]+)-' | s | Job pattern | Projects | |-------------|----------| -| `*ocp*helm*nightly*` (not upgrade) | `showcase`, `showcase-rbac`, `showcase-runtime`, `showcase-sanity-plugins`, `showcase-localization-*` | +| `*ocp*helm*nightly*` (not upgrade, not localization) | `showcase`, `showcase-rbac`, `showcase-runtime`, `showcase-sanity-plugins` | +| `*ocp*helm*localization*nightly*` | `showcase-localization-de`, `showcase-localization-es`, `showcase-localization-fr`, `showcase-localization-it`, `showcase-localization-ja` | | `*ocp*helm*upgrade*` | `showcase-upgrade` | | `*ocp*operator*nightly*` (not auth) | `showcase-operator`, `showcase-operator-rbac` | | `*ocp*operator*auth-providers*` | `showcase-auth-providers` | diff --git a/.cursor/rules/ci-e2e-testing.mdc b/.cursor/rules/ci-e2e-testing.mdc index ec9887812f..8f382de47f 100644 --- a/.cursor/rules/ci-e2e-testing.mdc +++ b/.cursor/rules/ci-e2e-testing.mdc @@ -122,7 +122,7 @@ test.beforeAll(async ({ }, testInfo) => { 7. **Localization Tests** (`playwright/e2e/localization/`) - Verify UI displays correctly translated strings - Supports **German (de)**, **Spanish (es)**, **French (fr)**, **Italian (it)**, and **Japanese (ja)** - - Runs as part of OCP nightly job (skipped for OSD-GCP) + - Runs in a dedicated `e2e-ocp-helm-localization-nightly` nightly job - Uses `showcase-localization-de`, `showcase-localization-es`, `showcase-localization-fr`, `showcase-localization-it`, `showcase-localization-ja` Playwright projects - Translation files located in `translations/` directory - Test helper: `e2e-tests/playwright/e2e/localization/locale.ts` @@ -342,6 +342,7 @@ The main script dispatches to job-specific handlers in `.ci/pipelines/jobs/`: - `handle_eks_helm` / `handle_eks_operator`: EKS Helm/Operator deployment - `handle_gke_helm` / `handle_gke_operator`: GKE Helm/Operator deployment - `handle_ocp_nightly`: OCP Helm nightly tests (also handles OSD-GCP Helm) +- `handle_ocp_localization`: OCP Helm localization nightly tests - `handle_ocp_operator`: OCP Operator nightly tests (also handles OSD-GCP Operator) - `handle_ocp_pull`: OCP PR checks - `handle_auth_providers`: Auth provider tests diff --git a/.cursor/rules/e2e-fix-workflow.mdc b/.cursor/rules/e2e-fix-workflow.mdc index 6f078d4d82..b63e222a9d 100644 --- a/.cursor/rules/e2e-fix-workflow.mdc +++ b/.cursor/rules/e2e-fix-workflow.mdc @@ -49,7 +49,8 @@ BRANCH=$(echo "$JOB_NAME" | grep -oE '\-rhdh-(main|release-[0-9]+\.[0-9]+)-' | s | Job pattern | Projects | |-------------|----------| -| `*ocp*helm*nightly*` (not upgrade) | `showcase`, `showcase-rbac`, `showcase-runtime`, `showcase-sanity-plugins`, `showcase-localization-*` | +| `*ocp*helm*nightly*` (not upgrade, not localization) | `showcase`, `showcase-rbac`, `showcase-runtime`, `showcase-sanity-plugins` | +| `*ocp*helm*localization*nightly*` | `showcase-localization-de`, `showcase-localization-es`, `showcase-localization-fr`, `showcase-localization-it`, `showcase-localization-ja` | | `*ocp*helm*upgrade*` | `showcase-upgrade` | | `*ocp*operator*nightly*` (not auth) | `showcase-operator`, `showcase-operator-rbac` | | `*ocp*operator*auth-providers*` | `showcase-auth-providers` | diff --git a/.opencode/memories/ci-e2e-testing.md b/.opencode/memories/ci-e2e-testing.md index 15d2c60fc2..b83edead86 100644 --- a/.opencode/memories/ci-e2e-testing.md +++ b/.opencode/memories/ci-e2e-testing.md @@ -119,7 +119,7 @@ test.beforeAll(async ({ }, testInfo) => { 7. **Localization Tests** (`playwright/e2e/localization/`) - Verify UI displays correctly translated strings - Supports **German (de)**, **Spanish (es)**, **French (fr)**, **Italian (it)**, and **Japanese (ja)** - - Runs as part of OCP nightly job (skipped for OSD-GCP) + - Runs in a dedicated `e2e-ocp-helm-localization-nightly` nightly job - Uses `showcase-localization-de`, `showcase-localization-es`, `showcase-localization-fr`, `showcase-localization-it`, `showcase-localization-ja` Playwright projects - Translation files located in `translations/` directory - Test helper: `e2e-tests/playwright/e2e/localization/locale.ts` @@ -339,6 +339,7 @@ The main script dispatches to job-specific handlers in `.ci/pipelines/jobs/`: - `handle_eks_helm` / `handle_eks_operator`: EKS Helm/Operator deployment - `handle_gke_helm` / `handle_gke_operator`: GKE Helm/Operator deployment - `handle_ocp_nightly`: OCP Helm nightly tests (also handles OSD-GCP Helm) +- `handle_ocp_localization`: OCP Helm localization nightly tests - `handle_ocp_operator`: OCP Operator nightly tests (also handles OSD-GCP Operator) - `handle_ocp_pull`: OCP PR checks - `handle_auth_providers`: Auth provider tests diff --git a/.opencode/memories/e2e-fix-workflow.md b/.opencode/memories/e2e-fix-workflow.md index 8d82a23c0c..f8b1c38d80 100644 --- a/.opencode/memories/e2e-fix-workflow.md +++ b/.opencode/memories/e2e-fix-workflow.md @@ -46,7 +46,8 @@ BRANCH=$(echo "$JOB_NAME" | grep -oE '\-rhdh-(main|release-[0-9]+\.[0-9]+)-' | s | Job pattern | Projects | |-------------|----------| -| `*ocp*helm*nightly*` (not upgrade) | `showcase`, `showcase-rbac`, `showcase-runtime`, `showcase-sanity-plugins`, `showcase-localization-*` | +| `*ocp*helm*nightly*` (not upgrade, not localization) | `showcase`, `showcase-rbac`, `showcase-runtime`, `showcase-sanity-plugins` | +| `*ocp*helm*localization*nightly*` | `showcase-localization-de`, `showcase-localization-es`, `showcase-localization-fr`, `showcase-localization-it`, `showcase-localization-ja` | | `*ocp*helm*upgrade*` | `showcase-upgrade` | | `*ocp*operator*nightly*` (not auth) | `showcase-operator`, `showcase-operator-rbac` | | `*ocp*operator*auth-providers*` | `showcase-auth-providers` | diff --git a/.rulesync/rules/ci-e2e-testing.md b/.rulesync/rules/ci-e2e-testing.md index 1cbb80dcfd..99ab1bc605 100644 --- a/.rulesync/rules/ci-e2e-testing.md +++ b/.rulesync/rules/ci-e2e-testing.md @@ -125,7 +125,7 @@ test.beforeAll(async ({ }, testInfo) => { 7. **Localization Tests** (`playwright/e2e/localization/`) - Verify UI displays correctly translated strings - Supports **German (de)**, **Spanish (es)**, **French (fr)**, **Italian (it)**, and **Japanese (ja)** - - Runs as part of OCP nightly job (skipped for OSD-GCP) + - Runs in a dedicated `e2e-ocp-helm-localization-nightly` nightly job - Uses `showcase-localization-de`, `showcase-localization-es`, `showcase-localization-fr`, `showcase-localization-it`, `showcase-localization-ja` Playwright projects - Translation files located in `translations/` directory - Test helper: `e2e-tests/playwright/e2e/localization/locale.ts` @@ -345,6 +345,7 @@ The main script dispatches to job-specific handlers in `.ci/pipelines/jobs/`: - `handle_eks_helm` / `handle_eks_operator`: EKS Helm/Operator deployment - `handle_gke_helm` / `handle_gke_operator`: GKE Helm/Operator deployment - `handle_ocp_nightly`: OCP Helm nightly tests (also handles OSD-GCP Helm) +- `handle_ocp_localization`: OCP Helm localization nightly tests - `handle_ocp_operator`: OCP Operator nightly tests (also handles OSD-GCP Operator) - `handle_ocp_pull`: OCP PR checks - `handle_auth_providers`: Auth provider tests diff --git a/.rulesync/rules/e2e-fix-workflow.md b/.rulesync/rules/e2e-fix-workflow.md index f30b60b018..48dd5416a8 100644 --- a/.rulesync/rules/e2e-fix-workflow.md +++ b/.rulesync/rules/e2e-fix-workflow.md @@ -52,7 +52,8 @@ BRANCH=$(echo "$JOB_NAME" | grep -oE '\-rhdh-(main|release-[0-9]+\.[0-9]+)-' | s | Job pattern | Projects | |-------------|----------| -| `*ocp*helm*nightly*` (not upgrade) | `showcase`, `showcase-rbac`, `showcase-runtime`, `showcase-sanity-plugins`, `showcase-localization-*` | +| `*ocp*helm*nightly*` (not upgrade, not localization) | `showcase`, `showcase-rbac`, `showcase-runtime`, `showcase-sanity-plugins` | +| `*ocp*helm*localization*nightly*` | `showcase-localization-de`, `showcase-localization-es`, `showcase-localization-fr`, `showcase-localization-it`, `showcase-localization-ja` | | `*ocp*helm*upgrade*` | `showcase-upgrade` | | `*ocp*operator*nightly*` (not auth) | `showcase-operator`, `showcase-operator-rbac` | | `*ocp*operator*auth-providers*` | `showcase-auth-providers` | diff --git a/docs/e2e-tests/CI.md b/docs/e2e-tests/CI.md index f0153e4e59..5b3ed60201 100644 --- a/docs/e2e-tests/CI.md +++ b/docs/e2e-tests/CI.md @@ -101,15 +101,13 @@ The nightly job for the `main` branch also runs against three OpenShift Containe ### Localization Tests -Localization tests verify that the RHDH UI displays correctly translated strings for supported languages. These tests run as part of the OCP Helm nightly job. +Localization tests verify that the RHDH UI displays correctly translated strings for supported languages. These tests run in a dedicated `e2e-ocp-helm-localization-nightly` nightly job. - **Supported Languages:** German (de), Spanish (es), French (fr), Italian (it), and Japanese (ja) -- **When They Run:** Localization tests run at the end of the OCP nightly job, after standard deployment tests, runtime config tests, and sanity plugin checks. -- **Skip Condition:** Localization tests are **skipped for OSD-GCP jobs** due to environment constraints. -- **Reuses Existing Deployment:** The tests run against the same RHDH instance deployed for standard tests, so no additional deployment is needed. +- **When They Run:** Localization tests run in their own nightly job with a dedicated showcase deployment. - **Playwright Projects:** `showcase-localization-de`, `showcase-localization-es`, `showcase-localization-fr`, `showcase-localization-it`, `showcase-localization-ja` -The localization test implementation is in `.ci/pipelines/jobs/ocp-nightly.sh` (`run_localization_tests()` function). +The localization test implementation is in `.ci/pipelines/jobs/ocp-localization.sh` (`run_localization_tests()` function). ### CI Job Definitions diff --git a/rhidp-13952-description.md b/rhidp-13952-description.md new file mode 100644 index 0000000000..55a0ea6f78 --- /dev/null +++ b/rhidp-13952-description.md @@ -0,0 +1,47 @@ +## Summary + +- Remove E2E tests for remaining migrated plugins (Bulk Import, Orchestrator, Extensions) from the [rhdh-plugin-export-overlays](https://github.com/redhat-developer/rhdh-plugin-export-overlays) repository (Phase 3 — [RHIDP-8841](https://redhat.atlassian.net/browse/RHIDP-8841)) +- Removes 13 spec files, their exclusive page objects/utils/test data, all Orchestrator CI infrastructure (scripts, operators, SonataFlow setup), and plugin entries from Helm values files, ConfigMaps, and RBAC policies +- **44 files changed, ~6,398 lines removed** + +Jira: [RHIDP-13952](https://redhat.atlassian.net/browse/RHIDP-13952) + +## Tests Removed + +| Test | Files Deleted | Config Removed | +|------|---------------|----------------| +| **Orchestrator** (9 specs) | `failswitch-workflow.spec.ts`, `greeting-workflow.spec.ts`, `orchestrator-rbac.spec.ts`, `orchestrator-entity-rbac.spec.ts`, `orchestrator-entity-workflows.spec.ts`, `retry-workflow.spec.ts`, `token-propagation-workflow.spec.ts`, `ui-props-test-workflow.spec.ts`, `workflow-all-runs-validations.spec.ts`, `orchestrator.ts` (page object), `orchestrator-rbac-helper.ts` (API helper) | 4 OCI plugin entries from `values_showcase.yaml` + `values_showcase-rbac.yaml`; `orchestrator:` SonataFlow config sections; entity-workflow templates from `app-config-rhdh.yaml` + `app-config-rhdh-rbac.yaml`; `- orchestrator` from `pluginsWithPermission`; full "Orchestrator Entity-Workflow RBAC" section from `rbac-policy.csv`; `testIgnore` entries from 6 Playwright projects; orchestrator disable overrides from 6 `diff-values_showcase*.yaml` files | +| **Bulk Import** | `bulk-import.spec.ts`, `bulk-import.ts` (page object), `bulk-import.ts` (test data) | 2 wrapper plugin entries from `values_showcase.yaml` + `values_showcase-rbac.yaml`; `bulkImport:` config + catalog URL from `app-config-rhdh-rbac.yaml`; `bulk_import` role from `rbac-policy.csv`, `rbac-constants.ts`, and `authentication-providers/yamls/rbac-policy.csv`; `testIgnore` entries from Playwright config | +| **Extensions** | `extensions.spec.ts`, `extensions.ts` (page object) | 3 wrapper plugin entries from `values_showcase.yaml` + `values_showcase-rbac.yaml`; `extensions:` config from `app-config-rhdh.yaml`; `extension` role from `rbac-policy.csv` + `rbac-constants.ts`; `extensions-catalog` volume mount + volume from `values_showcase-rbac.yaml` + 6 `diff-values_showcase-rbac_*.yaml` files | + +## CI Infrastructure Removed + +- **`.ci/pipelines/lib/orchestrator.sh`** — entire file deleted (SonataFlow deployment, workflow management, plugin enablement functions) +- **`.ci/pipelines/lib/operators.sh`** — removed `operator::install_serverless_logic()` and `operator::install_serverless()` (SonataFlow/Knative operator installs) +- **`.ci/pipelines/utils.sh`** — removed all orchestrator delegation functions (`should_skip_orchestrator`, `deploy_orchestrator_workflows`, `enable_orchestrator_plugins_op`, `install_orchestrator_infra_chart`, `disable_orchestrator_plugins_in_values`); simplified `base_deployment()`, `rbac_deployment()`, `cluster_setup_ocp_helm()`, `cluster_setup_ocp_operator()` by removing orchestrator conditional logic; removed serverless operator installs from `cluster_setup_ocp_operator()` +- **`.ci/pipelines/jobs/upgrade.sh`** — removed `deploy_orchestrator_workflows` call +- **`.ci/pipelines/jobs/ocp-operator.sh`** — removed commented-out orchestrator deployment calls and "(orchestrator disabled)" log messages +- **`.ci/pipelines/jobs/ocp-nightly.sh`** — removed "(orchestrator disabled)" log messages +- **`diff-values_showcase_PR.yaml`**, **`diff-values_showcase-rbac_PR.yaml`**, **`diff-values_showcase_upgrade.yaml`**, **`diff-values_showcase_OSD-GCP.yaml`**, **`diff-values_showcase-rbac_OSD-GCP.yaml`** — cleared orchestrator override content +- **`diff-values_showcase-sanity-plugins.yaml`** — removed `orchestrator: enabled` section +- **`diff-values_showcase_{AKS,EKS,GKE}.yaml`** — removed orchestrator plugin disable entries and `orchestrator: null` +- **`diff-values_showcase-rbac_{AKS,EKS,GKE}.yaml`** — removed orchestrator plugin disable entries, `extensions-catalog` volume mounts/volumes, and `orchestrator: null` + +## Documentation Updated + +- **`docs/e2e-tests/CI-medic-guide.md`** — removed 5 stale references to orchestrator infrastructure, `orchestrator.sh`, and orchestrator workflow steps +- **`.ci/pipelines/lib/README.md`** — removed `orchestrator.sh` module section and stale serverless function references + +## Shared Dependencies Preserved + +- **Keycloak catalog backend** (`backstage-community-plugin-catalog-backend-module-keycloak-dynamic`) kept — still required by remaining tests +- **`catalog.providers.keycloakOrg`** kept in both app-config files +- **`KEYCLOAK_AUTH_*` env vars** kept — used by OIDC auth provider +- **RBAC support files** (`rbac-api.ts`, `rbac.ts`, `rbac-constants.ts`, `rhdh-auth-api-hack.ts`) kept — still used by `auditor-rbac.spec.ts` and other remaining tests +- **`home-page-customization.spec.ts`** retained with Quick Access verification + +## Test plan + +- [ ] OCP Helm PR job (`showcase` + `showcase-rbac`) — validates deployment with removed plugins and remaining tests pass +- [ ] OCP Helm Nightly job — validates `showcase-sanity-plugins`, localization, and runtime +- [ ] OCP Operator job — validates `showcase-operator` + `showcase-operator-rbac`