Skip to content

OSAC-1378: add skip_if_only_changed to reduce unnecessary CI runs#80513

Open
amej wants to merge 3 commits into
openshift:mainfrom
amej:task-OSAC-1378
Open

OSAC-1378: add skip_if_only_changed to reduce unnecessary CI runs#80513
amej wants to merge 3 commits into
openshift:mainfrom
amej:task-OSAC-1378

Conversation

@amej

@amej amej commented Jun 15, 2026

Copy link
Copy Markdown
Contributor

OSAC-1378: add skip_if_only_changed to reduce unnecessary CI runs

Jira: https://redhat.atlassian.net/browse/OS[AC-1](https://redhat.atlassian.net/browse/AC-1)378
Story type: [DEV]

Summary

This PR optimizes CI resource usage for the fulfillment-service repository by adding skip_if_only_changed filters to two presubmit test jobs (unit and e2e-vmaas). Previously, all jobs ran on every PR regardless of changed files. Now, test jobs intelligently skip when only documentation or unrelated files change, while images always build for safety.

Changes

CI Operator Config (ci-operator/config/osac-project/fulfillment-service/osac-project-fulfillment-service-main.yaml):

  • Added skip_if_only_changed: ^.*\.(md|adoc)$|^LICENSE$|^charts/|^it/|^\.github/workflows/ to unit test
  • Added skip_if_only_changed: ^.*\.(md|adoc)$|^LICENSE$|^\.github/workflows/ to e2e-vmaas test
  • Images section: No filtering (always build for safety)

Prow Jobs (ci-operator/jobs/osac-project/fulfillment-service/osac-project-fulfillment-service-main-presubmits.yaml):

  • Auto-generated by make update
  • Unit and e2e-vmaas jobs: always_run: false with skip patterns
  • Images job: always_run: true (no filtering, builds on every PR)

Testing

Validation performed:

  • ✅ YAML syntax validation (manual Python script due to worktree environment)
  • ✅ Regex pattern correctness testing (verified with grep against fulfillment-service repo)
  • ✅ Prow configuration rules validation (always_run: false, mutual exclusivity checks)
  • ✅ Pattern propagation verification (all three jobs updated correctly)
  • ✅ Self-review gate (5 findings, 3 dismissed, 2 downgraded to non-blocking documentation)

Post-merge testing plan:
Create test PRs in fulfillment-service repository to verify runtime behavior:

  • Doc-only PR (change README.md) → unit and e2e skip, images run
  • Source change (change Go files) → all jobs run
  • Chart-only (change charts/) → unit skips, images and e2e run
  • Mixed PR (docs + code) → all jobs run

Key Implementation Detail

During validation, discovered and fixed a critical regex bug where ^.*(md|adoc)$ would incorrectly match files like cmd/server.go (contains 'md' substring). Fixed to ^.*\.(md|adoc)$ (escaped dot) to only match file extensions.

Acceptance Criteria

  • AC-1: Audit fulfillment-service repository directory structure
  • AC-2: Define appropriate regex patterns for run_if_changed or skip_if_only_changed
  • AC-3: Set always_run: false and add filtering to each job
  • AC-4: Update Prow configuration in openshift/release
  • AC-5: Open and merge PR to openshift/release (this PR)

Summary by CodeRabbit

This PR optimizes CI resource usage for the fulfillment-service repository by adding conditional skip patterns to three presubmit jobs in the OpenShift CI infrastructure. Jobs will now skip execution when only documentation, license files, configuration, and integration test infrastructure are modified.

Changes Made

CI Operator Configuration (ci-operator/config/osac-project/fulfillment-service/osac-project-fulfillment-service-main.yaml):

  • Added skip_if_only_changed patterns to the images build definition
  • Added skip_if_only_changed patterns to the unit test job
  • Added skip_if_only_changed patterns to the e2e-vmaas test job

The patterns are tailored by job purpose:

  • Unit test: Skips for .md/.adoc files, LICENSE, charts/, it/, and .github/workflows/
  • Images job: Skips for .md/.adoc files, LICENSE, .github/workflows/, and it/charts/
  • E2E VMaaS test: Skips for .md/.adoc files, LICENSE, and .github/workflows/ only (most permissive since integration testing requires broader artifact availability)

Prow Jobs Configuration (ci-operator/jobs/osac-project/fulfillment-service/osac-project-fulfillment-service-main-presubmits.yaml):

  • Auto-generated file updated with matching skip_if_only_changed patterns on all three presubmit jobs
  • All three jobs configured with always_run: false to enable the skip logic

