-
Notifications
You must be signed in to change notification settings - Fork 1.8k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Split array param indexing validation between reconciler and webhook
There are two components to validation of array param indexing: 1. Validating that beta features are enabled. 2. Validating that array indexes are in bounds. Prior to this commit, both of these forms of validation were done in the PipelineRun reconciler. However, the first form of validation differs between the v1beta1 and the v1 API version. In addition, array index bounds checking was skipped if beta features were disabled. This meant that if "enable-api-fields" was set to "stable", a user could create a beta Task/Pipeline using array parameter indexing, and we would not validate whether indexes were in bounds, potentially leading to a confusing error message or reconciler panic. This commit moves the first form of validation to take place only in the webhook, leaving validation for bounds checking in the reconciler. Bounds checking is performed regardless of what feature flags are enabled.
- Loading branch information
Showing
6 changed files
with
100 additions
and
15 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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