Skip to content

MPIIT: Migrate Quay to new lpGA variant and Use ExitTrap for mapping - #82955

Open
oharan2 wants to merge 3 commits into
openshift:mainfrom
oharan2:quay
Open

MPIIT: Migrate Quay to new lpGA variant and Use ExitTrap for mapping#82955
oharan2 wants to merge 3 commits into
openshift:mainfrom
oharan2:quay

Conversation

@oharan2

@oharan2 oharan2 commented Aug 5, 2026

Copy link
Copy Markdown
Contributor

Summary

Migrates Quay OCP 4.22 LP interop CI to the lpGA-lp-ocp-compat variant and wires MPIIT / Component Readiness junit remapping through the shared ExitTrap--PostProcessPrep helper.

This replaces the legacy ocp-4.22-quay-lp-interop variant and per-step REPORTPORTAL_CMP / mapTestsForComponentReadiness handling.

Changes

CI operator config (quay-quay-tests-master)

  • Rename __ocp-4.22-quay-lp-interop.yaml__ocp-4.22-quay-lpGA-lp-ocp-compat.yaml
  • Update zz_generated_metadata.variant to ocp-4.22-quay-lpGA-lp-ocp-compat
  • Rename jobs to the lpGA naming scheme:
    • cr-quay-e2e-tests-awscr--quay--e2e-tests-aws
    • aws-fipsquay--aws-fips
  • Set DR__RP__CR_COMP_NAME: lp-ocp-compat--Quay on CR, FIPS, and yearly AWS S3 jobs
  • Remove REPORTPORTAL_CMP: Quay-lp-interop (superseded by DR__RP__CR_COMP_NAME + ExitTrap)

Step registry (CR job test: steps)

For quay-tests-deploy-quay-aws-s3, quay-tests-test-quay-e2e, quay-tests-qbo-qe-test, and quay-tests-cso-qe-test:

  • Add DR__RP__CR_COMP_NAME (default lp-ocp-compat--Quay) and MAP_TESTS (default false) to each -ref.yaml
  • When MAP_TESTS=true, source ExitTrap--PostProcessPrep and register an EXIT trap to remap junit suite names to lp-ocp-compat--Quay--<test>
  • Remove legacy inline junit mapping (mapTestsForComponentReadiness in e2e; hard-coded ReportPortal component names elsewhere)

quay-tests-test-quay-e2e keeps artifact copy on EXIT and chains ExitTrap + CopyArtifacts when mapping is enabled.

Summary by CodeRabbit

  • Migrates MPIIT Quay OCP 4.22 LP interop CI to the lpGA-lp-ocp-compat variant.
  • Updates job names and ReportPortal configuration with DR__RP__CR_COMP_NAME.
  • Removes the legacy REPORTPORTAL_CMP setting.
  • Adds optional MAP_TESTS support to Quay QE and deployment steps.
  • Replaces legacy JUnit mapping with the shared ExitTrap--PostProcessPrep.sh helper.
  • Improves Quay e2e artifact collection and preserves artifact copying when test mapping is disabled.

@openshift-ci

openshift-ci Bot commented Aug 5, 2026

Copy link
Copy Markdown
Contributor

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: oharan2
Once this PR has been reviewed and has the lgtm label, please assign lizhang19817 for approval. For more information see the Code Review Process.

The full list of commands accepted by this bot can be found here.

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@oharan2

oharan2 commented Aug 5, 2026

Copy link
Copy Markdown
Contributor Author

/pj-rehearse periodic-ci-quay-quay-tests-master-ocp-4.22-quay-lpGA-lp-ocp-compat-cr--quay--e2e-tests-aws

@openshift-merge-bot

Copy link
Copy Markdown
Contributor

@oharan2: now processing your pj-rehearse request. Please allow up to 10 minutes for jobs to trigger or cancel.

@oharan2

oharan2 commented Aug 5, 2026

Copy link
Copy Markdown
Contributor Author

/pj-rehearse abort

@openshift-merge-bot

Copy link
Copy Markdown
Contributor

@oharan2: now processing your pj-rehearse request. Please allow up to 10 minutes for jobs to trigger or cancel.

@coderabbitai

coderabbitai Bot commented Aug 5, 2026

Copy link
Copy Markdown
Contributor

Walkthrough

Quay test jobs now define ReportPortal component names and optional test-suite mapping. Test scripts conditionally load a shared exit-trap helper to generate remapped JUnit artifacts. The Quay E2E script also changes artifact collection and installation order.

