Skip to content

OSAC-1379: Add run_if_changed filters to osac-test-infra Prow presubmits#80584

Merged
openshift-merge-bot[bot] merged 1 commit into
openshift:mainfrom
amej:task-OSAC-1379
Jun 17, 2026
Merged

OSAC-1379: Add run_if_changed filters to osac-test-infra Prow presubmits#80584
openshift-merge-bot[bot] merged 1 commit into
openshift:mainfrom
amej:task-OSAC-1379

Conversation

@amej

@amej amej commented Jun 16, 2026

Copy link
Copy Markdown
Contributor

[OSAC-1379](https://redhat.atlassian.net/browse/OS[AC-1](https://redhat.atlassian.net/browse/AC-1)379): Add run_if_changed filters to osac-test-infra Prow presubmits

Jira: https://issues.redhat.com/browse/OS[AC-1](https://redhat.atlassian.net/browse/AC-1)379
Story type: [INFRA] CI Pipeline Optimization

Summary

Optimizes CI resource usage for osac-test-infra by adding a skip_if_only_changed filter to the e2e-vmaas presubmit job. Doc-only PRs (README, markdown files, linting configs, ownership files) will no longer trigger the expensive e2e-vmaas test, while the images job continues to run on all PRs for additional validation.

Changes

CI Operator Config (ci-operator/config/osac-project/osac-test-infra/):

  • Added skip_if_only_changed filter to e2e-vmaas test with denylist regex pattern
  • Pattern matches: documentation (.md, docs/), AI/Claude config (.ai-bot/, .claude/rules/), linting config (.golangci.yml, .yamllint.yaml, .pre-commit-config.yaml), build artifacts (.dockerignore, .gitattributes), ownership (OWNERS, LICENSE), and downloaded tools (bin/)

Generated Prow Jobs (ci-operator/jobs/osac-project/osac-test-infra/):

  • Changed always_run: truealways_run: false for e2e-vmaas job
  • Added matching skip_if_only_changed filter to generated presubmit

Testing

  • Configuration validation: Changes follow established CI Operator and Prow schemas
  • Pattern source: Regex pattern matches osac-operator implementation ([OSAC-1375](https://redhat.atlassian.net/browse/OS[AC-1](https://redhat.atlassian.net/browse/AC-1)375)) for consistency across OSAC repositories
  • Rehearsal jobs: Prow will automatically run rehearsal jobs to validate the filter behavior
  • Post-merge validation: Subsequent doc-only PRs to osac-test-infra will demonstrate the filter working correctly

Acceptance Criteria

  • AC-1: Audit the repo's directory structure to determine which paths are relevant to each job
  • AC-2: Define appropriate run_if_changed regex patterns (e.g., exclude docs, README, unrelated configs)
  • AC-3: Set always_run: false and add run_if_changed (or skip_if_only_changed) to each job
  • AC-4: Update the Prow config at ci-operator/jobs/osac-project/osac-test-infra/osac-project-osac-test-infra-main-presubmits.yaml in openshift/release
  • AC-5: Open a PR against openshift/release and get it merged

Notes

Summary by CodeRabbit

This PR optimizes CI resource usage for the osac-test-infra repository's continuous integration pipeline by adding a skip filter to the e2e-vmaas presubmit job.

What changed: The CI operator configuration for osac-test-infra now includes a skip_if_only_changed filter on the e2e-vmaas test. This filter prevents the test from running when a pull request only modifies documentation files (*.md, docs/), configuration files (.golangci.yml, .yamllint.yaml, pre-commit configs), AI/Claude bot configurations, ownership metadata, and downloaded tools in the bin/ directory.

Practical impact: Pull requests that only update documentation or non-code files will no longer trigger the e2e-vmaas test, reducing unnecessary CI resource consumption. The images presubmit job remains unaffected and continues running on all PRs, as image builds are fast and provide additional validation value.

Implementation approach: The filter uses a denylist pattern, meaning new file types will trigger tests by default unless explicitly excluded. This ensures the CI remains comprehensive for genuine code changes while avoiding wasteful test runs for documentation-only updates.

Skip e2e-vmaas tests when PRs only modify documentation, linting
configs, ownership files, or downloaded binaries. Uses skip_if_only_changed
denylist approach to ensure new file types trigger tests by default.

Filters documentation (*.md, docs/, .ai-bot/, .claude/rules/), linting
configs (.golangci.yml, .yamllint.yaml, .pre-commit-config*.yaml),
build artifacts (.dockerignore, .gitattributes), ownership (OWNERS,
LICENSE), and downloaded tools (bin/).

Relates to: OSAC-1379
Assisted-by: Claude Sonnet 4.5 <noreply@anthropic.com>

rh-pre-commit.version: 2.4.0
rh-pre-commit.check-secrets: ENABLED
@openshift-ci-robot

openshift-ci-robot commented Jun 16, 2026

Copy link
Copy Markdown
Contributor

@amej: This pull request references OSAC-1379 which is a valid jira issue.

Warning: The referenced jira issue has an invalid target version for the target branch this PR targets: expected the task to target the "5.0.0" version, but no target version was set.

Details

In response to this:

OSAC-1379: Add run_if_changed filters to osac-test-infra Prow presubmits

Jira: https://issues.redhat.com/browse/OS[AC-1](https://redhat.atlassian.net/browse/AC-1)379
Story type: [INFRA] CI Pipeline Optimization

Summary

Optimizes CI resource usage for osac-test-infra by adding a skip_if_only_changed filter to the e2e-vmaas presubmit job. Doc-only PRs (README, markdown files, linting configs, ownership files) will no longer trigger the expensive e2e-vmaas test, while the images job continues to run on all PRs for additional validation.

Changes

CI Operator Config (ci-operator/config/osac-project/osac-test-infra/):

  • Added skip_if_only_changed filter to e2e-vmaas test with denylist regex pattern
  • Pattern matches: documentation (.md, docs/), AI/Claude config (.ai-bot/, .claude/rules/), linting config (.golangci.yml, .yamllint.yaml, .pre-commit-config.yaml), build artifacts (.dockerignore, .gitattributes), ownership (OWNERS, LICENSE), and downloaded tools (bin/)

Generated Prow Jobs (ci-operator/jobs/osac-project/osac-test-infra/):

  • Changed always_run: truealways_run: false for e2e-vmaas job
  • Added matching skip_if_only_changed filter to generated presubmit

Testing

  • Configuration validation: Changes follow established CI Operator and Prow schemas
  • Pattern source: Regex pattern matches osac-operator implementation (OSAC-1375) for consistency across OSAC repositories
  • Rehearsal jobs: Prow will automatically run rehearsal jobs to validate the filter behavior
  • Post-merge validation: Subsequent doc-only PRs to osac-test-infra will demonstrate the filter working correctly

Acceptance Criteria

  • AC-1: Audit the repo's directory structure to determine which paths are relevant to each job
  • AC-2: Define appropriate run_if_changed regex patterns (e.g., exclude docs, README, unrelated configs)
  • AC-3: Set always_run: false and add run_if_changed (or skip_if_only_changed) to each job
  • AC-4: Update the Prow config at ci-operator/jobs/osac-project/osac-test-infra/osac-project-osac-test-infra-main-presubmits.yaml in openshift/release
  • AC-5: Open a PR against openshift/release and get it merged

Notes

  • The images presubmit job continues to run on all PRs (no filter applied) as image builds are quick and provide additional validation
  • Uses denylist approach (skip_if_only_changed) to ensure new file types trigger tests by default
  • Follows same pattern as osac-operator (OSAC-1375) for consistency across OSAC project repositories

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 openshift-eng/jira-lifecycle-plugin repository.

@openshift-ci-robot openshift-ci-robot added the jira/valid-reference Indicates that this PR references a valid Jira ticket of any type. label Jun 16, 2026
@openshift-ci openshift-ci Bot added the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Jun 16, 2026
@openshift-ci

openshift-ci Bot commented Jun 16, 2026

Copy link
Copy Markdown
Contributor

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

@coderabbitai

coderabbitai Bot commented Jun 16, 2026

Copy link
Copy Markdown
Contributor

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

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

Review profile: CHILL

Plan: Enterprise

Run ID: 01c8f3b0-119d-4427-80ac-2706abeda3ed

📥 Commits

Reviewing files that changed from the base of the PR and between 2294d24 and 661676f.

⛔ Files ignored due to path filters (1)
  • ci-operator/jobs/osac-project/osac-test-infra/osac-project-osac-test-infra-main-presubmits.yaml is excluded by !ci-operator/jobs/**
📒 Files selected for processing (1)
  • ci-operator/config/osac-project/osac-test-infra/osac-project-osac-test-infra-main.yaml

Walkthrough

Adds a skip_if_only_changed regex field to the e2e-vmaas test definition in osac-project-osac-test-infra-main.yaml. The regex matches documentation, repo metadata/bot/config, lint/pre-commit, docker/owner/license files, and bin/*, causing CI to skip the test when only those files are changed.

Changes

e2e-vmaas CI Skip Condition

Layer / File(s) Summary
skip_if_only_changed for e2e-vmaas
ci-operator/config/osac-project/osac-test-infra/osac-project-osac-test-infra-main.yaml
Adds a skip_if_only_changed regex to the e2e-vmaas test entry, skipping the test when only documentation, config, bot, lint, docker/owner/license, or bin/* files are modified.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~2 minutes

Possibly related PRs

  • openshift/release#80463: Adds the same skip_if_only_changed field and regex behavior to the e2e-vmaas test in a related CI config file.
  • openshift/release#80411: Adds an identical skip_if_only_changed denylist filter to the e2e-vmaas presubmit job in a different target YAML.
  • openshift/release#80381: Modifies the e2e-vmaas CI test's change-detection behavior using path-based regex filters (run_if_changed adding charts/).

Suggested labels

lgtm, approved, rehearsals-ack

Suggested reviewers

  • jhernand
  • eliorerz
  • akshaynadkarni
🚥 Pre-merge checks | ✅ 14 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Title check ⚠️ Warning The title refers to adding 'run_if_changed' filters, but the actual change implements 'skip_if_only_changed' filters, which are conceptually different (denylist vs allowlist approach). Update the PR title to accurately reflect the implementation: 'OSAC-1379: Add skip_if_only_changed filters to osac-test-infra Prow presubmits' to match the actual changes made.
✅ Passed checks (14 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
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 This PR modifies only CI Operator and Prow configuration files (YAML), not Ginkgo test code. No test title definitions are present in the changes, making the check inapplicable.
Test Structure And Quality ✅ Passed PR modifies CI configuration YAML files and Prow job definitions, not Ginkgo test code. Custom check for Ginkgo test quality is not applicable.
Microshift Test Compatibility ✅ Passed This PR modifies only CI operator configuration (YAML) to add skip filters for existing tests. No new Ginkgo e2e tests are added, so the MicroShift compatibility check is not applicable.
Single Node Openshift (Sno) Test Compatibility ✅ Passed PR modifies only CI operator YAML configuration to add skip_if_only_changed filter to existing tests. No new Ginkgo e2e tests are added, making this check not applicable.
Topology-Aware Scheduling Compatibility ✅ Passed PR modifies only CI Operator test configuration (skip_if_only_changed filter), not deployment manifests, operator code, or controllers. No scheduling constraints are introduced.
Ote Binary Stdout Contract ✅ Passed This PR modifies only CI operator YAML configuration files to add skip filters for the e2e-vmaas test. It contains no Go source code, test implementation, or OTE binary changes, making the OTE Bina...
Ipv6 And Disconnected Network Test Compatibility ✅ Passed This PR adds CI Operator configuration only (YAML files), not new Ginkgo e2e tests. The check targets new e2e tests with IPv4/connectivity issues; since none are added, it does not apply.
No-Weak-Crypto ✅ Passed PR adds a skip_if_only_changed CI filter with a regex for documentation and config files. No weak crypto (MD5, SHA1, DES, RC4, 3DES, Blowfish, ECB), custom crypto implementations, or insecure secre...
Container-Privileges ✅ Passed PR contains no privileged container settings, dangerous capabilities, or root execution configurations. Changes are limited to CI workflow filter optimization.
No-Sensitive-Data-In-Logs ✅ Passed PR adds only configuration field skip_if_only_changed with file path regex pattern; no logging statements or sensitive data included.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

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

@openshift-merge-bot

Copy link
Copy Markdown
Contributor

[REHEARSALNOTIFIER]
@amej: 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-osac-project-osac-test-infra-main-e2e-vmaas osac-project/osac-test-infra presubmit Ci-operator config changed

Prior to this PR being merged, you will need to either run and acknowledge or opt to skip these rehearsals.

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.

@amej

amej commented Jun 16, 2026

Copy link
Copy Markdown
Contributor Author

/pj-rehearse auto-ack

@openshift-merge-bot

Copy link
Copy Markdown
Contributor

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

@amej

amej commented Jun 16, 2026

Copy link
Copy Markdown
Contributor Author

/test all

@openshift-merge-bot openshift-merge-bot Bot added the rehearsals-ack Signifies that rehearsal jobs have been acknowledged label Jun 16, 2026
@amej amej marked this pull request as ready for review June 16, 2026 16:29
@openshift-ci openshift-ci Bot removed the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Jun 16, 2026
@amej

amej commented Jun 17, 2026

Copy link
Copy Markdown
Contributor Author

@eliorerz : Please review and approve.

@eliorerz eliorerz 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.

LGTM

@openshift-ci openshift-ci Bot added the lgtm Indicates that a PR is ready to be merged. label Jun 17, 2026
@openshift-ci

openshift-ci Bot commented Jun 17, 2026

Copy link
Copy Markdown
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: amej, eliorerz

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

The pull request process is described 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

@openshift-ci openshift-ci Bot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Jun 17, 2026
@openshift-merge-bot openshift-merge-bot Bot merged commit 5bc58ff into openshift:main Jun 17, 2026
16 of 17 checks passed
@amej amej deleted the task-OSAC-1379 branch June 18, 2026 04:28
kasturinarra pushed a commit to kasturinarra/release that referenced this pull request Jun 19, 2026
…ift#80584)

Skip e2e-vmaas tests when PRs only modify documentation, linting
configs, ownership files, or downloaded binaries. Uses skip_if_only_changed
denylist approach to ensure new file types trigger tests by default.

Filters documentation (*.md, docs/, .ai-bot/, .claude/rules/), linting
configs (.golangci.yml, .yamllint.yaml, .pre-commit-config*.yaml),
build artifacts (.dockerignore, .gitattributes), ownership (OWNERS,
LICENSE), and downloaded tools (bin/).

Relates to: OSAC-1379
Assisted-by: Claude Sonnet 4.5 <noreply@anthropic.com>

rh-pre-commit.version: 2.4.0
rh-pre-commit.check-secrets: ENABLED
krisnababu pushed a commit to krisnababu/release that referenced this pull request Jun 29, 2026
…ift#80584)

Skip e2e-vmaas tests when PRs only modify documentation, linting
configs, ownership files, or downloaded binaries. Uses skip_if_only_changed
denylist approach to ensure new file types trigger tests by default.

Filters documentation (*.md, docs/, .ai-bot/, .claude/rules/), linting
configs (.golangci.yml, .yamllint.yaml, .pre-commit-config*.yaml),
build artifacts (.dockerignore, .gitattributes), ownership (OWNERS,
LICENSE), and downloaded tools (bin/).

Relates to: OSAC-1379
Assisted-by: Claude Sonnet 4.5 <noreply@anthropic.com>

rh-pre-commit.version: 2.4.0
rh-pre-commit.check-secrets: ENABLED
krisnababu pushed a commit to oharan2/release that referenced this pull request Jul 3, 2026
…ift#80584)

Skip e2e-vmaas tests when PRs only modify documentation, linting
configs, ownership files, or downloaded binaries. Uses skip_if_only_changed
denylist approach to ensure new file types trigger tests by default.

Filters documentation (*.md, docs/, .ai-bot/, .claude/rules/), linting
configs (.golangci.yml, .yamllint.yaml, .pre-commit-config*.yaml),
build artifacts (.dockerignore, .gitattributes), ownership (OWNERS,
LICENSE), and downloaded tools (bin/).

Relates to: OSAC-1379
Assisted-by: Claude Sonnet 4.5 <noreply@anthropic.com>

rh-pre-commit.version: 2.4.0
rh-pre-commit.check-secrets: ENABLED
andrej1991 pushed a commit to andrej1991/release that referenced this pull request Jul 6, 2026
…ift#80584)

Skip e2e-vmaas tests when PRs only modify documentation, linting
configs, ownership files, or downloaded binaries. Uses skip_if_only_changed
denylist approach to ensure new file types trigger tests by default.

Filters documentation (*.md, docs/, .ai-bot/, .claude/rules/), linting
configs (.golangci.yml, .yamllint.yaml, .pre-commit-config*.yaml),
build artifacts (.dockerignore, .gitattributes), ownership (OWNERS,
LICENSE), and downloaded tools (bin/).

Relates to: OSAC-1379
Assisted-by: Claude Sonnet 4.5 <noreply@anthropic.com>

rh-pre-commit.version: 2.4.0
rh-pre-commit.check-secrets: ENABLED
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

approved Indicates a PR has been approved by an approver from all required OWNERS files. jira/valid-reference Indicates that this PR references a valid Jira ticket of any type. lgtm Indicates that a PR is ready to be merged. rehearsals-ack Signifies that rehearsal jobs have been acknowledged

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants