gitpipe: Prioritize context cancellation
We're observing flaky tests in our gitpipe code, where the race happens on context cancellation: we'll either see that the pipeline has shut down gracefully, or alternatively we'll see that git-rev-list(1) was killed because of context cancellation. This race can happen because we don't prioritize handling of context cancellations: if git-rev-list(1) was killed via the context, then it must've happened via our context and thus we know that at the point of sending the error down the pipeline, that the context has terminated already.
Fix the race by prioritizing context cancellation: before trying to send down any results or errors, we'll first check whether the context was cancelled. This also allows us to get rid of the workaround we had in our pipeline tests where there was a special child context such that we didn't observe killed git-cat-file(1) processes.
Fixes #3697 (closed), #3693 (closed)
Merge request reports
Activity
changed milestone to %14.1
assigned to @pks-t
mentioned in issue #3697 (closed)
1 Warning CHANGELOG missing. To ceate a changelog, annotate one or more commits with the
Changelog
Git
trailer. If you want to annotate the latest commit, you can do so usinggit commit --amend
. If you want to annotate older or multiple commits, you need to
do so usinggit rebase -i
.When adding the trailer, you can use the following values:
- added
- fixed
- changed
- deprecated
- removed
- security
- performance
- other
For example:
This is the subject of your commit. This would be the body of your commit containing some extra details. Changelog: added
If your merge request doesn't warrant a CHANGELOG entry, consider adding any of
the documentation, ~"tooling", ~"tooling::pipelines", ~"tooling::workflow", ci-build, meta labels.See the documentation.
1 Message Suggested maintainers: @chriscool
, and@toon
Generated by
Dangerrequested review from @chriscool and @8bitlife
removed review request for @8bitlife
Thanks for fixing it @pks-t !
- Resolved by Christian Couder
mentioned in commit 5fdd1ba6
added workflowstaging label and removed workflowready for review label
added workflowcanary label and removed workflowstaging label
added workflowproduction label and removed workflowcanary label
added releasedcandidate label
added releasedpublished label and removed releasedcandidate label
added workflowstaging-ref label and removed workflowproduction label
Due to an issue the workflowstaging-ref label was incorrectly applied to this merge request. Re-setting back to workflowproduction using
https://gitlab.com/gitlab-org/release-tools/-/merge_requests/1620
added workflowproduction label and removed workflowstaging-ref label