From a63ad478b6b546c0f1c140bc007e626e4f72023b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Zbyn=C4=9Bk=20Dr=C3=A1pela?= Date: Tue, 5 May 2026 14:15:05 +0200 Subject: [PATCH 01/10] feat: add Data Router / ReportPortal integration for rhdh-plugin-export-overlays Create a new send-data-router step for the overlay repo that sends JUnit test results to Data Router for ReportPortal ingestion. The overlay test step now writes platform metadata and JUnit XML to SHARED_DIR for the data-router post step to consume. Changes: - New step: redhat-developer-rhdh-plugin-export-overlays-send-data-router - Overlay test step writes IS_OPENSHIFT, CONTAINER_PLATFORM, CONTAINER_PLATFORM_VERSION, and RHDH_VERSION to SHARED_DIR - Overlay test step copies junit-results.xml to SHARED_DIR - Both e2e-ocp-helm and e2e-ocp-helm-nightly jobs now include data-router and gather post steps Jira: https://redhat.atlassian.net/browse/RHIDP-13047 Assisted-by: OpenCode --- ...oper-rhdh-plugin-export-overlays-main.yaml | 6 + ...lugin-export-overlays-ocp-helm-commands.sh | 13 + .../send/data-router/OWNERS | 23 ++ ...port-overlays-send-data-router-commands.sh | 313 ++++++++++++++++++ ...verlays-send-data-router-ref.metadata.json | 23 ++ ...-export-overlays-send-data-router-ref.yaml | 15 + 6 files changed, 393 insertions(+) create mode 100644 ci-operator/step-registry/redhat-developer/rhdh-plugin-export-overlays/send/data-router/OWNERS create mode 100644 ci-operator/step-registry/redhat-developer/rhdh-plugin-export-overlays/send/data-router/redhat-developer-rhdh-plugin-export-overlays-send-data-router-commands.sh create mode 100644 ci-operator/step-registry/redhat-developer/rhdh-plugin-export-overlays/send/data-router/redhat-developer-rhdh-plugin-export-overlays-send-data-router-ref.metadata.json create mode 100644 ci-operator/step-registry/redhat-developer/rhdh-plugin-export-overlays/send/data-router/redhat-developer-rhdh-plugin-export-overlays-send-data-router-ref.yaml diff --git a/ci-operator/config/redhat-developer/rhdh-plugin-export-overlays/redhat-developer-rhdh-plugin-export-overlays-main.yaml b/ci-operator/config/redhat-developer/rhdh-plugin-export-overlays/redhat-developer-rhdh-plugin-export-overlays-main.yaml index 84ddb27a4bb4a..6e00f09307c32 100644 --- a/ci-operator/config/redhat-developer/rhdh-plugin-export-overlays/redhat-developer-rhdh-plugin-export-overlays-main.yaml +++ b/ci-operator/config/redhat-developer/rhdh-plugin-export-overlays/redhat-developer-rhdh-plugin-export-overlays-main.yaml @@ -33,6 +33,9 @@ tests: optional: true steps: allow_skip_on_success: true + post: + - ref: redhat-developer-rhdh-plugin-export-overlays-send-data-router + - chain: gather test: - ref: redhat-developer-rhdh-plugin-export-overlays-ocp-helm workflow: generic-claim @@ -53,6 +56,9 @@ tests: presubmit: true steps: allow_skip_on_success: true + post: + - ref: redhat-developer-rhdh-plugin-export-overlays-send-data-router + - chain: gather test: - ref: redhat-developer-rhdh-plugin-export-overlays-ocp-helm workflow: generic-claim diff --git a/ci-operator/step-registry/redhat-developer/rhdh-plugin-export-overlays/ocp/helm/redhat-developer-rhdh-plugin-export-overlays-ocp-helm-commands.sh b/ci-operator/step-registry/redhat-developer/rhdh-plugin-export-overlays/ocp/helm/redhat-developer-rhdh-plugin-export-overlays-ocp-helm-commands.sh index 76d73e684e000..3b10ceb443b5c 100644 --- a/ci-operator/step-registry/redhat-developer/rhdh-plugin-export-overlays/ocp/helm/redhat-developer-rhdh-plugin-export-overlays-ocp-helm-commands.sh +++ b/ci-operator/step-registry/redhat-developer/rhdh-plugin-export-overlays/ocp/helm/redhat-developer-rhdh-plugin-export-overlays-ocp-helm-commands.sh @@ -115,6 +115,11 @@ export CONTAINER_PLATFORM_VERSION CONTAINER_PLATFORM_VERSION=$(oc version --output json 2>/dev/null | jq -r '.openshiftVersion' | cut -d'.' -f1,2 || echo "unknown") echo "Platform: ${CONTAINER_PLATFORM} ${CONTAINER_PLATFORM_VERSION}" +# Save platform info to SHARED_DIR for data-router step +printf "%s" "${IS_OPENSHIFT}" > "${SHARED_DIR}/IS_OPENSHIFT.txt" +printf "%s" "${CONTAINER_PLATFORM}" > "${SHARED_DIR}/CONTAINER_PLATFORM.txt" +printf "%s" "${CONTAINER_PLATFORM_VERSION}" > "${SHARED_DIR}/CONTAINER_PLATFORM_VERSION.txt" + # ── Clone & checkout ───────────────────────────────────────────────────────── git clone "https://github.com/${GITHUB_ORG_NAME}/${GITHUB_REPOSITORY_NAME}.git" @@ -142,6 +147,9 @@ fi INSTALLATION_METHOD="helm" echo "RHDH_VERSION: ${RHDH_VERSION}, INSTALLATION_METHOD: ${INSTALLATION_METHOD}" +# Save RHDH version to SHARED_DIR for data-router step +printf "%s" "${RHDH_VERSION}" > "${SHARED_DIR}/RHDH_VERSION.txt" + # ── Artifact collection ────────────────────────────────────────────────────── collect_artifacts() { @@ -150,6 +158,11 @@ collect_artifacts() { cp -a playwright-report "${ARTIFACT_DIR}/" 2>&1 || echo "[WARNING] playwright-report not found" cp -a node_modules/.cache/e2e-test-results "${ARTIFACT_DIR}/" 2>&1 || echo "[WARNING] e2e-test-results not found" fi + # Copy JUnit results to SHARED_DIR for data-router step + if [[ -f "playwright-report/junit-results.xml" ]]; then + cp playwright-report/junit-results.xml "${SHARED_DIR}/junit-results-overlay-e2e.xml" + echo "[INFO] JUnit results copied to ${SHARED_DIR}/junit-results-overlay-e2e.xml" + fi } # ── Post GitHub comment ────────────────────────────────────────────────────── diff --git a/ci-operator/step-registry/redhat-developer/rhdh-plugin-export-overlays/send/data-router/OWNERS b/ci-operator/step-registry/redhat-developer/rhdh-plugin-export-overlays/send/data-router/OWNERS new file mode 100644 index 0000000000000..320e32db9bdd1 --- /dev/null +++ b/ci-operator/step-registry/redhat-developer/rhdh-plugin-export-overlays/send/data-router/OWNERS @@ -0,0 +1,23 @@ +# DO NOT EDIT; this file is auto-generated using https://github.com/openshift/ci-tools. +# Fetched from https://github.com/redhat-developer/rhdh root OWNERS +# If the repo had OWNERS_ALIASES then the aliases were expanded +# Logins who are not members of 'openshift' organization were filtered out +# See the OWNERS docs: https://git.k8s.io/community/contributors/guide/owners.md + +approvers: +- josephca +- subhashkhileri +- gustavolira +- zdrapela +- rm3l +- kadel +- nickboldt +- jrichter1 +options: {} +reviewers: +- albarbaro +- josephca +- subhashkhileri +- gustavolira +- zdrapela +- jrichter1 diff --git a/ci-operator/step-registry/redhat-developer/rhdh-plugin-export-overlays/send/data-router/redhat-developer-rhdh-plugin-export-overlays-send-data-router-commands.sh b/ci-operator/step-registry/redhat-developer/rhdh-plugin-export-overlays/send/data-router/redhat-developer-rhdh-plugin-export-overlays-send-data-router-commands.sh new file mode 100644 index 0000000000000..a1da61e7850d3 --- /dev/null +++ b/ci-operator/step-registry/redhat-developer/rhdh-plugin-export-overlays/send/data-router/redhat-developer-rhdh-plugin-export-overlays-send-data-router-commands.sh @@ -0,0 +1,313 @@ +#!/bin/bash + +set +o errexit +set +o nounset + +# ============================================================================= +# RHDH Plugin Export Overlays — Data Router / ReportPortal Integration +# +# Sends JUnit test results from SHARED_DIR to Data Router for ReportPortal +# ingestion. Reads platform metadata written by the overlay test step. +# +# Prerequisites (written by the test step to SHARED_DIR): +# - IS_OPENSHIFT.txt, CONTAINER_PLATFORM.txt, CONTAINER_PLATFORM_VERSION.txt +# - RHDH_VERSION.txt +# - junit-results-*.xml +# ============================================================================= + +RELEASE_BRANCH_NAME=$(echo "${JOB_SPEC}" | jq -r '.extra_refs[].base_ref' 2>/dev/null || echo "${JOB_SPEC}" | jq -r '.refs.base_ref') +export RELEASE_BRANCH_NAME + +# ── Load secrets ───────────────────────────────────────────────────────────── + +DATA_ROUTER_URL=$(cat /tmp/secrets/DATA_ROUTER_URL) +DATA_ROUTER_USERNAME=$(cat /tmp/secrets/DATA_ROUTER_USERNAME) +DATA_ROUTER_PASSWORD=$(cat /tmp/secrets/DATA_ROUTER_PASSWORD) +REPORTPORTAL_HOSTNAME=$(cat /tmp/secrets/REPORTPORTAL_HOSTNAME) +export DATA_ROUTER_URL DATA_ROUTER_USERNAME DATA_ROUTER_PASSWORD REPORTPORTAL_HOSTNAME + +DATA_ROUTER_AUTO_FINALIZATION_TRESHOLD="0.9" +DATA_ROUTER_PROJECT="main" +METADATA_OUTPUT="data_router_metadata_output.json" +export DATA_ROUTER_AUTO_FINALIZATION_TRESHOLD DATA_ROUTER_PROJECT METADATA_OUTPUT + +# ── Read platform info from SHARED_DIR ─────────────────────────────────────── + +IS_OPENSHIFT=$(cat "$SHARED_DIR/IS_OPENSHIFT.txt") +CONTAINER_PLATFORM=$(cat "$SHARED_DIR/CONTAINER_PLATFORM.txt") +CONTAINER_PLATFORM_VERSION=$(cat "$SHARED_DIR/CONTAINER_PLATFORM_VERSION.txt") +RHDH_VERSION=$(cat "$SHARED_DIR/RHDH_VERSION.txt" 2>/dev/null || echo "unknown") +export IS_OPENSHIFT CONTAINER_PLATFORM CONTAINER_PLATFORM_VERSION RHDH_VERSION + +# ── Helper functions ───────────────────────────────────────────────────────── + +save_status_data_router_failed() { + local result=$1 + STATUS_DATA_ROUTER_FAILED=${result} + echo "Saving STATUS_DATA_ROUTER_FAILED=${STATUS_DATA_ROUTER_FAILED}" + printf "%s" "${STATUS_DATA_ROUTER_FAILED}" > "$SHARED_DIR/STATUS_DATA_ROUTER_FAILED.txt" + cp "$SHARED_DIR/STATUS_DATA_ROUTER_FAILED.txt" "$ARTIFACT_DIR/STATUS_DATA_ROUTER_FAILED.txt" +} + +# Constructs the artifacts URL based on CI job context +get_artifacts_url() { + local artifacts_base_url="https://gcsweb-ci.apps.ci.l2s4.p1.openshiftapps.com/gcs/test-platform-results" + local artifacts_complete_url + + if [ -n "${PULL_NUMBER:-}" ]; then + local part_1="${JOB_NAME##pull-ci-redhat-developer-rhdh-plugin-export-overlays-main-}" + local part_2="redhat-developer-rhdh-plugin-export-overlays-ocp-helm" + artifacts_complete_url="${artifacts_base_url}/pr-logs/pull/${REPO_OWNER}_${REPO_NAME}/${PULL_NUMBER}/${JOB_NAME}/${BUILD_ID}/artifacts/${part_1}/${part_2}/artifacts" + else + local part_1="${JOB_NAME##periodic-ci-redhat-developer-rhdh-plugin-export-overlays-"${RELEASE_BRANCH_NAME}"-}" + local part_2="redhat-developer-rhdh-plugin-export-overlays-ocp-helm" + artifacts_complete_url="${artifacts_base_url}/logs/${JOB_NAME}/${BUILD_ID}/artifacts/${part_1}/${part_2}/artifacts" + fi + + echo "${artifacts_complete_url}" +} + +# Process JUnit files: fix XML property tags for Data Router compatibility +process_junit_files() { + echo "Processing JUnit files for Data Router compatibility..." + + for junit_file in "${SHARED_DIR}"/junit-results-*.xml; do + if [[ ! -f "$junit_file" ]]; then + continue + fi + + local filename + filename=$(basename "$junit_file") + echo "Processing: ${filename}" + + # Create backup in ARTIFACT_DIR + mkdir -p "${ARTIFACT_DIR}/data-router" + cp "$junit_file" "${ARTIFACT_DIR}/data-router/${filename}.original.xml" + + # Construct artifacts URL for attachment placeholder replacement + local artifacts_url + artifacts_url=$(get_artifacts_url) + + # Replace attachment placeholders with full URLs to OpenShift CI storage + sed -i "s#\[\[ATTACHMENT|\(.*\)\]\]#${artifacts_url}/\1#g" "$junit_file" + + # Fix XML property tags format for Data Router compatibility + sed -i 's###g' "$junit_file" + sed -i 's###g' "$junit_file" + + # Save the processed file + cp "$junit_file" "${ARTIFACT_DIR}/data-router/${filename}.processed.xml" + + echo "Processed: ${filename}" + done + + echo "JUnit files processed and ready for Data Router" +} + +get_job_url() { + local job_base_url="https://prow.ci.openshift.org/view/gs/test-platform-results" + local job_complete_url + if [ -n "${PULL_NUMBER:-}" ]; then + job_complete_url="${job_base_url}/pr-logs/pull/${REPO_OWNER}_${REPO_NAME}/${PULL_NUMBER}/${JOB_NAME}/${BUILD_ID}" + else + job_complete_url="${job_base_url}/logs/${JOB_NAME}/${BUILD_ID}" + fi + echo "${job_complete_url}" +} + +validate_required_vars() { + local required_vars=( + "DATA_ROUTER_URL" + "DATA_ROUTER_USERNAME" + "DATA_ROUTER_PASSWORD" + "REPORTPORTAL_HOSTNAME" + ) + + for var in "${required_vars[@]}"; do + if [[ -z "${!var}" ]]; then + echo "ERROR: Required variable ${var} is not set" + exit 1 + fi + done +} + +save_status_url_reportportal() { + local url=$1 + STATUS_URL_REPORTPORTAL=${url} + echo "Saving STATUS_URL_REPORTPORTAL=${STATUS_URL_REPORTPORTAL}" + printf "%s" "${STATUS_URL_REPORTPORTAL}" > "$SHARED_DIR/STATUS_URL_REPORTPORTAL.txt" + cp "$SHARED_DIR/STATUS_URL_REPORTPORTAL.txt" "$ARTIFACT_DIR/STATUS_URL_REPORTPORTAL.txt" +} + +get_metadata_output_path() { + echo "${ARTIFACT_DIR}/${METADATA_OUTPUT}" +} + +save_data_router_metadata() { + JOB_URL=$(get_job_url) + local install_method + local cluster_type + + # Set install_method based on job name + if [[ "$JOB_NAME" == *operator* ]]; then + install_method="operator" + else + install_method="helm-chart" + fi + + # Set cluster_type based on IS_OPENSHIFT + if [[ "$IS_OPENSHIFT" == "true" ]]; then + cluster_type="openshift" + else + cluster_type="kubernetes" + fi + + # Parse PR number from JOB_SPEC (data-router step runs in a separate container) + local pr_number="" + pr_number=$(echo "${JOB_SPEC}" | jq -r '.refs.pulls[0].number // empty' 2>/dev/null || true) + + jq -n \ + --arg hostname "$REPORTPORTAL_HOSTNAME" \ + --arg project "$DATA_ROUTER_PROJECT" \ + --arg name "$JOB_NAME" \ + --arg description "[View job run details](${JOB_URL})" \ + --arg job_type "$JOB_TYPE" \ + --arg pr "${pr_number:-}" \ + --arg job_name "$JOB_NAME" \ + --arg rhdh_version "$RHDH_VERSION" \ + --arg install_method "$install_method" \ + --arg cluster_type "$cluster_type" \ + --arg container_platform "$CONTAINER_PLATFORM" \ + --arg container_platform_version "$CONTAINER_PLATFORM_VERSION" \ + --argjson auto_finalization_threshold "$DATA_ROUTER_AUTO_FINALIZATION_TRESHOLD" \ + '{ + "targets": { + "reportportal": { + "disabled": false, + "config": { + "hostname": $hostname, + "project": $project + }, + "processing": { + "apply_tfa": true, + "property_filter": [".*"], + "launch": { + "name": $name, + "description": $description, + "attributes": [ + {"key": "job_type", "value": $job_type}, + {"key": "pr", "value": $pr}, + {"key": "job_name", "value": $job_name}, + {"key": "rhdh_version", "value": $rhdh_version}, + {"key": "install_method", "value": $install_method}, + {"key": "cluster_type", "value": $cluster_type}, + {"key": "container_platform", "value": $container_platform}, + {"key": "container_platform_version", "value": $container_platform_version}, + {"key": "component", "value": "plugins"} + ] + }, + "tfa": { + "add_attributes": true, + "auto_finalize_defect_type": true, + "auto_finalization_threshold": $auto_finalization_threshold + } + } + } + } + }' > "$(get_metadata_output_path)" + + echo "Data Router metadata created and saved to ARTIFACT_DIR" +} + +# ── Main ───────────────────────────────────────────────────────────────────── + +main() { + validate_required_vars + + save_data_router_metadata + + ls -la "${SHARED_DIR}" + + process_junit_files + + # Send test results through Data Router + local max_attempts=10 + local wait_seconds_step=1 + local output="" + local DATA_ROUTER_REQUEST_ID="" + + for ((i = 1; i <= max_attempts; i++)); do + echo "Attempt ${i} of ${max_attempts} to send test results through Data Router." + + local junit_files_found=false + for file in "${SHARED_DIR}"/junit-*.xml; do + if [[ -f "$file" ]]; then + junit_files_found=true + break + fi + done + + if [[ "$junit_files_found" == false ]]; then + echo "ERROR: No JUnit results files (junit-*.xml) found in ${SHARED_DIR}" + return + fi + + if output=$(droute send --metadata "$(get_metadata_output_path)" \ + --url "${DATA_ROUTER_URL}" \ + --username "${DATA_ROUTER_USERNAME}" \ + --password "${DATA_ROUTER_PASSWORD}" \ + --results "${SHARED_DIR}/junit-*.xml" \ + --verbose --wirelog 2>&1) && \ + DATA_ROUTER_REQUEST_ID=$(echo "$output" | grep "request:" | awk '{print $2}') && + [ -n "$DATA_ROUTER_REQUEST_ID" ]; then + echo "Test results successfully sent through Data Router." + echo "Request ID: $DATA_ROUTER_REQUEST_ID" + break + elif ((i == max_attempts)); then + echo "Failed to send test results after ${max_attempts} attempts." + echo "Last Data Router error details:" + echo "${output}" + save_status_data_router_failed true + return + else + echo "Attempt ${i} failed, retrying in $((wait_seconds_step * i)) seconds..." + sleep $((wait_seconds_step * i)) + fi + done + + # For periodic jobs, wait for completion and extract ReportPortal URL + if [[ "$JOB_NAME" == *periodic-* ]]; then + local max_attempts=30 + local wait_seconds=2 + local DATA_ROUTER_REQUEST_OUTPUT="" + local REPORTPORTAL_LAUNCH_URL="" + + for ((i = 1; i <= max_attempts; i++)); do + echo "Attempt ${i} of ${max_attempts}: Checking Data Router request completion..." + + DATA_ROUTER_REQUEST_OUTPUT=$(droute request get \ + --url "${DATA_ROUTER_URL}" \ + --username "${DATA_ROUTER_USERNAME}" \ + --password "${DATA_ROUTER_PASSWORD}" \ + "${DATA_ROUTER_REQUEST_ID}") + + REPORTPORTAL_LAUNCH_URL=$(echo "$DATA_ROUTER_REQUEST_OUTPUT" | grep -o 'https://[^"]*') + + if [[ -n "$REPORTPORTAL_LAUNCH_URL" ]]; then + echo "ReportPortal launch URL found: ${REPORTPORTAL_LAUNCH_URL}" + save_status_url_reportportal "$REPORTPORTAL_LAUNCH_URL" + save_status_data_router_failed false + return 0 + else + echo "Attempt ${i} of ${max_attempts}: ReportPortal launch URL not ready yet." + if ((i < max_attempts)); then + sleep "${wait_seconds}" + fi + fi + done + + echo "Warning: Could not retrieve ReportPortal launch URL after ${max_attempts} attempts" + fi +} + +main diff --git a/ci-operator/step-registry/redhat-developer/rhdh-plugin-export-overlays/send/data-router/redhat-developer-rhdh-plugin-export-overlays-send-data-router-ref.metadata.json b/ci-operator/step-registry/redhat-developer/rhdh-plugin-export-overlays/send/data-router/redhat-developer-rhdh-plugin-export-overlays-send-data-router-ref.metadata.json new file mode 100644 index 0000000000000..f77d703a129ad --- /dev/null +++ b/ci-operator/step-registry/redhat-developer/rhdh-plugin-export-overlays/send/data-router/redhat-developer-rhdh-plugin-export-overlays-send-data-router-ref.metadata.json @@ -0,0 +1,23 @@ +{ + "path": "redhat-developer/rhdh-plugin-export-overlays/send/data-router/redhat-developer-rhdh-plugin-export-overlays-send-data-router-ref.yaml", + "owners": { + "approvers": [ + "josephca", + "subhashkhileri", + "gustavolira", + "zdrapela", + "rm3l", + "kadel", + "nickboldt", + "jrichter1" + ], + "reviewers": [ + "albarbaro", + "josephca", + "subhashkhileri", + "gustavolira", + "zdrapela", + "jrichter1" + ] + } +} \ No newline at end of file diff --git a/ci-operator/step-registry/redhat-developer/rhdh-plugin-export-overlays/send/data-router/redhat-developer-rhdh-plugin-export-overlays-send-data-router-ref.yaml b/ci-operator/step-registry/redhat-developer/rhdh-plugin-export-overlays/send/data-router/redhat-developer-rhdh-plugin-export-overlays-send-data-router-ref.yaml new file mode 100644 index 0000000000000..8096d4f1b3f9e --- /dev/null +++ b/ci-operator/step-registry/redhat-developer/rhdh-plugin-export-overlays/send/data-router/redhat-developer-rhdh-plugin-export-overlays-send-data-router-ref.yaml @@ -0,0 +1,15 @@ +ref: + as: redhat-developer-rhdh-plugin-export-overlays-send-data-router + commands: redhat-developer-rhdh-plugin-export-overlays-send-data-router-commands.sh + credentials: + - mount_path: /tmp/secrets + name: rhdh-send-data-router + namespace: test-credentials + from_image: + name: droute + namespace: dno + tag: latest + resources: + requests: + cpu: 100m + memory: 200Mi From 03406900ed92a05186a8087c3bb193e63696e61b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Zbyn=C4=9Bk=20Dr=C3=A1pela?= Date: Wed, 6 May 2026 16:18:06 +0200 Subject: [PATCH 02/10] fix: normalize attachment paths and derive install_method dynamically Fix process_junit_files to strip ../node_modules/.cache/ prefix from Playwright attachment paths so they resolve to the correct GCS location (artifacts/e2e-test-results/...). Derive install_method from JOB_NAME (operator vs helm-chart) instead of hardcoding, matching the rhdh data-router pattern. Add component=plugins attribute to ReportPortal launch metadata. Assisted-by: OpenCode --- ...rhdh-plugin-export-overlays-send-data-router-commands.sh | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/ci-operator/step-registry/redhat-developer/rhdh-plugin-export-overlays/send/data-router/redhat-developer-rhdh-plugin-export-overlays-send-data-router-commands.sh b/ci-operator/step-registry/redhat-developer/rhdh-plugin-export-overlays/send/data-router/redhat-developer-rhdh-plugin-export-overlays-send-data-router-commands.sh index a1da61e7850d3..df1cb286e1d7b 100644 --- a/ci-operator/step-registry/redhat-developer/rhdh-plugin-export-overlays/send/data-router/redhat-developer-rhdh-plugin-export-overlays-send-data-router-commands.sh +++ b/ci-operator/step-registry/redhat-developer/rhdh-plugin-export-overlays/send/data-router/redhat-developer-rhdh-plugin-export-overlays-send-data-router-commands.sh @@ -88,7 +88,11 @@ process_junit_files() { local artifacts_url artifacts_url=$(get_artifacts_url) - # Replace attachment placeholders with full URLs to OpenShift CI storage + # Replace attachment placeholders with full URLs to OpenShift CI storage. + # Playwright generates relative paths like ../node_modules/.cache/e2e-test-results/... + # which map to artifacts/e2e-test-results/... in GCS (collect_artifacts copies them there). + sed -i "s#\[\[ATTACHMENT|\.\./node_modules/\.cache/\(.*\)\]\]#${artifacts_url}/\1#g" "$junit_file" + # Catch any remaining attachment placeholders that don't match the pattern above sed -i "s#\[\[ATTACHMENT|\(.*\)\]\]#${artifacts_url}/\1#g" "$junit_file" # Fix XML property tags format for Data Router compatibility From 8a1702b823e759a171d250a79f1c916106513820 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Zbyn=C4=9Bk=20Dr=C3=A1pela?= Date: Wed, 6 May 2026 16:24:39 +0200 Subject: [PATCH 03/10] fix: rename JUnit file to junit-results-ocp-helm.xml Align with rhdh data-router convention where the suffix identifies the test step (e.g., junit-results-showcase-ci-nightly.xml in rhdh). Assisted-by: OpenCode --- ...developer-rhdh-plugin-export-overlays-ocp-helm-commands.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ci-operator/step-registry/redhat-developer/rhdh-plugin-export-overlays/ocp/helm/redhat-developer-rhdh-plugin-export-overlays-ocp-helm-commands.sh b/ci-operator/step-registry/redhat-developer/rhdh-plugin-export-overlays/ocp/helm/redhat-developer-rhdh-plugin-export-overlays-ocp-helm-commands.sh index 3b10ceb443b5c..5b10d41540ee1 100644 --- a/ci-operator/step-registry/redhat-developer/rhdh-plugin-export-overlays/ocp/helm/redhat-developer-rhdh-plugin-export-overlays-ocp-helm-commands.sh +++ b/ci-operator/step-registry/redhat-developer/rhdh-plugin-export-overlays/ocp/helm/redhat-developer-rhdh-plugin-export-overlays-ocp-helm-commands.sh @@ -160,8 +160,8 @@ collect_artifacts() { fi # Copy JUnit results to SHARED_DIR for data-router step if [[ -f "playwright-report/junit-results.xml" ]]; then - cp playwright-report/junit-results.xml "${SHARED_DIR}/junit-results-overlay-e2e.xml" - echo "[INFO] JUnit results copied to ${SHARED_DIR}/junit-results-overlay-e2e.xml" + cp playwright-report/junit-results.xml "${SHARED_DIR}/junit-results-ocp-helm.xml" + echo "[INFO] JUnit results copied to ${SHARED_DIR}/junit-results-ocp-helm.xml" fi } From 854d85938f92c80621ae59fc92ba0ce8b9b41ffc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Zbyn=C4=9Bk=20Dr=C3=A1pela?= Date: Wed, 6 May 2026 16:25:41 +0200 Subject: [PATCH 04/10] fix: copy all junit files from playwright-report to SHARED_DIR Use a glob instead of a hardcoded filename so any junit-*.xml files produced by Playwright are forwarded to the data-router step. Assisted-by: OpenCode --- ...oper-rhdh-plugin-export-overlays-ocp-helm-commands.sh | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/ci-operator/step-registry/redhat-developer/rhdh-plugin-export-overlays/ocp/helm/redhat-developer-rhdh-plugin-export-overlays-ocp-helm-commands.sh b/ci-operator/step-registry/redhat-developer/rhdh-plugin-export-overlays/ocp/helm/redhat-developer-rhdh-plugin-export-overlays-ocp-helm-commands.sh index 5b10d41540ee1..c2fcda146ad8f 100644 --- a/ci-operator/step-registry/redhat-developer/rhdh-plugin-export-overlays/ocp/helm/redhat-developer-rhdh-plugin-export-overlays-ocp-helm-commands.sh +++ b/ci-operator/step-registry/redhat-developer/rhdh-plugin-export-overlays/ocp/helm/redhat-developer-rhdh-plugin-export-overlays-ocp-helm-commands.sh @@ -159,10 +159,11 @@ collect_artifacts() { cp -a node_modules/.cache/e2e-test-results "${ARTIFACT_DIR}/" 2>&1 || echo "[WARNING] e2e-test-results not found" fi # Copy JUnit results to SHARED_DIR for data-router step - if [[ -f "playwright-report/junit-results.xml" ]]; then - cp playwright-report/junit-results.xml "${SHARED_DIR}/junit-results-ocp-helm.xml" - echo "[INFO] JUnit results copied to ${SHARED_DIR}/junit-results-ocp-helm.xml" - fi + for junit_file in playwright-report/junit-*.xml; do + [[ -f "$junit_file" ]] || continue + cp "$junit_file" "${SHARED_DIR}/" + echo "[INFO] Copied $(basename "$junit_file") to ${SHARED_DIR}/" + done } # ── Post GitHub comment ────────────────────────────────────────────────────── From c7a9d9c249f4359bae1717d70ab01258d570d026 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Zbyn=C4=9Bk=20Dr=C3=A1pela?= Date: Wed, 6 May 2026 16:27:56 +0200 Subject: [PATCH 05/10] fix: align process_junit_files glob with actual filenames Use junit-*.xml glob (matching droute send pattern) instead of junit-results-*.xml which would miss junit-results.xml. Assisted-by: OpenCode --- ...per-rhdh-plugin-export-overlays-send-data-router-commands.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ci-operator/step-registry/redhat-developer/rhdh-plugin-export-overlays/send/data-router/redhat-developer-rhdh-plugin-export-overlays-send-data-router-commands.sh b/ci-operator/step-registry/redhat-developer/rhdh-plugin-export-overlays/send/data-router/redhat-developer-rhdh-plugin-export-overlays-send-data-router-commands.sh index df1cb286e1d7b..ed71212b45005 100644 --- a/ci-operator/step-registry/redhat-developer/rhdh-plugin-export-overlays/send/data-router/redhat-developer-rhdh-plugin-export-overlays-send-data-router-commands.sh +++ b/ci-operator/step-registry/redhat-developer/rhdh-plugin-export-overlays/send/data-router/redhat-developer-rhdh-plugin-export-overlays-send-data-router-commands.sh @@ -71,7 +71,7 @@ get_artifacts_url() { process_junit_files() { echo "Processing JUnit files for Data Router compatibility..." - for junit_file in "${SHARED_DIR}"/junit-results-*.xml; do + for junit_file in "${SHARED_DIR}"/junit-*.xml; do if [[ ! -f "$junit_file" ]]; then continue fi From 71f7a45aad926d0fb152912b9f87d950e8d8dd37 Mon Sep 17 00:00:00 2001 From: Deep Mistry Date: Tue, 5 May 2026 17:52:35 -0400 Subject: [PATCH 06/10] Update container image for check-cluster-profiles (#78877) From d89a9688471083ea667fb4ba11f0d6d0d5d4cce0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Zbyn=C4=9Bk=20Dr=C3=A1pela?= Date: Wed, 6 May 2026 16:37:55 +0200 Subject: [PATCH 07/10] fix: use return instead of exit in data-router validate_required_vars MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Prevent validate_required_vars from killing the entire post chain when secrets are missing, allowing the gather chain to still run. Also fix comment typo (junit-results-*.xml → junit-*.xml) and add missing trailing newlines to metadata JSON files. Co-Authored-By: Claude Opus 4.6 --- ...r-rhdh-plugin-export-overlays-send-data-router-commands.sh | 4 ++-- ...-plugin-export-overlays-send-data-router-ref.metadata.json | 2 +- .../redhat-developer-rhdh-send-data-router-commands.sh | 2 +- .../redhat-developer-rhdh-send-data-router-ref.metadata.json | 2 +- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/ci-operator/step-registry/redhat-developer/rhdh-plugin-export-overlays/send/data-router/redhat-developer-rhdh-plugin-export-overlays-send-data-router-commands.sh b/ci-operator/step-registry/redhat-developer/rhdh-plugin-export-overlays/send/data-router/redhat-developer-rhdh-plugin-export-overlays-send-data-router-commands.sh index ed71212b45005..d4e8de4164882 100644 --- a/ci-operator/step-registry/redhat-developer/rhdh-plugin-export-overlays/send/data-router/redhat-developer-rhdh-plugin-export-overlays-send-data-router-commands.sh +++ b/ci-operator/step-registry/redhat-developer/rhdh-plugin-export-overlays/send/data-router/redhat-developer-rhdh-plugin-export-overlays-send-data-router-commands.sh @@ -12,7 +12,7 @@ set +o nounset # Prerequisites (written by the test step to SHARED_DIR): # - IS_OPENSHIFT.txt, CONTAINER_PLATFORM.txt, CONTAINER_PLATFORM_VERSION.txt # - RHDH_VERSION.txt -# - junit-results-*.xml +# - junit-*.xml # ============================================================================= RELEASE_BRANCH_NAME=$(echo "${JOB_SPEC}" | jq -r '.extra_refs[].base_ref' 2>/dev/null || echo "${JOB_SPEC}" | jq -r '.refs.base_ref') @@ -130,7 +130,7 @@ validate_required_vars() { for var in "${required_vars[@]}"; do if [[ -z "${!var}" ]]; then echo "ERROR: Required variable ${var} is not set" - exit 1 + return 1 fi done } diff --git a/ci-operator/step-registry/redhat-developer/rhdh-plugin-export-overlays/send/data-router/redhat-developer-rhdh-plugin-export-overlays-send-data-router-ref.metadata.json b/ci-operator/step-registry/redhat-developer/rhdh-plugin-export-overlays/send/data-router/redhat-developer-rhdh-plugin-export-overlays-send-data-router-ref.metadata.json index f77d703a129ad..9e075daee3a23 100644 --- a/ci-operator/step-registry/redhat-developer/rhdh-plugin-export-overlays/send/data-router/redhat-developer-rhdh-plugin-export-overlays-send-data-router-ref.metadata.json +++ b/ci-operator/step-registry/redhat-developer/rhdh-plugin-export-overlays/send/data-router/redhat-developer-rhdh-plugin-export-overlays-send-data-router-ref.metadata.json @@ -20,4 +20,4 @@ "jrichter1" ] } -} \ No newline at end of file +} diff --git a/ci-operator/step-registry/redhat-developer/rhdh/send/data-router/redhat-developer-rhdh-send-data-router-commands.sh b/ci-operator/step-registry/redhat-developer/rhdh/send/data-router/redhat-developer-rhdh-send-data-router-commands.sh index 149cde37bf9d7..8c716b53efe5d 100644 --- a/ci-operator/step-registry/redhat-developer/rhdh/send/data-router/redhat-developer-rhdh-send-data-router-commands.sh +++ b/ci-operator/step-registry/redhat-developer/rhdh/send/data-router/redhat-developer-rhdh-send-data-router-commands.sh @@ -158,7 +158,7 @@ validate_required_vars() { for var in "${required_vars[@]}"; do if [[ -z "${!var}" ]]; then echo "ERROR: Required variable ${var} is not set" - exit 1 + return 1 fi done } diff --git a/ci-operator/step-registry/redhat-developer/rhdh/send/data-router/redhat-developer-rhdh-send-data-router-ref.metadata.json b/ci-operator/step-registry/redhat-developer/rhdh/send/data-router/redhat-developer-rhdh-send-data-router-ref.metadata.json index b7c75ea8bd178..e46d76326c927 100644 --- a/ci-operator/step-registry/redhat-developer/rhdh/send/data-router/redhat-developer-rhdh-send-data-router-ref.metadata.json +++ b/ci-operator/step-registry/redhat-developer/rhdh/send/data-router/redhat-developer-rhdh-send-data-router-ref.metadata.json @@ -31,4 +31,4 @@ "OpinionatedHeron" ] } -} \ No newline at end of file +} From e5985b368cbb4d9ce5f5431b4fc5d11cbbf9d4bd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Zbyn=C4=9Bk=20Dr=C3=A1pela?= Date: Wed, 6 May 2026 16:40:46 +0200 Subject: [PATCH 08/10] fix: mark data-router post step as best_effort Data-router failures should not prevent artifact gathering or fail the overall job. Add allow_best_effort_post_steps and best_effort with a 5m timeout on the send-data-router step reference. Co-Authored-By: Claude Opus 4.6 --- ...hat-developer-rhdh-plugin-export-overlays-main.yaml | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/ci-operator/config/redhat-developer/rhdh-plugin-export-overlays/redhat-developer-rhdh-plugin-export-overlays-main.yaml b/ci-operator/config/redhat-developer/rhdh-plugin-export-overlays/redhat-developer-rhdh-plugin-export-overlays-main.yaml index 6e00f09307c32..f050a5743dfbe 100644 --- a/ci-operator/config/redhat-developer/rhdh-plugin-export-overlays/redhat-developer-rhdh-plugin-export-overlays-main.yaml +++ b/ci-operator/config/redhat-developer/rhdh-plugin-export-overlays/redhat-developer-rhdh-plugin-export-overlays-main.yaml @@ -32,9 +32,12 @@ tests: max_concurrency: 2 optional: true steps: + allow_best_effort_post_steps: true allow_skip_on_success: true post: - - ref: redhat-developer-rhdh-plugin-export-overlays-send-data-router + - best_effort: true + ref: redhat-developer-rhdh-plugin-export-overlays-send-data-router + timeout: 5m0s - chain: gather test: - ref: redhat-developer-rhdh-plugin-export-overlays-ocp-helm @@ -55,9 +58,12 @@ tests: optional: true presubmit: true steps: + allow_best_effort_post_steps: true allow_skip_on_success: true post: - - ref: redhat-developer-rhdh-plugin-export-overlays-send-data-router + - best_effort: true + ref: redhat-developer-rhdh-plugin-export-overlays-send-data-router + timeout: 5m0s - chain: gather test: - ref: redhat-developer-rhdh-plugin-export-overlays-ocp-helm From ac5ac5527ae7d6697b9944b213c24ba07befa1a5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Zbyn=C4=9Bk=20Dr=C3=A1pela?= Date: Wed, 6 May 2026 16:54:07 +0200 Subject: [PATCH 09/10] feat: add data-router to auth-providers-nightly and helm-upgrade-nightly Add redhat-developer-rhdh-send-data-router + send-alert + gather post steps to tests that were missing them: - e2e-ocp-operator-auth-providers-nightly: main, release-1.8, release-1.9 - e2e-ocp-helm-upgrade-nightly: main, release-1.9 Also fix overlay config to use plain ref syntax (no best_effort/timeout on ref steps) matching the rhdh pattern. Assisted-by: OpenCode --- ...hat-developer-rhdh-plugin-export-overlays-main.yaml | 10 ++-------- .../rhdh/redhat-developer-rhdh-main.yaml | 6 ++++++ .../rhdh/redhat-developer-rhdh-release-1.8.yaml | 3 +++ .../rhdh/redhat-developer-rhdh-release-1.9.yaml | 6 ++++++ ...-export-overlays-send-data-router-ref.metadata.json | 2 +- ...t-developer-rhdh-send-data-router-ref.metadata.json | 2 +- 6 files changed, 19 insertions(+), 10 deletions(-) diff --git a/ci-operator/config/redhat-developer/rhdh-plugin-export-overlays/redhat-developer-rhdh-plugin-export-overlays-main.yaml b/ci-operator/config/redhat-developer/rhdh-plugin-export-overlays/redhat-developer-rhdh-plugin-export-overlays-main.yaml index f050a5743dfbe..6e00f09307c32 100644 --- a/ci-operator/config/redhat-developer/rhdh-plugin-export-overlays/redhat-developer-rhdh-plugin-export-overlays-main.yaml +++ b/ci-operator/config/redhat-developer/rhdh-plugin-export-overlays/redhat-developer-rhdh-plugin-export-overlays-main.yaml @@ -32,12 +32,9 @@ tests: max_concurrency: 2 optional: true steps: - allow_best_effort_post_steps: true allow_skip_on_success: true post: - - best_effort: true - ref: redhat-developer-rhdh-plugin-export-overlays-send-data-router - timeout: 5m0s + - ref: redhat-developer-rhdh-plugin-export-overlays-send-data-router - chain: gather test: - ref: redhat-developer-rhdh-plugin-export-overlays-ocp-helm @@ -58,12 +55,9 @@ tests: optional: true presubmit: true steps: - allow_best_effort_post_steps: true allow_skip_on_success: true post: - - best_effort: true - ref: redhat-developer-rhdh-plugin-export-overlays-send-data-router - timeout: 5m0s + - ref: redhat-developer-rhdh-plugin-export-overlays-send-data-router - chain: gather test: - ref: redhat-developer-rhdh-plugin-export-overlays-ocp-helm diff --git a/ci-operator/config/redhat-developer/rhdh/redhat-developer-rhdh-main.yaml b/ci-operator/config/redhat-developer/rhdh/redhat-developer-rhdh-main.yaml index e172d3e1fb2cf..ffba0373c3f0c 100644 --- a/ci-operator/config/redhat-developer/rhdh/redhat-developer-rhdh-main.yaml +++ b/ci-operator/config/redhat-developer/rhdh/redhat-developer-rhdh-main.yaml @@ -321,6 +321,9 @@ tests: presubmit: true steps: allow_skip_on_success: true + post: + - ref: redhat-developer-rhdh-send-data-router + - chain: gather test: - ref: redhat-developer-rhdh-ocp-operator-nightly workflow: generic-claim @@ -341,6 +344,9 @@ tests: presubmit: true steps: allow_skip_on_success: true + post: + - ref: redhat-developer-rhdh-send-data-router + - chain: gather test: - ref: redhat-developer-rhdh-ocp-helm-upgrade-nightly workflow: generic-claim diff --git a/ci-operator/config/redhat-developer/rhdh/redhat-developer-rhdh-release-1.8.yaml b/ci-operator/config/redhat-developer/rhdh/redhat-developer-rhdh-release-1.8.yaml index aef0f9a0ec94b..01bb981434b4e 100644 --- a/ci-operator/config/redhat-developer/rhdh/redhat-developer-rhdh-release-1.8.yaml +++ b/ci-operator/config/redhat-developer/rhdh/redhat-developer-rhdh-release-1.8.yaml @@ -294,6 +294,9 @@ tests: presubmit: true steps: allow_skip_on_success: true + post: + - ref: redhat-developer-rhdh-send-data-router + - chain: gather test: - ref: redhat-developer-rhdh-ocp-operator-nightly workflow: generic-claim diff --git a/ci-operator/config/redhat-developer/rhdh/redhat-developer-rhdh-release-1.9.yaml b/ci-operator/config/redhat-developer/rhdh/redhat-developer-rhdh-release-1.9.yaml index 10d1ba3e4f8ea..5f6bca3eebf8b 100644 --- a/ci-operator/config/redhat-developer/rhdh/redhat-developer-rhdh-release-1.9.yaml +++ b/ci-operator/config/redhat-developer/rhdh/redhat-developer-rhdh-release-1.9.yaml @@ -318,6 +318,9 @@ tests: presubmit: true steps: allow_skip_on_success: true + post: + - ref: redhat-developer-rhdh-send-data-router + - chain: gather test: - ref: redhat-developer-rhdh-ocp-operator-nightly workflow: generic-claim @@ -338,6 +341,9 @@ tests: presubmit: true steps: allow_skip_on_success: true + post: + - ref: redhat-developer-rhdh-send-data-router + - chain: gather test: - ref: redhat-developer-rhdh-ocp-helm-upgrade-nightly workflow: generic-claim diff --git a/ci-operator/step-registry/redhat-developer/rhdh-plugin-export-overlays/send/data-router/redhat-developer-rhdh-plugin-export-overlays-send-data-router-ref.metadata.json b/ci-operator/step-registry/redhat-developer/rhdh-plugin-export-overlays/send/data-router/redhat-developer-rhdh-plugin-export-overlays-send-data-router-ref.metadata.json index 9e075daee3a23..f77d703a129ad 100644 --- a/ci-operator/step-registry/redhat-developer/rhdh-plugin-export-overlays/send/data-router/redhat-developer-rhdh-plugin-export-overlays-send-data-router-ref.metadata.json +++ b/ci-operator/step-registry/redhat-developer/rhdh-plugin-export-overlays/send/data-router/redhat-developer-rhdh-plugin-export-overlays-send-data-router-ref.metadata.json @@ -20,4 +20,4 @@ "jrichter1" ] } -} +} \ No newline at end of file diff --git a/ci-operator/step-registry/redhat-developer/rhdh/send/data-router/redhat-developer-rhdh-send-data-router-ref.metadata.json b/ci-operator/step-registry/redhat-developer/rhdh/send/data-router/redhat-developer-rhdh-send-data-router-ref.metadata.json index e46d76326c927..b7c75ea8bd178 100644 --- a/ci-operator/step-registry/redhat-developer/rhdh/send/data-router/redhat-developer-rhdh-send-data-router-ref.metadata.json +++ b/ci-operator/step-registry/redhat-developer/rhdh/send/data-router/redhat-developer-rhdh-send-data-router-ref.metadata.json @@ -31,4 +31,4 @@ "OpinionatedHeron" ] } -} +} \ No newline at end of file From 5dd8883934eefbf3e1881a9c747fc06d2689cea6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Zbyn=C4=9Bk=20Dr=C3=A1pela?= Date: Thu, 7 May 2026 09:42:49 +0200 Subject: [PATCH 10/10] fix: add OWNERS file to send/ directory Assisted-by: OpenCode --- .../rhdh-plugin-export-overlays/send/OWNERS | 23 +++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 ci-operator/step-registry/redhat-developer/rhdh-plugin-export-overlays/send/OWNERS diff --git a/ci-operator/step-registry/redhat-developer/rhdh-plugin-export-overlays/send/OWNERS b/ci-operator/step-registry/redhat-developer/rhdh-plugin-export-overlays/send/OWNERS new file mode 100644 index 0000000000000..320e32db9bdd1 --- /dev/null +++ b/ci-operator/step-registry/redhat-developer/rhdh-plugin-export-overlays/send/OWNERS @@ -0,0 +1,23 @@ +# DO NOT EDIT; this file is auto-generated using https://github.com/openshift/ci-tools. +# Fetched from https://github.com/redhat-developer/rhdh root OWNERS +# If the repo had OWNERS_ALIASES then the aliases were expanded +# Logins who are not members of 'openshift' organization were filtered out +# See the OWNERS docs: https://git.k8s.io/community/contributors/guide/owners.md + +approvers: +- josephca +- subhashkhileri +- gustavolira +- zdrapela +- rm3l +- kadel +- nickboldt +- jrichter1 +options: {} +reviewers: +- albarbaro +- josephca +- subhashkhileri +- gustavolira +- zdrapela +- jrichter1