-
Notifications
You must be signed in to change notification settings - Fork 1.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Disable implicit param behavior for Pipeline objects. #4511
Conversation
The following is the coverage report on the affected files.
|
We recently received feedback that the implicit param behavior implementation was not quite implemented as expected in the TEP - primarily, that the implicit behavior modifying Pipelines on admission was unexpected. As a short term measure, this change disables the implicit behavior for Pipelines, but keeps the PipelineRun and TaskRun behavior in place. This is implemented by introducing a new context variable, similar to the existing Alpha context behavior, that is only enabled on PipelineRun/TaskRun reconcile. This allows for minimially invasive changes while giving us the flexibility to revert this behavior or enable in other contexts such as during reconcile. On top of this: - Moves implicit param tests to their own file, adds test for Pipeline to cover the behavior in question. - Fixes bug with param context key using var struct{} instead of type struct{} -> using var associates the value to any key of struct{}, whereas type struct{} creates a new type that can be used by only that key. There's no indication that this was causing problems before.
e2af920
to
8f09136
Compare
The following is the coverage report on the affected files.
|
/test pull-tekton-pipeline-alpha-integration-tests |
/lgtm Thanks @wlynch ! |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: vdemeester The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
Changes
We received feedback that the implicit param implementation has behavior that
some users found unexpected - primarily, that the implicit behavior modifying
Pipelines on admission. This change disables the implicit behavior for Pipelines,
but keeps the PipelineRun and TaskRun behavior in place.
This is implemented by introducing a new context variable, similar to
the existing Alpha context behavior, that is only enabled on
PipelineRun/TaskRun reconcile. This allows for minimally invasive
changes while giving us the flexibility to revert this behavior or
enable in other contexts such as during reconcile.
On top of this:
to cover the behavior in question.
struct{} -> using var associates the value to any key of struct{},
whereas type struct{} creates a new type that can be used by only that
key. There's no indication that this was causing problems before.
/kind misc
Fixes #4388
Submitter Checklist
As the author of this PR, please check off the items in this checklist:
functionality, content, code)
Release Notes