-
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
Finish setting up events for pipeline runs #2874
Finish setting up events for pipeline runs #2874
Conversation
This PR cannot be merged: expecting exactly one kind/ label Available
|
@@ -407,12 +413,6 @@ func (c *Reconciler) reconcile(ctx context.Context, pr *v1beta1.PipelineRun) err | |||
return controller.NewPermanentError(err) | |||
} | |||
|
|||
if pipelineState.IsDone() && pr.IsDone() { |
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.
pr.IsDone()
only becomes true when the completion time is set, which happens down below in L461-466.
This is never invoked, as it is also proved by the fact that we don't get a duplicate event for this case.
The timeout is released in ReconcileKind
when isDone
is true.
The following is the coverage report on the affected files.
|
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.
/lgtm
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.
One small subjective nit about the terminology below. Also, this functionality is tested with existing tests right?
Heh, good point, I added a bunch of tests related to events in the original PR, not only for the started event for events in general. I will add them back in to this PR. |
/hold |
Add the start events for pipelineruns. Cleanup a bit of dead code where an event was generated but it's not used anymore.
f9320d8
to
d3deb3e
Compare
/hold cancel |
@@ -102,7 +102,40 @@ func conditionCheckFromTaskRun(tr *v1beta1.TaskRun) *v1beta1.ConditionCheck { | |||
return &cc | |||
} | |||
|
|||
func checkEvents(fr *record.FakeRecorder, testName string, wantEvents []string) error { |
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.
We use this very same approach for event testing in the taskrun controller.
The following is the coverage report on the affected files.
|
/hold cancel |
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.
/lgtm
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: dibyom 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
Add the start events for pipelineruns.
Cleanup a bit of dead code where an event was generated but it's not used anymore.
Partly addresses #2082
Extracted from #2545
Submitter Checklist
These are the criteria that every PR should meet, please check them off as you
review them:
See the contribution guide for more details.
Double check this list of stuff that's easy to miss:
cmd
dir, please updatethe release Task to build and release this image.
Reviewer Notes
If API changes are included, additive changes must be approved by at least two OWNERS and backwards incompatible changes must be approved by more than 50% of the OWNERS, and they must first be added in a backwards compatible way.
Release Notes
/kind feature
/cc @dibyom @vdemeester