Skip to content

Introduce CancelHelixJobs task#7185

Merged
MattGal merged 1 commit intodotnet:mainfrom
MattGal:arcade-7113
Apr 2, 2021
Merged

Introduce CancelHelixJobs task#7185
MattGal merged 1 commit intodotnet:mainfrom
MattGal:arcade-7113

Conversation

@MattGal
Copy link
Member

@MattGal MattGal commented Apr 2, 2021

This change is meant to allow cancellation of Helix Jobs asynchronously by different pipelines / stages, because the existing model (cancellation on build cancellation) does not currently work when the build stage waiting on the helix jobs times out, which is unfortunately the top reason this happens.

Addresses #7113

To double check:

  • I don't see any reasonable way to add tests for this, but I exercised authenticated and non-authenticated scenarios locally using unit tests by adding steps like this to UnitTests.proj:
  <Target Name="WaitThirtySecondsAndCancelThoseJobs" AfterTargets="CoreTest">
    <Message Importance="High" Text="Wasting 30 seconds then cancelling the job" />
    <Exec Command="ping -n 30 127.0.0.1 > nul" />
    <CancelHelixJobs Jobs="@(SentJob)" AccessToken="$(HelixAccessToken)" />
    <Message Importance="High" Text="did it work?" />
  </Target>

…ynchronously by different pipelines / stages.
@MattGal MattGal merged commit af434ac into dotnet:main Apr 2, 2021
akoeplinger pushed a commit to akoeplinger/arcade that referenced this pull request Apr 12, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants