-
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
[TEP-0100] Fields/flags/docs for embedded TaskRun and Run statuses in PipelineRuns #4705
[TEP-0100] Fields/flags/docs for embedded TaskRun and Run statuses in PipelineRuns #4705
Conversation
…pelineRuns See: * https://github.com/tektoncd/community/blob/main/teps/0100-embedded-taskruns-and-runs-status-in-pipelineruns.md * tektoncd#4705 This implements TEP-0100, building on top of the flags/fields/docs changes in tektoncd#4705. Signed-off-by: Andrew Bayer <andrew.bayer@gmail.com>
/assign @jerop |
Fun, assign isn't working, I guess. |
The following is the coverage report on the affected files.
|
/retest |
df1e8aa
to
e2b4d76
Compare
The following is the coverage report on the affected files.
|
…pelineRuns See: * https://github.com/tektoncd/community/blob/main/teps/0100-embedded-taskruns-and-runs-status-in-pipelineruns.md * tektoncd#4705 This implements TEP-0100, building on top of the flags/fields/docs changes in tektoncd#4705. Signed-off-by: Andrew Bayer <andrew.bayer@gmail.com>
/retest |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks Andrew!
docs/install.md
Outdated
- `embedded-status`: set this flag to "full" to enable full embedding of `TaskRun` and `Run` statuses in the | ||
`PipelineRun` status. Set it to "minimal" to populate the `ChildReferences` field in the `PipelineRun` status with | ||
name, kind, and API version information for each `TaskRun` and `Run` in the `PipelineRun` instead. Set it to "both" to | ||
do both. For mroe information, see [Configuring usage of `TaskRun` and `Run` embedded statuses](pipelineruns.md#configuring-usage-of-taskrun-and-run-embedded-statuses) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
typo: mroe -> more
Also I would just add a quick note that this isn't implemented yet, which you can remove in the follow-up PR.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍
name: feature-flags | ||
namespace: tekton-pipelines | ||
data: | ||
enable-api-fields: "im-not-a-valid-feature-gate" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this should be embedded-status
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm ashamed of how many YAML files I messed up like this. =)
PipelineTaskName string `json:"pipelineTaskName,omitempty"` | ||
|
||
// ConditionChecks is the the list of condition checks, including their names and statuses, for the PipelineTask. | ||
// Deprecated: This field will be removed when conditions are removed for v1. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: conditions may be removed in v1beta1 as well according to our compatibility policy so I'd just remove the "v1" bit
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍
@@ -408,10 +427,12 @@ type PipelineRunStatusFields struct { | |||
// +optional | |||
CompletionTime *metav1.Time `json:"completionTime,omitempty"` | |||
|
|||
// Deprecated - use ChildReferences instead. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
optional comment: I wonder if it's possible to add an annotation that will allow these fields to display as deprecated in code editors? I did a quick search and see // +k8s:prerelease-lifecycle-gen:deprecated=1.20
for some stuff in our k8s dependencies so it's probably possible
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That'd be pretty dang nifty - mind opening an issue for that separate of this? It seems like something worth doing comprehensively.
test/ignore_test.go.ignore
Outdated
fmt.Printf("yaml:\n%s\n", string(ty)) | ||
} | ||
|
||
func TestCompBetaAlpha(t *testing.T) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm a bit confused about what this test is for; this almost looks like a test for pipelineresources? why is it called ignore_test? I'm not sure the changes you're introducing need a new e2e test.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hahaha, this is detritus from who knows when that was still sitting in my local clone and somehow inadvertently got added. Nuking it now!
e2b4d76
to
8573baa
Compare
The following is the coverage report on the affected files.
|
/lgtm |
8573baa
to
08ac11e
Compare
… PipelineRuns See https://github.com/tektoncd/community/blob/main/teps/0100-embedded-taskruns-and-runs-status-in-pipelineruns.md This adds new choices for how `TaskRun` and `Run` statuses are stored/referenced in `PipelineRun` statuses, depending on how the new feature flag, `embedded-status` is set: * `full` - the current default, with the `TaskRun` and `Run` statuses embedded in full. * `minimal` - instead of storing the full embedded statuses, information is stored about the task's version, kind, `PipelineTask` name, and the underlying name of the `TaskRun` or `Run`. This can be used to look up the `TaskRun` or `Run` itself and get the full status from there. Information which is specific to the `PipelineRun`, namely condition checks status and when expressions which may have blocked creation of an actual `TaskRun` or `Run` are stored as well. * `both` - both the full embedded `TaskRun` and `Run` statuses and the minimal references are stored. The condition check information will be removed from the minimal references once the now-deprecated condition check functionality is removed from Tekton Pipeline. As described in https://github.com/tektoncd/community/blob/main/teps/0100-embedded-taskruns-and-runs-status-in-pipelineruns.md#beta-api, 9 months after this change has been released in `v1beta1`, the default value for the `embedded-status` feature flag will be changed from `full` to `minimal`, and a few months after that, the `embedded-status` feature flag will be removed entirely and only the `minimal` behavior will remain. Note that this also may address tektoncd#4657, since I had to add documentation for `PipelineRunStatus`, and while I was there, I added some missing top-level fields to the `PipelineRun` definition. The actual implementation will follow this PR. Signed-off-by: Andrew Bayer <andrew.bayer@gmail.com>
08ac11e
to
e02670d
Compare
…pelineRuns See: * https://github.com/tektoncd/community/blob/main/teps/0100-embedded-taskruns-and-runs-status-in-pipelineruns.md * tektoncd#4705 This implements TEP-0100, building on top of the flags/fields/docs changes in tektoncd#4705. Signed-off-by: Andrew Bayer <andrew.bayer@gmail.com>
…pelineRuns See: * https://github.com/tektoncd/community/blob/main/teps/0100-embedded-taskruns-and-runs-status-in-pipelineruns.md * tektoncd#4705 This implements TEP-0100, building on top of the flags/fields/docs changes in tektoncd#4705. Signed-off-by: Andrew Bayer <andrew.bayer@gmail.com>
…pelineRuns See: * https://github.com/tektoncd/community/blob/main/teps/0100-embedded-taskruns-and-runs-status-in-pipelineruns.md * tektoncd#4705 * tektoncd#3140 This implements TEP-0100, building on top of the flags/fields/docs changes in tektoncd#4705. Signed-off-by: Andrew Bayer <andrew.bayer@gmail.com>
…pelineRuns See: * https://github.com/tektoncd/community/blob/main/teps/0100-embedded-taskruns-and-runs-status-in-pipelineruns.md * tektoncd#4705 * tektoncd#3140 This implements TEP-0100, building on top of the flags/fields/docs changes in tektoncd#4705. Signed-off-by: Andrew Bayer <andrew.bayer@gmail.com>
…pelineRuns See: * https://github.com/tektoncd/community/blob/main/teps/0100-embedded-taskruns-and-runs-status-in-pipelineruns.md * tektoncd#4705 * tektoncd#3140 This implements TEP-0100, building on top of the flags/fields/docs changes in tektoncd#4705. Signed-off-by: Andrew Bayer <andrew.bayer@gmail.com>
…pelineRuns See: * https://github.com/tektoncd/community/blob/main/teps/0100-embedded-taskruns-and-runs-status-in-pipelineruns.md * tektoncd#4705 * tektoncd#3140 This implements TEP-0100, building on top of the flags/fields/docs changes in tektoncd#4705. Signed-off-by: Andrew Bayer <andrew.bayer@gmail.com>
…pelineRuns See: * https://github.com/tektoncd/community/blob/main/teps/0100-embedded-taskruns-and-runs-status-in-pipelineruns.md * tektoncd#4705 * tektoncd#3140 This implements TEP-0100, building on top of the flags/fields/docs changes in tektoncd#4705. Signed-off-by: Andrew Bayer <andrew.bayer@gmail.com>
…pelineRuns See: * https://github.com/tektoncd/community/blob/main/teps/0100-embedded-taskruns-and-runs-status-in-pipelineruns.md * tektoncd#4705 * tektoncd#3140 This implements TEP-0100, building on top of the flags/fields/docs changes in tektoncd#4705. Signed-off-by: Andrew Bayer <andrew.bayer@gmail.com>
…pelineRuns See: * https://github.com/tektoncd/community/blob/main/teps/0100-embedded-taskruns-and-runs-status-in-pipelineruns.md * tektoncd#4705 * tektoncd#3140 This implements TEP-0100, building on top of the flags/fields/docs changes in tektoncd#4705. Signed-off-by: Andrew Bayer <andrew.bayer@gmail.com>
…pelineRuns See: * https://github.com/tektoncd/community/blob/main/teps/0100-embedded-taskruns-and-runs-status-in-pipelineruns.md * tektoncd#4705 * tektoncd#3140 This implements TEP-0100, building on top of the flags/fields/docs changes in tektoncd#4705. Signed-off-by: Andrew Bayer <andrew.bayer@gmail.com>
…pelineRuns See: * https://github.com/tektoncd/community/blob/main/teps/0100-embedded-taskruns-and-runs-status-in-pipelineruns.md * tektoncd#4705 * tektoncd#3140 This implements TEP-0100, building on top of the flags/fields/docs changes in tektoncd#4705. Signed-off-by: Andrew Bayer <andrew.bayer@gmail.com>
…pelineRuns See: * https://github.com/tektoncd/community/blob/main/teps/0100-embedded-taskruns-and-runs-status-in-pipelineruns.md * tektoncd#4705 * tektoncd#3140 This implements TEP-0100, building on top of the flags/fields/docs changes in tektoncd#4705. Signed-off-by: Andrew Bayer <andrew.bayer@gmail.com>
…pelineRuns See: * https://github.com/tektoncd/community/blob/main/teps/0100-embedded-taskruns-and-runs-status-in-pipelineruns.md * tektoncd#4705 * tektoncd#4734 * tektoncd#3140 This implements TEP-0100, building on top of the flags/fields/docs changes in tektoncd#4705 and the test changes in tektoncd#4734. Signed-off-by: Andrew Bayer <andrew.bayer@gmail.com>
…pelineRuns See: * https://github.com/tektoncd/community/blob/main/teps/0100-embedded-taskruns-and-runs-status-in-pipelineruns.md * tektoncd#4705 * tektoncd#4734 * tektoncd#3140 This implements TEP-0100, building on top of the flags/fields/docs changes in tektoncd#4705 and the test changes in tektoncd#4734. Signed-off-by: Andrew Bayer <andrew.bayer@gmail.com>
…pelineRuns See: * https://github.com/tektoncd/community/blob/main/teps/0100-embedded-taskruns-and-runs-status-in-pipelineruns.md * tektoncd#4705 * tektoncd#4734 * tektoncd#3140 This implements TEP-0100, allowing for choosing between the original full embedded `TaskRun` and `Run` statuses in `PipelineRun` statuses, minimal child references to the underlying `TaskRun` and `Run`s, or both, building on top of the flags/fields/docs changes in tektoncd#4705 and the test changes in Signed-off-by: Andrew Bayer <andrew.bayer@gmail.com>
…pelineRuns See: * https://github.com/tektoncd/community/blob/main/teps/0100-embedded-taskruns-and-runs-status-in-pipelineruns.md * tektoncd#4705 * tektoncd#4734 * tektoncd#3140 This implements TEP-0100, allowing for choosing between the original full embedded `TaskRun` and `Run` statuses in `PipelineRun` statuses, minimal child references to the underlying `TaskRun` and `Run`s, or both, building on top of the flags/fields/docs changes in tektoncd#4705 and the test changes in Signed-off-by: Andrew Bayer <andrew.bayer@gmail.com>
…pelineRuns See: * https://github.com/tektoncd/community/blob/main/teps/0100-embedded-taskruns-and-runs-status-in-pipelineruns.md * tektoncd#4705 * tektoncd#4734 * tektoncd#3140 This implements TEP-0100, allowing for choosing between the original full embedded `TaskRun` and `Run` statuses in `PipelineRun` statuses, minimal child references to the underlying `TaskRun` and `Run`s, or both, building on top of the flags/fields/docs changes in tektoncd#4705 and the test changes in Signed-off-by: Andrew Bayer <andrew.bayer@gmail.com>
…pelineRuns See: * https://github.com/tektoncd/community/blob/main/teps/0100-embedded-taskruns-and-runs-status-in-pipelineruns.md * tektoncd#4705 * tektoncd#4734 * tektoncd#3140 This implements TEP-0100, allowing for choosing between the original full embedded `TaskRun` and `Run` statuses in `PipelineRun` statuses, minimal child references to the underlying `TaskRun` and `Run`s, or both, building on top of the flags/fields/docs changes in tektoncd#4705 and the test changes in Signed-off-by: Andrew Bayer <andrew.bayer@gmail.com>
…pelineRuns See: * https://github.com/tektoncd/community/blob/main/teps/0100-embedded-taskruns-and-runs-status-in-pipelineruns.md * tektoncd#4705 * tektoncd#4734 * tektoncd#3140 This implements TEP-0100, allowing for choosing between the original full embedded `TaskRun` and `Run` statuses in `PipelineRun` statuses, minimal child references to the underlying `TaskRun` and `Run`s, or both, building on top of the flags/fields/docs changes in tektoncd#4705 and the test changes in Signed-off-by: Andrew Bayer <andrew.bayer@gmail.com>
…pelineRuns See: * https://github.com/tektoncd/community/blob/main/teps/0100-embedded-taskruns-and-runs-status-in-pipelineruns.md * tektoncd#4705 * tektoncd#4734 * tektoncd#3140 This implements TEP-0100, allowing for choosing between the original full embedded `TaskRun` and `Run` statuses in `PipelineRun` statuses, minimal child references to the underlying `TaskRun` and `Run`s, or both, building on top of the flags/fields/docs changes in tektoncd#4705 and the test changes in Signed-off-by: Andrew Bayer <andrew.bayer@gmail.com>
And of course, this is part of https://github.com/tektoncd/community/blob/main/teps/0100-embedded-taskruns-and-runs-status-in-pipelineruns.md, building on a pile of other PRs (tektoncd#4705, tektoncd#4734, tektoncd#4753, tektoncd#4757). This adds a new function to `pkg/reconciler/pipelinerun/pipelinerun.go`, specifically for updating `pr.Status.ChildReferences` during reconciliation. It's analogous to the existing `updatePipelineRunStatusFromTaskRuns` and `updatePipelineRunStatusFromRuns` functions. This PR doesn't actually call the new function - behavior is exactly the same. But it adds the new function, along with other functions it depends on. In the final step of the implementation, these other functions will also be used in `...FromTaskRuns` and/or `...FromRuns`. I also reworked `pkg/reconciler/pipelinerun/pipelinerun_updatestatus_test.go` to improve its test fixtures, so that they're easier to reuse and instantiated via YAML parsing as much as possible. Signed-off-by: Andrew Bayer <andrew.bayer@gmail.com>
And of course, this is part of https://github.com/tektoncd/community/blob/main/teps/0100-embedded-taskruns-and-runs-status-in-pipelineruns.md, building on a pile of other PRs (tektoncd#4705, tektoncd#4734, tektoncd#4753, tektoncd#4757). This adds a new function to `pkg/reconciler/pipelinerun/pipelinerun.go`, specifically for updating `pr.Status.ChildReferences` during reconciliation. It's analogous to the existing `updatePipelineRunStatusFromTaskRuns` and `updatePipelineRunStatusFromRuns` functions. This PR doesn't actually call the new function - behavior is exactly the same. But it adds the new function, along with other functions it depends on. In the final step of the implementation, these other functions will also be used in `...FromTaskRuns` and/or `...FromRuns`. I also reworked `pkg/reconciler/pipelinerun/pipelinerun_updatestatus_test.go` to improve its test fixtures, so that they're easier to reuse and instantiated via YAML parsing as much as possible. Signed-off-by: Andrew Bayer <andrew.bayer@gmail.com>
And of course, this is part of https://github.com/tektoncd/community/blob/main/teps/0100-embedded-taskruns-and-runs-status-in-pipelineruns.md, building on a pile of other PRs (#4705, #4734, #4753, #4757). This adds a new function to `pkg/reconciler/pipelinerun/pipelinerun.go`, specifically for updating `pr.Status.ChildReferences` during reconciliation. It's analogous to the existing `updatePipelineRunStatusFromTaskRuns` and `updatePipelineRunStatusFromRuns` functions. This PR doesn't actually call the new function - behavior is exactly the same. But it adds the new function, along with other functions it depends on. In the final step of the implementation, these other functions will also be used in `...FromTaskRuns` and/or `...FromRuns`. I also reworked `pkg/reconciler/pipelinerun/pipelinerun_updatestatus_test.go` to improve its test fixtures, so that they're easier to reuse and instantiated via YAML parsing as much as possible. Signed-off-by: Andrew Bayer <andrew.bayer@gmail.com>
…pelineRuns See: * https://github.com/tektoncd/community/blob/main/teps/0100-embedded-taskruns-and-runs-status-in-pipelineruns.md * tektoncd#4705 * tektoncd#4734 * tektoncd#4753 * tektoncd#4757 * tektoncd#4760 * tektoncd#3140 This implements TEP-0100, allowing for choosing between the original full embedded `TaskRun` and `Run` statuses in `PipelineRun` statuses, minimal child references to the underlying `TaskRun` and `Run`s, or both, building on top of all the other PRs referenced above. Signed-off-by: Andrew Bayer <andrew.bayer@gmail.com>
…pelineRuns See: * https://github.com/tektoncd/community/blob/main/teps/0100-embedded-taskruns-and-runs-status-in-pipelineruns.md * #4705 * #4734 * #4753 * #4757 * #4760 * #3140 This implements TEP-0100, allowing for choosing between the original full embedded `TaskRun` and `Run` statuses in `PipelineRun` statuses, minimal child references to the underlying `TaskRun` and `Run`s, or both, building on top of all the other PRs referenced above. Signed-off-by: Andrew Bayer <andrew.bayer@gmail.com>
And of course, this is part of https://github.com/tektoncd/community/blob/main/teps/0100-embedded-taskruns-and-runs-status-in-pipelineruns.md, building on a pile of other PRs (tektoncd#4705, tektoncd#4734, tektoncd#4753, tektoncd#4757). This adds a new function to `pkg/reconciler/pipelinerun/pipelinerun.go`, specifically for updating `pr.Status.ChildReferences` during reconciliation. It's analogous to the existing `updatePipelineRunStatusFromTaskRuns` and `updatePipelineRunStatusFromRuns` functions. This PR doesn't actually call the new function - behavior is exactly the same. But it adds the new function, along with other functions it depends on. In the final step of the implementation, these other functions will also be used in `...FromTaskRuns` and/or `...FromRuns`. I also reworked `pkg/reconciler/pipelinerun/pipelinerun_updatestatus_test.go` to improve its test fixtures, so that they're easier to reuse and instantiated via YAML parsing as much as possible. Signed-off-by: Andrew Bayer <andrew.bayer@gmail.com>
…pelineRuns See: * https://github.com/tektoncd/community/blob/main/teps/0100-embedded-taskruns-and-runs-status-in-pipelineruns.md * tektoncd#4705 * tektoncd#4734 * tektoncd#4753 * tektoncd#4757 * tektoncd#4760 * tektoncd#3140 This implements TEP-0100, allowing for choosing between the original full embedded `TaskRun` and `Run` statuses in `PipelineRun` statuses, minimal child references to the underlying `TaskRun` and `Run`s, or both, building on top of all the other PRs referenced above. Signed-off-by: Andrew Bayer <andrew.bayer@gmail.com>
Changes
Replaces #4694 (in part - there'll be a followup for the actual implementation)
See https://github.com/tektoncd/community/blob/main/teps/0100-embedded-taskruns-and-runs-status-in-pipelineruns.md
This adds new choices for how
TaskRun
andRun
statuses are stored/referenced inPipelineRun
statuses, depending on how the new feature flag,
embedded-status
is set:full
- the current default, with theTaskRun
andRun
statuses embedded in full.minimal
- instead of storing the full embedded statuses, information is stored about the task'sversion, kind,
PipelineTask
name, and the underlying name of theTaskRun
orRun
. This can beused to look up the
TaskRun
orRun
itself and get the full status from there. Informationwhich is specific to the
PipelineRun
, namely condition checks status and when expressions whichmay have blocked creation of an actual
TaskRun
orRun
are stored as well.both
- both the full embeddedTaskRun
andRun
statuses and the minimal references are stored.The condition check information will be removed from the minimal references once the now-deprecated
condition check functionality is removed from Tekton Pipeline.
As described in https://github.com/tektoncd/community/blob/main/teps/0100-embedded-taskruns-and-runs-status-in-pipelineruns.md#beta-api,
9 months after this change has been released in
v1beta1
, the default value for theembedded-status
feature flag will be changed fromfull
tominimal
, and a few months afterthat, the
embedded-status
feature flag will be removed entirely and only theminimal
behaviorwill remain.
Note that this also may address #4657, since I had to add documentation for
PipelineRunStatus
,and while I was there, I added some missing top-level fields to the
PipelineRun
definition.The actual implementation will follow this PR.
/kind tep
/kind api-change
Submitter Checklist
As the author of this PR, please check off the items in this checklist:
functionality, content, code)
Release Notes