Changes

Quay test reporting

Layer / File(s) Summary
Reporting configuration and job metadata
ci-operator/config/quay/quay-tests/..., ci-operator/step-registry/quay-tests/*/*-ref.yaml
Quay jobs and test references define DR__RP__CR_COMP_NAME and MAP_TESTS. The AWS S3 deployment gains a 10-minute grace period. The generated variant and AWS job name are updated.
Conditional post-processing setup
ci-operator/step-registry/quay-tests/cso-qe-test/*, deploy-quay-aws-s3/*, qbo-qe-test/*
When MAP_TESTS=true, the scripts fetch the shared ExitTrap--PostProcessPrep.sh helper with wget or curl, then register an EXIT trap for JUnit post-processing.
E2E artifact collection and exit handling
ci-operator/step-registry/quay-tests/test-quay-e2e/*
The E2E script initializes artifact handling earlier, tolerates missing Cypress outputs, prefixes collected files, and runs conditional post-processing after copying artifacts. npm install moves next to kubeconfig setup.

Estimated code review effort: 3 (Moderate) | ~20 minutes

Sequence Diagram(s)

sequenceDiagram
  participant QuayTestScript
  participant ExitTrapPostProcessPrep
  participant JUnitArtifacts
  QuayTestScript->>ExitTrapPostProcessPrep: Load helper when MAP_TESTS=true
  QuayTestScript->>JUnitArtifacts: Copy available test artifacts
  QuayTestScript->>ExitTrapPostProcessPrep: Run EXIT trap with component name
  ExitTrapPostProcessPrep->>JUnitArtifacts: Generate remapped JUnit artifact
Loading

Possibly related PRs

  • openshift/release#82881: Adds the same MAP_TESTS, DR__RP__CR_COMP_NAME, and shared JUnit post-processing integration pattern.

Suggested reviewers: lizhang19817, aroyoredhat

🚥 Pre-merge checks | ✅ 13 | ❌ 2

❌ Failed checks (2 warnings)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
Ipv6 And Disconnected Network Test Compatibility ⚠️ Warning The PR adds wget/curl fetches from raw.githubusercontent.com in four test steps, and MAP_TESTS=true in target jobs; disconnected runs therefore require public internet. Use an internal mirror for the helper or disable mapping in disconnected jobs; otherwise mark the test [Skipped:Disconnected] and run the required IPv6 CI job.
✅ Passed checks (13 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly summarizes the two primary changes: migrating Quay to the new lpGA variant and using ExitTrap for test-result mapping.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Stable And Deterministic Test Names ✅ Passed The PR changes CI shell/YAML only; no Ginkgo It, Describe, Context, or When test titles occur in changed files or Quay paths.
Test Structure And Quality ✅ Passed The PR changes only YAML and shell step-registry files; no Ginkgo test files, It blocks, or Ginkgo assertions are added or modified, so this check is not applicable.
Microshift Test Compatibility ✅ Passed The complete PR diff changes only YAML configuration and shell scripts; it adds no Ginkgo e2e tests requiring a MicroShift compatibility check.
Single Node Openshift (Sno) Test Compatibility ✅ Passed The PR changes only a shell script; no new Ginkgo declarations or topology-sensitive e2e tests were added.
Topology-Aware Scheduling Compatibility ✅ Passed The PR changes only CI job configuration, step references, and shell scripts; it adds no deployment/controller manifests or topology-dependent scheduling constraints.
Ote Binary Stdout Contract ✅ Passed The PR changes only Quay YAML and Bash files; it adds no OTE binary source or process-level stdout code, so this check is not applicable.
No-Weak-Crypto ✅ Passed The full PR diff adds no MD5, SHA1, DES, 3DES, RC4, Blowfish, or ECB usage, custom crypto, or secret/token comparisons.
Container-Privileges ✅ Passed The PR diff contains no privileged, hostPID, hostNetwork, hostIPC, SYS_ADMIN, allowPrivilegeEscalation, or explicit root settings.
No-Sensitive-Data-In-Logs ✅ Passed The PR adds no secret-bearing log statements; new fetches are quiet, traps log only JUnit names, and existing Quay hostname output predates the PR.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Comment @coderabbitai help to get the list of available commands.

@oharan2

oharan2 commented Aug 5, 2026

Copy link
Copy Markdown
Contributor Author

/pj-rehearse periodic-ci-quay-quay-tests-master-ocp-4.22-quay-lpGA-lp-ocp-compat-cr--quay--e2e-tests-aws

@openshift-merge-bot

Copy link
Copy Markdown
Contributor

@oharan2: now processing your pj-rehearse request. Please allow up to 10 minutes for jobs to trigger or cancel.

@openshift-merge-bot

Copy link
Copy Markdown
Contributor

[REHEARSALNOTIFIER]
@oharan2: the pj-rehearse plugin accommodates running rehearsal tests for the changes in this PR. Expand 'Interacting with pj-rehearse' for usage details. The following rehearsable tests have been affected by this change:

Test name Repo Type Reason
pull-ci-quay-quay-master-playwright-e2e quay/quay presubmit Registry content changed
periodic-ci-quay-quay-tests-master-ocp-4.21-quay-cr-quay-e2e-tests-quay314-ocp421-lp-interop-aws N/A periodic Registry content changed
periodic-ci-quay-quay-tests-master-quay-api-quay-e2e-tests-quay317-api-testing N/A periodic Registry content changed
periodic-ci-quay-quay-tests-master-ocp-4.23-quay-lp-interop-aws-fips N/A periodic Registry content changed
periodic-ci-quay-quay-tests-master-quay-api-sustaining-ocp416-quay-e2e-tests-quay312-api-testing N/A periodic Registry content changed
periodic-ci-quay-quay-tests-master-ocp-421-quay-quay-acs-violations-check-quay317 N/A periodic Registry content changed
periodic-ci-quay-quay-tests-master-ocp-418-quay-quay-e2e-tests-quay316-ocp418-unmanaged-tls N/A periodic Registry content changed
periodic-ci-quay-quay-tests-master-ocp-421-quay-quay-e2e-tests-quay317-ocp421-azure N/A periodic Registry content changed
periodic-ci-quay-quay-tests-master-ocp-422-quay-quay-e2e-tests-quay318-ocp422-azure N/A periodic Registry content changed
periodic-ci-quay-quay-tests-master-quay-newui-quay-e2e-tests-quay316-ocp421-newui-p3 N/A periodic Registry content changed
periodic-ci-quay-quay-tests-master-ocp-421-arm-quay-quay-e2e-tests-quay318-ocp421-arm N/A periodic Registry content changed
periodic-ci-quay-quay-tests-master-ocp-418-quay-quay-e2e-tests-quay316-ocp418-aws-s3-couldfront N/A periodic Registry content changed
periodic-ci-quay-quay-tests-master-ocp-421-quay-quay-e2e-tests-quay317-ocp421-virtual-builder N/A periodic Registry content changed
periodic-ci-quay-quay-tests-master-ocp-421-quay-quay-e2e-tests-quay316-ocp421-azure N/A periodic Registry content changed
periodic-ci-quay-quay-tests-master-quay-oci-conformance-quay-oci-conformance-test-quay316 N/A periodic Registry content changed
periodic-ci-quay-quay-tests-master-quay-api-sustaining-ocp412-quay-e2e-tests-quay39-api-testing N/A periodic Registry content changed
periodic-ci-quay-quay-tests-master-ocp-418-quay-quay-e2e-tests-quay316-ocp418-aws-sts N/A periodic Registry content changed
periodic-ci-quay-quay-tests-master-quay-hypershift-quay-e2e-tests-quay312-hypershift-ocp419 N/A periodic Registry content changed
periodic-ci-quay-quay-tests-master-quay-newui-quay-e2e-tests-quay318-ocp421-newui-p1-p2 N/A periodic Registry content changed
periodic-ci-quay-quay-tests-master-ocp-419-quay-quay-e2e-tests-ceph-ocp419-quay316 N/A periodic Registry content changed
periodic-ci-quay-quay-tests-master-quay-newui-quay-e2e-tests-quay318-ocp421-newui-p3 N/A periodic Registry content changed
periodic-ci-quay-quay-tests-master-quay-api-quay-e2e-tests-quay318-api-testing N/A periodic Registry content changed
periodic-ci-quay-quay-tests-master-ocp-421-quay-quay-e2e-tests-quay318-ocp421-virtual-builder N/A periodic Registry content changed
periodic-ci-quay-quay-tests-master-quay-api-quay-e2e-tests-quay316-api-testing N/A periodic Registry content changed
periodic-ci-quay-quay-tests-master-ocp-422-quay-quay-e2e-tests-quay318-ocp422-virtual-builder N/A periodic Registry content changed

A total of 59 jobs have been affected by this change. The above listing is non-exhaustive and limited to 25 jobs.

A full list of affected jobs can be found here

Interacting with pj-rehearse

Comment: /pj-rehearse to run up to 5 rehearsals
Comment: /pj-rehearse skip to opt-out of rehearsals
Comment: /pj-rehearse {test-name}, with each test separated by a space, to run one or more specific rehearsals
Comment: /pj-rehearse more to run up to 10 rehearsals
Comment: /pj-rehearse max to run up to 25 rehearsals
Comment: /pj-rehearse auto-ack to run up to 5 rehearsals, and add the rehearsals-ack label on success
Comment: /pj-rehearse list to get an up-to-date list of affected jobs
Comment: /pj-rehearse abort to abort all active rehearsals
Comment: /pj-rehearse network-access-allowed to allow rehearsals of tests that have the restrict_network_access field set to false. This must be executed by an openshift org member who is not the PR author

Once you are satisfied with the results of the rehearsals, comment: /pj-rehearse ack to unblock merge. When the rehearsals-ack label is present on your PR, merge will no longer be blocked by rehearsals.
If you would like the rehearsals-ack label removed, comment: /pj-rehearse reject to re-block merging.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In
`@ci-operator/step-registry/quay-tests/test-quay-e2e/quay-tests-test-quay-e2e-commands.sh`:
- Around line 7-19: Update copyArtifacts so the artifact-renaming loop skips
unmatched glob paths before calling basename or mv, while preserving the
existing behavior for actual artifacts and runs with no Cypress results.
🪄 Autofix

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Repository YAML (base), Central YAML (inherited)

Review profile: CHILL

Plan: Enterprise

Run ID: 78bba44b-f8d5-4b75-acd3-298bdd1c37a8

📥 Commits

Reviewing files that changed from the base of the PR and between d189835 and 591466e.

⛔ Files ignored due to path filters (1)
  • ci-operator/jobs/quay/quay-tests/quay-quay-tests-master-periodics.yaml is excluded by !ci-operator/jobs/**
📒 Files selected for processing (9)
  • ci-operator/config/quay/quay-tests/quay-quay-tests-master__ocp-4.22-quay-lpGA-lp-ocp-compat.yaml
  • ci-operator/step-registry/quay-tests/cso-qe-test/quay-tests-cso-qe-test-commands.sh
  • ci-operator/step-registry/quay-tests/cso-qe-test/quay-tests-cso-qe-test-ref.yaml
  • ci-operator/step-registry/quay-tests/deploy-quay-aws-s3/quay-tests-deploy-quay-aws-s3-commands.sh
  • ci-operator/step-registry/quay-tests/deploy-quay-aws-s3/quay-tests-deploy-quay-aws-s3-ref.yaml
  • ci-operator/step-registry/quay-tests/qbo-qe-test/quay-tests-qbo-qe-test-commands.sh
  • ci-operator/step-registry/quay-tests/qbo-qe-test/quay-tests-qbo-qe-test-ref.yaml
  • ci-operator/step-registry/quay-tests/test-quay-e2e/quay-tests-test-quay-e2e-commands.sh
  • ci-operator/step-registry/quay-tests/test-quay-e2e/quay-tests-test-quay-e2e-ref.yaml

Comment on lines +7 to +19
mkdir -p $ARTIFACT_DIR

function copyArtifacts {
typeset junitPrefix="junit_"
cp -r ./cypress/results/* "$ARTIFACT_DIR" || true

for file in "$ARTIFACT_DIR"/*; do
if [[ ! "$(basename "$file")" =~ ^"$junitPrefix" ]]; then
result_file="$ARTIFACT_DIR"/"$junitPrefix""$(basename "$file")"
mv "$file" "$result_file"
fi
done
cp -r ./cypress/videos/* "$ARTIFACT_DIR" || true

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🩺 Stability & Availability | 🟡 Minor | ⚡ Quick win

Skip unmatched artifact paths.

cp tolerates missing Cypress results, but an unmatched "$ARTIFACT_DIR"/* remains a literal path in Bash. The loop then calls mv on that nonexistent path. A run without results can fail from the EXIT trap.

Proposed fix
- mkdir -p $ARTIFACT_DIR
+ mkdir -p "$ARTIFACT_DIR"
 
     for file in "$ARTIFACT_DIR"/*; do
+        [[ -e "$file" ]] || continue
         if [[ ! "$(basename "$file")" =~ ^"$junitPrefix" ]]; then
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
mkdir -p $ARTIFACT_DIR
function copyArtifacts {
typeset junitPrefix="junit_"
cp -r ./cypress/results/* "$ARTIFACT_DIR" || true
for file in "$ARTIFACT_DIR"/*; do
if [[ ! "$(basename "$file")" =~ ^"$junitPrefix" ]]; then
result_file="$ARTIFACT_DIR"/"$junitPrefix""$(basename "$file")"
mv "$file" "$result_file"
fi
done
cp -r ./cypress/videos/* "$ARTIFACT_DIR" || true
mkdir -p "$ARTIFACT_DIR"
function copyArtifacts {
typeset junitPrefix="junit_"
cp -r ./cypress/results/* "$ARTIFACT_DIR" || true
for file in "$ARTIFACT_DIR"/*; do
[[ -e "$file" ]] || continue
if [[ ! "$(basename "$file")" =~ ^"$junitPrefix" ]]; then
result_file="$ARTIFACT_DIR"/"$junitPrefix""$(basename "$file")"
mv "$file" "$result_file"
fi
done
cp -r ./cypress/videos/* "$ARTIFACT_DIR" || true
🧰 Tools
🪛 Shellcheck (0.11.0)

[info] 7-7: Double quote to prevent globbing and word splitting.

(SC2086)

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In
`@ci-operator/step-registry/quay-tests/test-quay-e2e/quay-tests-test-quay-e2e-commands.sh`
around lines 7 - 19, Update copyArtifacts so the artifact-renaming loop skips
unmatched glob paths before calling basename or mv, while preserving the
existing behavior for actual artifacts and runs with no Cypress results.

Source: Linters/SAST tools

@amiskin94

Copy link
Copy Markdown
Contributor

Hey @oharan2, reviewed the PR — looks great overall! Clean migration from the legacy yq/mapTestsForComponentReadiness approach to ExitTrap. A few things I noticed:

1. Missing grace_period on cso-qe-test and qbo-qe-test ref.yamls

Both refs now use trap but don't have grace_period set. This will fail the ci-operator-registry validation — we hit the exact same error on PR #82881:

test 'acm-tests-grc' has 'commands' containing 'trap' command, but test step is missing grace_period

Only deploy-quay-aws-s3 got grace_period: 10m added. cso-qe-test and qbo-qe-test need it too.

2. No download timeouts on wget/curl

The ExitTrap--PostProcessPrep download has no bounded timeouts. We addressed this in #82881 after CodeRabbit flagged it — added --connect-timeout 10 --max-time 30 for curl and --timeout=30 for wget. Suggest applying the same here:

type -t wget 1>/dev/null && _fURL=(wget --timeout=30 -qO-) || _fURL=(curl --connect-timeout 10 --max-time 30 -fsSL)

3. No function existence guard after eval

If the download fails, eval runs on empty output and the trap references an undefined ExitTrap--PostProcessPrep. We added a type -t ExitTrap--PostProcessPrep guard after the eval in #82881 — gracefully degrades with a warning if the helper isn't available. Worth adopting the same pattern.

4. Indentation — URL not indented in 2 files

In deploy-quay-aws-s3-commands.sh and test-quay-e2e-commands.sh, the URL line isn't indented to match the other refs:

        "${_fURL[@]}" \
https://raw.githubusercontent.com/...   # <-- should be indented

See commit 62426a4 on #82881 for the timeout + guard pattern we're using.

@openshift-ci

openshift-ci Bot commented Aug 5, 2026

Copy link
Copy Markdown
Contributor

@oharan2: all tests passed!

Full PR test history. Your PR dashboard.

Details

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. I understand the commands that are listed here.

@oharan2

oharan2 commented Aug 7, 2026

Copy link
Copy Markdown
Contributor Author

@amiskin94 In the files I didn't add grace period - it's already there
2-3 asked in team channel
4 Will address, thanks

@oharan2

oharan2 commented Aug 7, 2026

Copy link
Copy Markdown
Contributor Author

/pj-rehearse ack

@openshift-merge-bot

Copy link
Copy Markdown
Contributor

@oharan2: now processing your pj-rehearse request. Please allow up to 10 minutes for jobs to trigger or cancel.

@openshift-merge-bot openshift-merge-bot Bot added the rehearsals-ack Signifies that rehearsal jobs have been acknowledged label Aug 7, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

rehearsals-ack Signifies that rehearsal jobs have been acknowledged

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants