Skip to content
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

Design: Track provenance of TaskRuns and PipelineRuns #833

Closed
bobcatfish opened this issue May 6, 2019 · 6 comments
Closed

Design: Track provenance of TaskRuns and PipelineRuns #833

bobcatfish opened this issue May 6, 2019 · 6 comments
Labels
design This task is about creating and discussing a design help wanted Denotes an issue that needs help from a contributor. Must meet "help wanted" guidelines. lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale.

Comments

@bobcatfish
Copy link
Collaborator

Expected Behavior

It should be possible to look at the data contained in a TaskRun or a PipelineRun and determine what led to the creation of this Run, for example:

Actual Behavior

We have a field called trigger which is being used for this purpose:

// TaskTriggerType indicates the mechanism by which this TaskRun was created.
type TaskTriggerType string
const (
// TaskTriggerTypeManual indicates that this TaskRun was invoked manually by a user.
TaskTriggerTypeManual TaskTriggerType = "manual"
// TaskTriggerTypePipelineRun indicates that this TaskRun was created by a controller
// attempting to realize a PipelineRun. In this case the `name` will refer to the name
// of the PipelineRun.
TaskTriggerTypePipelineRun TaskTriggerType = "pipelineRun"
)
// TaskTrigger describes what triggered this Task to run. It could be triggered manually,
// or it may have been part of a PipelineRun in which case this ref would refer
// to the corresponding PipelineRun.
type TaskTrigger struct {
Type TaskTriggerType `json:"type"`
// +optional
Name string `json:"name,omitempty,omitempty"`
}

But as seen in #816:

  • this confuses people
  • it might make sense to use annotations instead

Additional Info

See also the pipeline listener proposal

@bobcatfish bobcatfish added design This task is about creating and discussing a design help wanted Denotes an issue that needs help from a contributor. Must meet "help wanted" guidelines. labels May 6, 2019
@abayer
Copy link
Contributor

abayer commented May 6, 2019

For TaskRun, we can tell if it was created via a PipelineRun by looking at the labels currently.

@dlorenc
Copy link
Contributor

dlorenc commented May 13, 2019

I agree that the field here is confusing. I think in general annotations/labels would make more sense for this type of data.

@kimholmes
Copy link

This also looks like something that could be accomplished in the dashboard UI.

Tasks

@vdemeester
Copy link
Member

@bobcatfish I feel this issue should be either closed or rewritten. The trigger field is gone, now the way to know what started a taskrun or pipelinerun would be "achieved" using some standard annotation/labels, that could be set by the cli, triggers or any other tool.

I think we should document those, and define some best practice

@tekton-robot
Copy link
Collaborator

Issues go stale after 90d of inactivity.
Mark the issue as fresh with /remove-lifecycle stale.
Stale issues rot after an additional 30d of inactivity and eventually close.
If this issue is safe to close now please do so with /close.

/lifecycle stale

Send feedback to tektoncd/plumbing.

@tekton-robot tekton-robot added the lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. label Aug 13, 2020
@bobcatfish
Copy link
Collaborator Author

I think closing this makes sense until we have a clear need for it and we can come up with some options - probably annotations is the way to go!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
design This task is about creating and discussing a design help wanted Denotes an issue that needs help from a contributor. Must meet "help wanted" guidelines. lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale.
Projects
None yet
Development

No branches or pull requests

6 participants