Implementation Details

A critical bug fix was applied during development: the original regex pattern ^.*(md|adoc)$ was corrected to ^.*\.(md|adoc)$. The original pattern would incorrectly match any file containing 'md' or 'adoc' as substrings (e.g., cmd/server.go). The corrected pattern with an escaped dot properly matches only files with .md or .adoc extensions.

amej added 2 commits June 15, 2026 12:57
Add skip_if_only_changed filters to three fulfillment-service presubmit jobs
to reduce unnecessary CI resource usage when only documentation, charts, or
integration test infrastructure changes.

Changes:
- Unit test: Skip when only docs, LICENSE, charts, integration tests, or
  GitHub workflows change
  Pattern: ^.*(md|adoc)$|^LICENSE$|^charts/|^it/|^\.github/workflows/

- Images job: Skip when only docs, LICENSE, GitHub workflows, or integration
  test charts change
  Pattern: ^.*(md|adoc)$|^LICENSE$|^\.github/workflows/|^it/charts/

- E2E VMaaS test: Skip only for pure documentation changes (most permissive)
  Pattern: ^.*(md|adoc)$|^LICENSE$|^\.github/workflows/

All jobs now have always_run: false (set automatically by prowgen) and will
only run when relevant files change. This follows OpenShift CI best practices
using skip_if_only_changed for simpler, more maintainable patterns.

Assisted-by: Claude Code <noreply@anthropic.com>

rh-pre-commit.version: 2.4.0
rh-pre-commit.check-secrets: ENABLED
Fix the skip_if_only_changed patterns to correctly match only files with
.md or .adoc extensions, not files with 'md' or 'adoc' anywhere in their path.

Changed: ^.*(md|adoc)$ to ^.*\.(md|adoc)$

Without escaping the dot before the extension, the pattern would incorrectly
match files like cmd/server.go (contains 'md' substring).

Assisted-by: Claude Code <noreply@anthropic.com>

rh-pre-commit.version: 2.4.0
rh-pre-commit.check-secrets: ENABLED
@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 15, 2026
@openshift-ci

openshift-ci Bot commented Jun 15, 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

@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 15, 2026
@openshift-ci-robot

openshift-ci-robot commented Jun 15, 2026

Copy link
Copy Markdown
Contributor

