Update on-cel-expression values for tekton pipelines to limit unnecessary builds#241
Conversation
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: fontivan 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 |
WalkthroughThe changes update the trigger conditions for two Tekton pipeline YAML files. Both files now use more granular CEL expressions to ensure that pipeline runs are only started when specific files or directories are changed. This refinement applies to both pull request and push events targeting the "main" branch, limiting pipeline executions to relevant modifications and avoiding unnecessary runs. Changes
Suggested labels
Suggested reviewers
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. 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
SupportNeed help? Create a ticket on our support page for assistance with any issues or questions. Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
There was a problem hiding this comment.
Actionable comments posted: 2
🧹 Nitpick comments (2)
.tekton/recert-4-20-push.yaml (1)
12-13: Remove trailing whitespace on CEL expression lines.
YAMLlint flags trailing spaces on these lines, which can lead to lint errors. Please trim the end-of-line spaces.- event == "push" && + event == "push" && - target_branch == "main" && + target_branch == "main" && ... - '.konflux/Dockerfile'.pathChanged() || + '.konflux/Dockerfile'.pathChanged() ||Also applies to: 29-29
🧰 Tools
🪛 YAMLlint (1.35.1)
[error] 12-12: trailing spaces
(trailing-spaces)
[error] 13-13: trailing spaces
(trailing-spaces)
.tekton/recert-4-20-pull-request.yaml (1)
12-13: Remove trailing whitespace on CEL expression lines.
YAMLlint reports trailing spaces here. Trimming these will clear lint errors and keep the YAML clean.- event == "pull_request" && + event == "pull_request" && - target_branch == "main" && + target_branch == "main" && ... - '.konflux/Dockerfile'.pathChanged() || + '.konflux/Dockerfile'.pathChanged() ||Also applies to: 29-29
🧰 Tools
🪛 YAMLlint (1.35.1)
[error] 12-12: trailing spaces
(trailing-spaces)
[error] 13-13: trailing spaces
(trailing-spaces)
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (2)
.tekton/recert-4-20-pull-request.yaml(1 hunks).tekton/recert-4-20-push.yaml(1 hunks)
🧰 Additional context used
🪛 YAMLlint (1.35.1)
.tekton/recert-4-20-push.yaml
[error] 12-12: trailing spaces
(trailing-spaces)
[error] 13-13: trailing spaces
(trailing-spaces)
[error] 29-29: trailing spaces
(trailing-spaces)
.tekton/recert-4-20-pull-request.yaml
[error] 12-12: trailing spaces
(trailing-spaces)
[error] 13-13: trailing spaces
(trailing-spaces)
[error] 29-29: trailing spaces
(trailing-spaces)
⏰ Context from checks skipped due to timeout of 90000ms (2)
- GitHub Check: Red Hat Konflux / recert-4-20-on-pull-request
- GitHub Check: build
🔇 Additional comments (2)
.tekton/recert-4-20-push.yaml (1)
11-32: Approve refined push-trigger conditions.
The newon-cel-expressionaccurately scopes the push pipeline to relevant file changes onmain, reducing unnecessary builds. Ensure consistency with the pull-request trigger configuration.🧰 Tools
🪛 YAMLlint (1.35.1)
[error] 12-12: trailing spaces
(trailing-spaces)
[error] 13-13: trailing spaces
(trailing-spaces)
[error] 29-29: trailing spaces
(trailing-spaces)
.tekton/recert-4-20-pull-request.yaml (1)
11-32: Approve refined pull-request-trigger conditions.
This update aligns the PR pipeline with the push configuration, ensuring both only fire on meaningful changes. Good to merge once the globs are corrected.🧰 Tools
🪛 YAMLlint (1.35.1)
[error] 12-12: trailing spaces
(trailing-spaces)
[error] 13-13: trailing spaces
(trailing-spaces)
[error] 29-29: trailing spaces
(trailing-spaces)
| '.tekton/build-pipeline.yaml'.pathChanged() || | ||
| 'etcddump/***'.pathChanged() || | ||
| 'hack/***'.pathChanged() || | ||
| 'ouger/***'.pathChanged() || | ||
| 'src/***'.pathChanged() || | ||
| 'vendor/***'.pathChanged() || | ||
| 'build.rs'.pathChanged() || | ||
| 'Cargo.lock'.pathChanged() || | ||
| 'Cargo.toml'.pathChanged() || | ||
| 'ownership.sh'.pathChanged() || | ||
| 'reproto'.pathChanged() || | ||
| 'run_seed'.pathChanged() || | ||
| 'vendor.sh'.pathChanged() || | ||
| '.tekton/recert-4-20-push.yaml'.pathChanged() || | ||
| '.konflux/Dockerfile'.pathChanged() || | ||
| '.konflux/lock-build/***'.pathChanged() || | ||
| '.konflux/lock-runtime/***'.pathChanged() |
There was a problem hiding this comment.
🛠️ Refactor suggestion
Correct wildcard syntax in .pathChanged() patterns.
The patterns currently use triple asterisks (***), which may not be recognized by Tekton’s glob matching. Standard recursive globs use double asterisks (**). If unsupported, these conditions will never evaluate to true, defeating the purpose of fine-grained triggers.
Apply this diff to fix the patterns:
- 'etcddump/***'.pathChanged() ||
+ 'etcddump/**'.pathChanged() ||
- 'hack/***'.pathChanged() ||
+ 'hack/**'.pathChanged() ||
- 'ouger/***'.pathChanged() ||
+ 'ouger/**'.pathChanged() ||
- 'src/***'.pathChanged() ||
+ 'src/**'.pathChanged() ||
- 'vendor/***'.pathChanged() ||
+ 'vendor/**'.pathChanged() ||
- '.konflux/lock-build/***'.pathChanged() ||
+ '.konflux/lock-build/**'.pathChanged() ||
- '.konflux/lock-runtime/***'.pathChanged()
+ '.konflux/lock-runtime/**'.pathChanged()📝 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.
| '.tekton/build-pipeline.yaml'.pathChanged() || | |
| 'etcddump/***'.pathChanged() || | |
| 'hack/***'.pathChanged() || | |
| 'ouger/***'.pathChanged() || | |
| 'src/***'.pathChanged() || | |
| 'vendor/***'.pathChanged() || | |
| 'build.rs'.pathChanged() || | |
| 'Cargo.lock'.pathChanged() || | |
| 'Cargo.toml'.pathChanged() || | |
| 'ownership.sh'.pathChanged() || | |
| 'reproto'.pathChanged() || | |
| 'run_seed'.pathChanged() || | |
| 'vendor.sh'.pathChanged() || | |
| '.tekton/recert-4-20-push.yaml'.pathChanged() || | |
| '.konflux/Dockerfile'.pathChanged() || | |
| '.konflux/lock-build/***'.pathChanged() || | |
| '.konflux/lock-runtime/***'.pathChanged() | |
| '.tekton/build-pipeline.yaml'.pathChanged() || | |
| 'etcddump/**'.pathChanged() || | |
| 'hack/**'.pathChanged() || | |
| 'ouger/**'.pathChanged() || | |
| 'src/**'.pathChanged() || | |
| 'vendor/**'.pathChanged() || | |
| 'build.rs'.pathChanged() || | |
| 'Cargo.lock'.pathChanged() || | |
| 'Cargo.toml'.pathChanged() || | |
| 'ownership.sh'.pathChanged() || | |
| 'reproto'.pathChanged() || | |
| 'run_seed'.pathChanged() || | |
| 'vendor.sh'.pathChanged() || | |
| '.tekton/recert-4-20-push.yaml'.pathChanged() || | |
| '.konflux/Dockerfile'.pathChanged() || | |
| '.konflux/lock-build/**'.pathChanged() || | |
| '.konflux/lock-runtime/**'.pathChanged() |
🧰 Tools
🪛 YAMLlint (1.35.1)
[error] 29-29: trailing spaces
(trailing-spaces)
| '.tekton/build-pipeline.yaml'.pathChanged() || | ||
| 'etcddump/***'.pathChanged() || | ||
| 'hack/***'.pathChanged() || | ||
| 'ouger/***'.pathChanged() || | ||
| 'src/***'.pathChanged() || | ||
| 'vendor/***'.pathChanged() || | ||
| 'build.rs'.pathChanged() || | ||
| 'Cargo.lock'.pathChanged() || | ||
| 'Cargo.toml'.pathChanged() || | ||
| 'ownership.sh'.pathChanged() || | ||
| 'reproto'.pathChanged() || | ||
| 'run_seed'.pathChanged() || | ||
| 'vendor.sh'.pathChanged() || | ||
| '.tekton/recert-4-20-pull-request.yaml'.pathChanged() || | ||
| '.konflux/Dockerfile'.pathChanged() || | ||
| '.konflux/lock-build/***'.pathChanged() || | ||
| '.konflux/lock-runtime/***'.pathChanged() |
There was a problem hiding this comment.
🛠️ Refactor suggestion
Fix wildcard patterns in .pathChanged() calls.
The use of *** may not match any files. Tekton’s globbing expects ** for recursive matching. Incorrect patterns can silently disable triggers for those directories.
- 'etcddump/***'.pathChanged() ||
+ 'etcddump/**'.pathChanged() ||
- 'hack/***'.pathChanged() ||
+ 'hack/**'.pathChanged() ||
- 'ouger/***'.pathChanged() ||
+ 'ouger/**'.pathChanged() ||
- 'src/***'.pathChanged() ||
+ 'src/**'.pathChanged() ||
- 'vendor/***'.pathChanged() ||
+ 'vendor/**'.pathChanged() ||
- '.konflux/lock-build/***'.pathChanged() ||
+ '.konflux/lock-build/**'.pathChanged() ||
- '.konflux/lock-runtime/***'.pathChanged()
+ '.konflux/lock-runtime/**'.pathChanged()📝 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.
| '.tekton/build-pipeline.yaml'.pathChanged() || | |
| 'etcddump/***'.pathChanged() || | |
| 'hack/***'.pathChanged() || | |
| 'ouger/***'.pathChanged() || | |
| 'src/***'.pathChanged() || | |
| 'vendor/***'.pathChanged() || | |
| 'build.rs'.pathChanged() || | |
| 'Cargo.lock'.pathChanged() || | |
| 'Cargo.toml'.pathChanged() || | |
| 'ownership.sh'.pathChanged() || | |
| 'reproto'.pathChanged() || | |
| 'run_seed'.pathChanged() || | |
| 'vendor.sh'.pathChanged() || | |
| '.tekton/recert-4-20-pull-request.yaml'.pathChanged() || | |
| '.konflux/Dockerfile'.pathChanged() || | |
| '.konflux/lock-build/***'.pathChanged() || | |
| '.konflux/lock-runtime/***'.pathChanged() | |
| '.tekton/build-pipeline.yaml'.pathChanged() || | |
| 'etcddump/**'.pathChanged() || | |
| 'hack/**'.pathChanged() || | |
| 'ouger/**'.pathChanged() || | |
| 'src/**'.pathChanged() || | |
| 'vendor/**'.pathChanged() || | |
| 'build.rs'.pathChanged() || | |
| 'Cargo.lock'.pathChanged() || | |
| 'Cargo.toml'.pathChanged() || | |
| 'ownership.sh'.pathChanged() || | |
| 'reproto'.pathChanged() || | |
| 'run_seed'.pathChanged() || | |
| 'vendor.sh'.pathChanged() || | |
| '.tekton/recert-4-20-pull-request.yaml'.pathChanged() || | |
| '.konflux/Dockerfile'.pathChanged() || | |
| '.konflux/lock-build/**'.pathChanged() || | |
| '.konflux/lock-runtime/**'.pathChanged() |
🧰 Tools
🪛 YAMLlint (1.35.1)
[error] 29-29: trailing spaces
(trailing-spaces)
|
/cc @rauhersu |
Summary by CodeRabbit