-
Notifications
You must be signed in to change notification settings - Fork 1.8k
Cleanup: remove potential goroutine leakages in taskrun #4936
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
Cleanup: remove potential goroutine leakages in taskrun #4936
Conversation
Hi @kerthcet. Thanks for your PR. I'm waiting for a tektoncd member to verify that this patch is reasonable to test. If it is, they should reply with Once the patch is verified, the new status will be reflected by the I understand the commands that are listed here. Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
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.
/ok-to-test
Thanks @kerthcet! would you mind adding a commit message body please?
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: lbernick 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 |
dbb1eec
to
607ab17
Compare
Absolutely, done. |
/retest |
/lgtm Good catch! |
When we try to record metrics in a forked goroutine, we should inherit the context from upstream to prevent potential goroutine leakages. Signed-off-by: kerthcet <[email protected]>
607ab17
to
341912e
Compare
@abayer PTAL, fixed the tests error, thanks. |
/hold |
/retest |
/test pull-tekton-pipeline-unit-tests |
Well, unit tests failed for some unknown reason, details here https://tekton-releases.appspot.com/build/tekton-prow/pr-logs/pull/tektoncd_pipeline/4936/pull-tekton-pipeline-unit-tests/1532906825693794306/, but I can't reproduce this, all tests passed in my local env, unhold then. |
} | ||
|
||
if err := metrics.DurationAndCount(&v1beta1.TaskRun{}, beforeCondition); err == nil { | ||
ctx, cancel := context.WithCancel(context.Background()) |
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.
just curious, what's the need for the cancellation function here?
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.
Make sure to teardown the resources.
Unfortunately our tests are quite flaky right now :( This error looks a lot like a flake to me so OK to rerun |
@abayer I don't think anything has really changed since you LGTMed so I'll go ahead and add that label-- lmk if any concerns /lgtm |
/unhold |
It seems like I have no privilege to remove the |
oh oops sorry-- I don't think you need permissions, it's just a different command /hold cancel |
/kind bug |
Signed-off-by: kerthcet [email protected]
Changes
Submitter Checklist
As the author of this PR, please check off the items in this checklist:
functionality, content, code)
(if there are no user facing changes, use release note "NONE")
Release Notes
NONE