@amej: This pull request references [OSAC-1378](https://redhat.atlassian.net/browse/OS[AC-1](https://redhat.atlassian.net/browse/AC-1)378) 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-1378](https://redhat.atlassian.net/browse/OS[AC-1](https://redhat.atlassian.net/browse/AC-1)378): add skip_if_only_changed to reduce unnecessary CI runs

Jira: https://redhat.atlassian.net/browse/OS[AC-1](https://redhat.atlassian.net/browse/AC-1)378
Story type: [DEV]

Summary

This PR optimizes CI resource usage for the fulfillment-service repository by adding skip_if_only_changed filters to three presubmit jobs (unit, images, e2e-vmaas). Previously, all jobs ran on every PR regardless of changed files. Now, jobs intelligently skip when only documentation, charts, or integration test infrastructure changes.

Changes

CI Operator Config (ci-operator/config/osac-project/fulfillment-service/osac-project-fulfillment-service-main.yaml):

  • Added skip_if_only_changed: ^.*\.(md|adoc)$|^LICENSE$|^charts/|^it/|^\.github/workflows/ to unit test
  • Added skip_if_only_changed: ^.*\.(md|adoc)$|^LICENSE$|^\.github/workflows/|^it/charts/ to images section
  • Added skip_if_only_changed: ^.*\.(md|adoc)$|^LICENSE$|^\.github/workflows/ to e2e-vmaas test

Prow Jobs (ci-operator/jobs/osac-project/fulfillment-service/osac-project-fulfillment-service-main-presubmits.yaml):

  • Auto-generated by make update with always_run: false for all three jobs
  • Skip patterns correctly propagated to all presubmit jobs

Testing

Validation performed:

  • ✅ YAML syntax validation (manual Python script due to worktree environment)
  • ✅ Regex pattern correctness testing (verified with grep against fulfillment-service repo)
  • ✅ Prow configuration rules validation (always_run: false, mutual exclusivity checks)
  • ✅ Pattern propagation verification (all three jobs updated correctly)
  • ✅ Self-review gate (5 findings, 3 dismissed, 2 downgraded to non-blocking documentation)

Post-merge testing plan:
Create test PRs in fulfillment-service repository to verify runtime behavior:

  • Doc-only PR (change README.md) → all jobs should skip
  • Source change (change Go files) → all jobs should run
  • Chart-only (change charts/) → unit skips, images and e2e run
  • Mixed PR (docs + code) → all jobs should run

Key Implementation Detail

During validation, discovered and fixed a critical regex bug where ^.*(md|adoc)$ would incorrectly match files like cmd/server.go (contains 'md' substring). Fixed to ^.*\.(md|adoc)$ (escaped dot) to only match file extensions.

Acceptance Criteria

  • AC-1: Audit fulfillment-service repository directory structure
  • AC-2: Define appropriate regex patterns for run_if_changed or skip_if_only_changed
  • AC-3: Set always_run: false and add filtering to each job
  • AC-4: Update Prow configuration in openshift/release
  • AC-5: Open and merge PR to openshift/release (this PR)

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 commented Jun 15, 2026

Copy link
Copy Markdown
Contributor

@amej: This pull request references [OSAC-1378](https://redhat.atlassian.net/browse/OS[AC-1](https://redhat.atlassian.net/browse/AC-1)378) 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-1378: add skip_if_only_changed to reduce unnecessary CI runs

Jira: https://redhat.atlassian.net/browse/OS[AC-1](https://redhat.atlassian.net/browse/AC-1)378
Story type: [DEV]

Summary

This PR optimizes CI resource usage for the fulfillment-service repository by adding skip_if_only_changed filters to three presubmit jobs (unit, images, e2e-vmaas). Previously, all jobs ran on every PR regardless of changed files. Now, jobs intelligently skip when only documentation, charts, or integration test infrastructure changes.

Changes

CI Operator Config (ci-operator/config/osac-project/fulfillment-service/osac-project-fulfillment-service-main.yaml):

  • Added skip_if_only_changed: ^.*\.(md|adoc)$|^LICENSE$|^charts/|^it/|^\.github/workflows/ to unit test
  • Added skip_if_only_changed: ^.*\.(md|adoc)$|^LICENSE$|^\.github/workflows/|^it/charts/ to images section
  • Added skip_if_only_changed: ^.*\.(md|adoc)$|^LICENSE$|^\.github/workflows/ to e2e-vmaas test

Prow Jobs (ci-operator/jobs/osac-project/fulfillment-service/osac-project-fulfillment-service-main-presubmits.yaml):

  • Auto-generated by make update with always_run: false for all three jobs
  • Skip patterns correctly propagated to all presubmit jobs

Testing

Validation performed:

  • ✅ YAML syntax validation (manual Python script due to worktree environment)
  • ✅ Regex pattern correctness testing (verified with grep against fulfillment-service repo)
  • ✅ Prow configuration rules validation (always_run: false, mutual exclusivity checks)
  • ✅ Pattern propagation verification (all three jobs updated correctly)
  • ✅ Self-review gate (5 findings, 3 dismissed, 2 downgraded to non-blocking documentation)

Post-merge testing plan:
Create test PRs in fulfillment-service repository to verify runtime behavior:

  • Doc-only PR (change README.md) → all jobs should skip
  • Source change (change Go files) → all jobs should run
  • Chart-only (change charts/) → unit skips, images and e2e run
  • Mixed PR (docs + code) → all jobs should run

Key Implementation Detail

During validation, discovered and fixed a critical regex bug where ^.*(md|adoc)$ would incorrectly match files like cmd/server.go (contains 'md' substring). Fixed to ^.*\.(md|adoc)$ (escaped dot) to only match file extensions.

Acceptance Criteria

  • AC-1: Audit fulfillment-service repository directory structure
  • AC-2: Define appropriate regex patterns for run_if_changed or skip_if_only_changed
  • AC-3: Set always_run: false and add filtering to each job
  • AC-4: Update Prow configuration in openshift/release
  • AC-5: Open and merge PR to openshift/release (this PR)

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

openshift-ci Bot commented Jun 15, 2026

Copy link
Copy Markdown
Contributor

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: amej
Once this PR has been reviewed and has the lgtm label, please assign jhernand 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

@coderabbitai

coderabbitai Bot commented Jun 15, 2026

Copy link
Copy Markdown
Contributor

Walkthrough

The CI pipeline configuration for osac-project/fulfillment-service adds skip_if_only_changed patterns to two test cases to prevent unnecessary workflow runs. The unit test and e2e-vmaas test both receive skip rules that trigger when changes are limited to markdown/adoc, LICENSE, .github/workflows/, charts/, and it/ directories.

Changes

Test Skip Configuration

Layer / File(s) Summary
Add skip_if_only_changed rules to unit and e2e-vmaas tests
ci-operator/config/osac-project/fulfillment-service/osac-project-fulfillment-service-main.yaml
Line 77 adds skip_if_only_changed to the unit test block. Lines 78–81 add skip_if_only_changed to the e2e-vmaas test block, preserving the existing intranet capability. Both rules skip workflow runs when changes affect only documentation, charts, workflows, and integration test directories.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~2 minutes

Possibly related PRs

  • openshift/release#80411: Both PRs add skip_if_only_changed filtering to the e2e-vmaas test job in OSAC project CI operator YAML configs.
  • openshift/release#80463: Both PRs modify Prow test configurations to add skip_if_only_changed filtering for the e2e-vmaas test across different CI config files.
  • openshift/release#80381: Both PRs adjust path-based filtering for the e2e-vmaas job to include the charts/ directory in OSAC CI configuration.

Suggested reviewers

  • akshaynadkarni
  • jhernand
🚥 Pre-merge checks | ✅ 15
✅ Passed checks (15 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly and specifically summarizes the main change: adding skip_if_only_changed filters to reduce unnecessary CI runs in the fulfillment-service repository.
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 PR modifies only CI configuration YAML files, not Ginkgo test code. No Ginkgo tests exist in the repository or are modified in this PR.
Test Structure And Quality ✅ Passed This PR modifies only YAML CI configuration files and contains no Ginkgo test code. The custom check for test code quality is not applicable to YAML configuration changes.
Microshift Test Compatibility ✅ Passed This PR modifies only CI configuration YAML files (ci-operator config and Prow jobs), not test source code. No new Ginkgo e2e tests or any test code files are added, so the MicroShift compatibility...
Single Node Openshift (Sno) Test Compatibility ✅ Passed This PR only modifies CI/CD infrastructure YAML configuration files (ci-operator config and Prow jobs) to add skip_if_only_changed filters. It does not add any new Ginkgo e2e tests (It(), Describe(...
Topology-Aware Scheduling Compatibility ✅ Passed PR modifies only CI/CD configuration files (Prow jobs and CI Operator configs) to add skip_if_only_changed filters. No deployment manifests, operator code, controllers, or scheduling constraints ar...
Ote Binary Stdout Contract ✅ Passed PR contains only CI configuration YAML files for openshift/release, not application or test code; OTE Binary Stdout Contract check applies only to executable binaries and test code, not CI configur...
Ipv6 And Disconnected Network Test Compatibility ✅ Passed This PR modifies only CI operator YAML configuration files, not Ginkgo test code. No new e2e tests were added, so the IPv6/disconnected network compatibility check does not apply.
No-Weak-Crypto ✅ Passed PR contains only CI/CD configuration changes (YAML files). No weak cryptography, custom crypto implementations, or insecure secret comparisons are introduced.
Container-Privileges ✅ Passed This PR modifies CI operator and Prow configuration files (YAML) that do not contain Kubernetes container manifests with security settings. The changes add skip_if_only_changed filters to CI jobs;...
No-Sensitive-Data-In-Logs ✅ Passed PR adds CI job filtering patterns to skip unnecessary runs. No logging statements expose passwords, tokens, API keys, PII, or other sensitive data. References to credentials are proper file path po...
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.

✏️ 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-ci-robot

openshift-ci-robot commented Jun 15, 2026

Copy link
Copy Markdown
Contributor

@amej: This pull request references [OSAC-1378](https://redhat.atlassian.net/browse/OS[AC-1](https://redhat.atlassian.net/browse/AC-1)378) 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-1378: add skip_if_only_changed to reduce unnecessary CI runs

Jira: https://redhat.atlassian.net/browse/OS[AC-1](https://redhat.atlassian.net/browse/AC-1)378
Story type: [DEV]

Summary

This PR optimizes CI resource usage for the fulfillment-service repository by adding skip_if_only_changed filters to three presubmit jobs (unit, images, e2e-vmaas). Previously, all jobs ran on every PR regardless of changed files. Now, jobs intelligently skip when only documentation, charts, or integration test infrastructure changes.

Changes

CI Operator Config (ci-operator/config/osac-project/fulfillment-service/osac-project-fulfillment-service-main.yaml):

  • Added skip_if_only_changed: ^.*\.(md|adoc)$|^LICENSE$|^charts/|^it/|^\.github/workflows/ to unit test
  • Added skip_if_only_changed: ^.*\.(md|adoc)$|^LICENSE$|^\.github/workflows/|^it/charts/ to images section
  • Added skip_if_only_changed: ^.*\.(md|adoc)$|^LICENSE$|^\.github/workflows/ to e2e-vmaas test

Prow Jobs (ci-operator/jobs/osac-project/fulfillment-service/osac-project-fulfillment-service-main-presubmits.yaml):

  • Auto-generated by make update with always_run: false for all three jobs
  • Skip patterns correctly propagated to all presubmit jobs

Testing

Validation performed:

  • ✅ YAML syntax validation (manual Python script due to worktree environment)
  • ✅ Regex pattern correctness testing (verified with grep against fulfillment-service repo)
  • ✅ Prow configuration rules validation (always_run: false, mutual exclusivity checks)
  • ✅ Pattern propagation verification (all three jobs updated correctly)
  • ✅ Self-review gate (5 findings, 3 dismissed, 2 downgraded to non-blocking documentation)

Post-merge testing plan:
Create test PRs in fulfillment-service repository to verify runtime behavior:

  • Doc-only PR (change README.md) → all jobs should skip
  • Source change (change Go files) → all jobs should run
  • Chart-only (change charts/) → unit skips, images and e2e run
  • Mixed PR (docs + code) → all jobs should run

Key Implementation Detail

During validation, discovered and fixed a critical regex bug where ^.*(md|adoc)$ would incorrectly match files like cmd/server.go (contains 'md' substring). Fixed to ^.*\.(md|adoc)$ (escaped dot) to only match file extensions.

Acceptance Criteria

  • AC-1: Audit fulfillment-service repository directory structure
  • AC-2: Define appropriate regex patterns for run_if_changed or skip_if_only_changed
  • AC-3: Set always_run: false and add filtering to each job
  • AC-4: Update Prow configuration in openshift/release
  • AC-5: Open and merge PR to openshift/release (this PR)

Summary by CodeRabbit

This PR optimizes CI resource usage for the fulfillment-service repository by adding conditional skip patterns to three presubmit jobs in the OpenShift CI infrastructure. Jobs will now skip execution when only documentation, license files, configuration, and integration test infrastructure are modified.

Changes Made

CI Operator Configuration (ci-operator/config/osac-project/fulfillment-service/osac-project-fulfillment-service-main.yaml):

  • Added skip_if_only_changed patterns to the images build definition
  • Added skip_if_only_changed patterns to the unit test job
  • Added skip_if_only_changed patterns to the e2e-vmaas test job

The patterns are tailored by job purpose:

  • Unit test: Skips for .md/.adoc files, LICENSE, charts/, it/, and .github/workflows/
  • Images job: Skips for .md/.adoc files, LICENSE, .github/workflows/, and it/charts/
  • E2E VMaaS test: Skips for .md/.adoc files, LICENSE, and .github/workflows/ only (most permissive since integration testing requires broader artifact availability)

Prow Jobs Configuration (ci-operator/jobs/osac-project/fulfillment-service/osac-project-fulfillment-service-main-presubmits.yaml):

  • Auto-generated file updated with matching skip_if_only_changed patterns on all three presubmit jobs
  • All three jobs configured with always_run: false to enable the skip logic

Implementation Details

A critical bug fix was applied during development: the original regex pattern ^.*(md|adoc)$ was corrected to ^.*\.(md|adoc)$. The original pattern would incorrectly match any file containing 'md' or 'adoc' as substrings (e.g., cmd/server.go). The corrected pattern with an escaped dot properly matches only files with .md or .adoc extensions.

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.

@amej

amej commented Jun 15, 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.

@openshift-merge-bot openshift-merge-bot Bot added the rehearsals-ack Signifies that rehearsal jobs have been acknowledged label Jun 15, 2026
@amej

amej commented Jun 15, 2026

Copy link
Copy Markdown
Contributor Author

/test all

@amej amej marked this pull request as ready for review June 15, 2026 12:21
@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 15, 2026
@openshift-ci openshift-ci Bot requested review from eliorerz and trewest June 15, 2026 12:22
Per user feedback, images should always build for safety.
Only unit and e2e-vmaas tests will have conditional filtering.

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

openshift-ci-robot commented Jun 15, 2026

Copy link
Copy Markdown
Contributor

@amej: This pull request references OSAC-1378 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-1378: add skip_if_only_changed to reduce unnecessary CI runs

Jira: https://redhat.atlassian.net/browse/OS[AC-1](https://redhat.atlassian.net/browse/AC-1)378
Story type: [DEV]

Summary

This PR optimizes CI resource usage for the fulfillment-service repository by adding skip_if_only_changed filters to two presubmit test jobs (unit and e2e-vmaas). Previously, all jobs ran on every PR regardless of changed files. Now, test jobs intelligently skip when only documentation or unrelated files change, while images always build for safety.

Changes

CI Operator Config (ci-operator/config/osac-project/fulfillment-service/osac-project-fulfillment-service-main.yaml):

  • Added skip_if_only_changed: ^.*\.(md|adoc)$|^LICENSE$|^charts/|^it/|^\.github/workflows/ to unit test
  • Added skip_if_only_changed: ^.*\.(md|adoc)$|^LICENSE$|^\.github/workflows/ to e2e-vmaas test
  • Images section: No filtering (always build for safety)

Prow Jobs (ci-operator/jobs/osac-project/fulfillment-service/osac-project-fulfillment-service-main-presubmits.yaml):

  • Auto-generated by make update
  • Unit and e2e-vmaas jobs: always_run: false with skip patterns
  • Images job: always_run: true (no filtering, builds on every PR)

Testing

Validation performed:

  • ✅ YAML syntax validation (manual Python script due to worktree environment)
  • ✅ Regex pattern correctness testing (verified with grep against fulfillment-service repo)
  • ✅ Prow configuration rules validation (always_run: false, mutual exclusivity checks)
  • ✅ Pattern propagation verification (all three jobs updated correctly)
  • ✅ Self-review gate (5 findings, 3 dismissed, 2 downgraded to non-blocking documentation)

Post-merge testing plan:
Create test PRs in fulfillment-service repository to verify runtime behavior:

  • Doc-only PR (change README.md) → unit and e2e skip, images run
  • Source change (change Go files) → all jobs run
  • Chart-only (change charts/) → unit skips, images and e2e run
  • Mixed PR (docs + code) → all jobs run

Key Implementation Detail

During validation, discovered and fixed a critical regex bug where ^.*(md|adoc)$ would incorrectly match files like cmd/server.go (contains 'md' substring). Fixed to ^.*\.(md|adoc)$ (escaped dot) to only match file extensions.

Acceptance Criteria

  • AC-1: Audit fulfillment-service repository directory structure
  • AC-2: Define appropriate regex patterns for run_if_changed or skip_if_only_changed
  • AC-3: Set always_run: false and add filtering to each job
  • AC-4: Update Prow configuration in openshift/release
  • AC-5: Open and merge PR to openshift/release (this PR)

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.

@amej

amej commented Jun 15, 2026

Copy link
Copy Markdown
Contributor Author

Revision Applied

Per user feedback, removed the skip_if_only_changed filter from the images section.

Change: Images will now always build on every PR (safer approach).

Rationale:

  • Images are critical build artifacts
  • Resource cost is acceptable for the safety benefit
  • Filtering is now only applied to test jobs (unit and e2e-vmaas)

Updated behavior:

  • Doc-only PRs: Unit and e2e tests skip, images still build
  • Source changes: All jobs run (unchanged)
  • Chart changes: Unit skips, images and e2e run

Latest commit: 1990117

@openshift-merge-bot openshift-merge-bot Bot removed the rehearsals-ack Signifies that rehearsal jobs have been acknowledged label Jun 15, 2026
@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-fulfillment-service-main-e2e-vmaas osac-project/fulfillment-service presubmit Ci-operator config changed
pull-ci-osac-project-fulfillment-service-main-unit osac-project/fulfillment-service presubmit Ci-operator config changed
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.

@openshift-ci

openshift-ci Bot commented Jun 15, 2026

Copy link
Copy Markdown
Contributor

@amej: 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.

@amej

amej commented Jun 15, 2026

Copy link
Copy Markdown
Contributor Author

@eliorerz : Please review the current PR: #80513

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

jira/valid-reference Indicates that this PR references a valid Jira ticket of any type.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants