Repository navigation
Fix: enforce WorkflowRun reference validation - #258
Merged
Merged
Conversation
Signed-off-by: Krishnan K M <krishnankaruvattu@gmail.com>
krishnankm
requested review from
FogDong,
Somefive,
anoop2811,
briankane,
jguionnet,
leejanee and
wonderflow
as code owners
September 20, 2026 16:23
There was a problem hiding this comment.
All reported issues were addressed across 4 files
Reply with feedback, questions, or to request a fix.
Fix all with cubic | Re-trigger cubic
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #258 +/- ##
==========================================
+ Coverage 62.49% 69.92% +7.43%
==========================================
Files 62 73 +11
Lines 4415 5845 +1430
==========================================
+ Hits 2759 4087 +1328
- Misses 1324 1366 +42
- Partials 332 392 +60
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
Signed-off-by: Krishnan K M <krishnankaruvattu@gmail.com>
Signed-off-by: Krishnan K M <krishnankaruvattu@gmail.com>
briankane
approved these changes
Sep 22, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description of your changes
Fixes #257
This PR makes
WorkflowRunreference validation more reliable.The validating webhook now reads referenced
Workflowresources directly from the API server instead of relying on the controller cache. This ensures that admission uses the current state of the referenced workflow.The Helm chart now applies the configured webhook failure policy from the initial render. With the default
Failpolicy, a webhook or certificate failure will reject the request instead of silently admitting an invalidWorkflowRun.The PR also corrects the validating webhook name and preserves the existing CA bundle during upgrades.
How has this code been tested
The tests cover:
The rendered webhook configuration was also checked to confirm that it uses failurePolicy: Fail and handles CREATE and UPDATE requests for WorkflowRun resources.
Special notes for your reviewer
The existing workflow lookup order is unchanged. A workflow in the WorkflowRun namespace still takes precedence, followed by the shared workflow in vela-system.
Summary by cubic
Enforces
WorkflowRunreference validation by reading referencedWorkflowresources directly from the API server, and fixes the validating webhook configuration so the failure policy and webhook name are applied correctly.failurePolicy(defaultFail) rather than hardcodingIgnore, and uses the corrected webhook namevalidating.core.oam.dev.v1alpha1.workflowruns.vela-system) is unchanged.Written for commit 9d7a6c5. Summary will update on new commits.