wmco: Don't run the presubmit images job on konflux updates#77980
Conversation
WalkthroughUpdated Changes
Estimated code review effort🎯 1 (Trivial) | ⏱️ ~4 minutes 🚥 Pre-merge checks | ✅ 9 | ❌ 1❌ Failed checks (1 inconclusive)
✅ Passed checks (9 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
|
[REHEARSALNOTIFIER]
A total of 89 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-rehearseComment: Once you are satisfied with the results of the rehearsals, comment: |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In
`@ci-operator/config/openshift/windows-machine-config-operator/openshift-windows-machine-config-operator-master.yaml`:
- Line 22: The skip_if_only_changed regex contains an unescaped dot in
"Containerfile.bundle" which allows unintended matches; update the
"skip_if_only_changed" pattern string to use "Containerfile\.bundle" (escape the
dot) wherever that exact token appears in this WMCO presubmit/config set so it
matches only the literal filename, and apply the same substitution across all
modified WMCO config and presubmit files.
🪄 Autofix (Beta)
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: openshift/coderabbit/.coderabbit.yaml
Review profile: CHILL
Plan: Pro Plus
Run ID: 05ec74d4-48d1-4004-aa6a-6fc2c2026eec
📒 Files selected for processing (10)
ci-operator/config/openshift/windows-machine-config-operator/openshift-windows-machine-config-operator-master.yamlci-operator/config/openshift/windows-machine-config-operator/openshift-windows-machine-config-operator-release-4.22.yamlci-operator/config/openshift/windows-machine-config-operator/openshift-windows-machine-config-operator-release-4.23.yamlci-operator/config/openshift/windows-machine-config-operator/openshift-windows-machine-config-operator-release-5.0.yamlci-operator/config/openshift/windows-machine-config-operator/openshift-windows-machine-config-operator-release-5.1.yamlci-operator/jobs/openshift/windows-machine-config-operator/openshift-windows-machine-config-operator-master-presubmits.yamlci-operator/jobs/openshift/windows-machine-config-operator/openshift-windows-machine-config-operator-release-4.22-presubmits.yamlci-operator/jobs/openshift/windows-machine-config-operator/openshift-windows-machine-config-operator-release-4.23-presubmits.yamlci-operator/jobs/openshift/windows-machine-config-operator/openshift-windows-machine-config-operator-release-5.0-presubmits.yamlci-operator/jobs/openshift/windows-machine-config-operator/openshift-windows-machine-config-operator-release-5.1-presubmits.yaml
| - dockerfile_path: build/Dockerfile.ci | ||
| to: windows-machine-config-operator-test | ||
| skip_if_only_changed: ^docs/|\.md$|^(?:.*/)?(?:\.gitignore|OWNERS|PROJECT|LICENSE)$ | ||
| skip_if_only_changed: ^(?:docs|\.github|\.tekton)/|\.md$|^(?:\.gitignore|renovate\.json|OWNERS|PROJECT|LICENSE|Containerfile|Containerfile.bundle)$ |
There was a problem hiding this comment.
🧩 Analysis chain
🏁 Script executed:
#!/bin/bash
set -euo pipefail
# 1) Find all occurrences that still use unescaped Containerfile.bundle in skip_if_only_changed
rg -nF 'skip_if_only_changed:' | rg -nF 'Containerfile.bundle'
# 2) Quick behavior check (regex dot wildcard effect)
python - <<'PY'
import re
pat = r'^(?:docs|\.github|\.tekton)/|\.md$|^(?:\.gitignore|renovate\.json|OWNERS|PROJECT|LICENSE|Containerfile|Containerfile.bundle)$'
for s in ["Containerfile.bundle", "ContainerfileXbundle", "Containerfile/bundle"]:
print(f"{s:25} -> {bool(re.match(pat, s))}")
PYRepository: openshift/release
Length of output: 50374
🏁 Script executed:
python3 << 'PY'
import re
# Pattern with unescaped dot (current/incorrect)
pat_unescaped = r'^(?:docs|\.github|\.tekton)/|\.md$|^(?:\.gitignore|renovate\.json|OWNERS|PROJECT|LICENSE|Containerfile|Containerfile.bundle)$'
# Pattern with escaped dot (proposed fix)
pat_escaped = r'^(?:docs|\.github|\.tekton)/|\.md$|^(?:\.gitignore|renovate\.json|OWNERS|PROJECT|LICENSE|Containerfile|Containerfile\.bundle)$'
test_cases = [
"Containerfile.bundle", # should match both
"ContainerfileXbundle", # should match unescaped, NOT escaped
"Containerfile/bundle", # should NOT match either
]
print("UNESCAPED DOT (current - INCORRECT):")
for s in test_cases:
result = bool(re.match(pat_unescaped, s))
print(f" {s:25} -> {result}")
print("\nESCAPED DOT (proposed fix - CORRECT):")
for s in test_cases:
result = bool(re.match(pat_escaped, s))
print(f" {s:25} -> {result}")
PYRepository: openshift/release
Length of output: 354
Escape the dot in Containerfile.bundle for exact filename matching.
At Line 22, the unescaped dot in Containerfile.bundle matches unintended filenames (e.g., ContainerfileXbundle, Containerfile/bundle). Use Containerfile\.bundle instead.
Proposed fix
- skip_if_only_changed: ^(?:docs|\.github|\.tekton)/|\.md$|^(?:\.gitignore|renovate\.json|OWNERS|PROJECT|LICENSE|Containerfile|Containerfile.bundle)$
+ skip_if_only_changed: ^(?:docs|\.github|\.tekton)/|\.md$|^(?:\.gitignore|renovate\.json|OWNERS|PROJECT|LICENSE|Containerfile|Containerfile\.bundle)$Apply this fix to all identical patterns in the other modified WMCO config/presubmit files.
📝 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.
| skip_if_only_changed: ^(?:docs|\.github|\.tekton)/|\.md$|^(?:\.gitignore|renovate\.json|OWNERS|PROJECT|LICENSE|Containerfile|Containerfile.bundle)$ | |
| skip_if_only_changed: ^(?:docs|\.github|\.tekton)/|\.md$|^(?:\.gitignore|renovate\.json|OWNERS|PROJECT|LICENSE|Containerfile|Containerfile\.bundle)$ |
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.
In
`@ci-operator/config/openshift/windows-machine-config-operator/openshift-windows-machine-config-operator-master.yaml`
at line 22, The skip_if_only_changed regex contains an unescaped dot in
"Containerfile.bundle" which allows unintended matches; update the
"skip_if_only_changed" pattern string to use "Containerfile\.bundle" (escape the
dot) wherever that exact token appears in this WMCO presubmit/config set so it
matches only the literal filename, and apply the same substitution across all
modified WMCO config and presubmit files.
|
/lgtm |
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: jrvaldes, mansikulkarni96 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 ack |
|
@jrvaldes: now processing your pj-rehearse request. Please allow up to 10 minutes for jobs to trigger or cancel. |
|
@jrvaldes: 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. |
This pull request updates the
skip_if_only_changedpatterns for both image build and presubmit job configurations across all Windows Machine Config Operator (WMCO) CI and release branches. The main goal is to ensure that CI jobs are skipped when only non-functional files (like documentation, configuration, or ownership files) are changed, with the exclusion pattern expanded to cover more directories and files.These changes help reduce unnecessary CI job runs on trivial changes, improving CI efficiency and developer experience.
Summary by CodeRabbit