OSAC-1629: skip prow ci for all .github/ directory changes#80782
Conversation
Expands skip_if_only_changed patterns to cover entire .github/ directory instead of just .github/workflows/ subdirectory. This reduces unnecessary CI runs when PRs only modify GitHub metadata files (CODEOWNERS, issue templates, dependabot config, etc.). Changes: - fulfillment-service: ^\.github/workflows/ → ^\.github/ - osac-aap: ^\.github/workflows/.* → ^\.github/.* - osac-operator: Added ^\.github/.* to existing pattern - osac-test-infra: Added ^\.github/.* to existing pattern - osac-installer: No change (run_if_changed already excludes .github/) Expected impact: ~10-15% reduction in unnecessary CI runs. Assisted-by: Claude Code <noreply@anthropic.com> Signed-off-by: Ameya Sathe <asathe@redhat.com> rh-pre-commit.version: 2.4.0 rh-pre-commit.check-secrets: ENABLED
|
@amej: This pull request references OSAC-1629 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 bug to target the "5.0.0" version, but no target version was set. DetailsIn response to this:
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. |
|
Skipping CI for Draft Pull Request. |
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Repository YAML (base), Central YAML (inherited) Review profile: CHILL Plan: Enterprise Run ID: ⛔ Files ignored due to path filters (4)
📒 Files selected for processing (4)
WalkthroughFour ci-operator YAML configs under Changesskip_if_only_changed regex updates across osac-project
Estimated code review effort🎯 1 (Trivial) | ⏱️ ~3 minutes Possibly related PRs
Suggested reviewers
🚥 Pre-merge checks | ✅ 15✅ Passed checks (15 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
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. Comment |
|
[REHEARSALNOTIFIER]
Prior to this PR being merged, you will need to either run and acknowledge or opt to skip these rehearsals. Interacting with pj-rehearseComment: Once you are satisfied with the results of the rehearsals, comment: |
|
@amej: all tests passed! Full PR test history. Your PR dashboard. DetailsInstructions 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. |
|
Hi @adriengentil and @akshaynadkarni : Please can you review the #80782 ? |
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: adriengentil, amej The full list of commands accepted by this bot can be found here. The pull request process is described here DetailsNeeds approval from an approver in each of these files:
Approvers can indicate their approval by writing |
|
/pj-rehearse auto-ack |
|
@amej: now processing your pj-rehearse request. Please allow up to 10 minutes for jobs to trigger or cancel. |
Title
OSAC-1629: skip prow ci for all .github/ directory changes
Summary
Expands
skip_if_only_changedpatterns in CI operator configurations to skip entire.github/directory instead of just.github/workflows/. This reduces unnecessary CI runs when PRs only modify GitHub metadata files (CODEOWNERS, issue templates, dependabot configuration, etc.).Root Cause
Current
skip_if_only_changedpatterns only covered.github/workflows/subdirectory in some repos, or were missing.github/patterns entirely. PRs touching.github/CODEOWNERS,.github/dependabot.yml,.github/ISSUE_TEMPLATE/, etc. triggered full CI test suites unnecessarily.Changes
Updated 4 OSAC repository CI configurations:
^\.github/workflows/→^\.github/(2 test jobs)^\.github/workflows/.*→^\.github/.*(1 test job)^\.github/.*to existing skip pattern (1 test job)^\.github/.*to existing skip pattern (1 test job)run_if_changedalready excludes.github/)Total affected test jobs: 5 presubmit jobs across 4 repositories
Pattern Semantics
^\.github/) match.github/at repository root only.github/directories (e.g.,base/osac-aap/.github/in osac-installer) are correctly NOT matchedTesting
Pattern Validation (38 test cases):
Configuration Validation:
make ci-operator-checkconfigpassedCode Review:
Expected Impact
Before:
.github/workflows/ci.ymlchanges → CI skipped ✓.github/CODEOWNERSchanges → CI runs unnecessarily ✗.github/dependabot.ymlchanges → CI runs unnecessarily ✗After:
.github/directory changes → CI skipped ✓Manual Testing for Reviewers
Config validation already performed:
Pattern verification:
Test that these paths correctly skip CI:
.github/CODEOWNERS.github/dependabot.yml.github/ISSUE_TEMPLATE/bug.mdTest that these paths correctly trigger CI:
src/main.gopkg/api/server.go.github/workflows/ci.yml+src/main.go)Files Changed
CI Operator Configurations (source of truth):
ci-operator/config/osac-project/fulfillment-service/osac-project-fulfillment-service-main.yamlci-operator/config/osac-project/osac-aap/osac-project-osac-aap-main.yamlci-operator/config/osac-project/osac-operator/osac-project-osac-operator-main.yamlci-operator/config/osac-project/osac-test-infra/osac-project-osac-test-infra-main.yamlGenerated Prow Jobs (auto-generated by
make update):ci-operator/jobs/osac-project/fulfillment-service/osac-project-fulfillment-service-main-presubmits.yamlci-operator/jobs/osac-project/osac-aap/osac-project-osac-aap-main-presubmits.yamlci-operator/jobs/osac-project/osac-operator/osac-project-osac-operator-main-presubmits.yamlci-operator/jobs/osac-project/osac-test-infra/osac-project-osac-test-infra-main-presubmits.yamlRelated Context
paths-ignoreDeployment Considerations
Assisted-by: Claude Code noreply@anthropic.com
Summary by CodeRabbit
This PR expands
skip_if_only_changedpatterns across Prow CI configurations for four OSAC component repositories to skip the entire.github/directory, rather than limiting the exclusion to only.github/workflows/files. This prevents unnecessary CI test execution when pull requests exclusively modify GitHub repository metadata and configuration files such as CODEOWNERS, dependabot settings, and issue templates.Changes by repository:
unitande2e-vmaastest skip patterns from^\.github/workflows/to^\.github/e2e-vmaastest skip pattern from^\.github/workflows/.*to^\.github/.*^\.github/.*to the existinge2e-vmaastest skip patterns^\.github/.*to thee2e-vmaastest skip patternsThese are configuration-only changes to the CI operator configuration files with no runtime code modifications. The patterns use root-anchored regex (
^\.github/) to match only.github/directories at the repository root, intentionally excluding.github/in git submodules. The implementation has been validated with 38 test cases and configuration verification usingmake ci-operator-checkconfig. The expected outcome is a 10-15% reduction in unnecessary CI runs for.github/-only pull requests.