Cirrus-ci-docs: Not started tasks are marking as cancelled

Created on 8 Apr 2020  ·  15Comments  ·  Source: cirruslabs/cirrus-ci-docs

Expected Behavior

Not started tasks (especially with depends_on) are marking as pending or something like this.

Real Behavior

These tasks are marking as cancelled (and red).

Related Info

image

UX enhancement

All 15 comments

Probably it's even not related to depends_on, in another repository without it:

image

https://cirrus-ci.com/build/6636288484835328

After a time these checks are successful:

image

@fkorotkov I've noticed this often as well. I think it has something to do with how branch tasks are auto-cancelled when a PR is opened. For some reason GitHub displays the status of the cancelled branch tasks rather than the execution state of the PR tasks initially :man_shrugging: Several of my colleagues have thought that the CI pipeline was totally broken because of this 😅

@connorbrinton this is a separate use case. Could you please create a separate issue?

Actually I think I misread the original issue and it's the same issue:

  1. you create a branch
  2. Cirrus creates a Branch build
  3. Cirrus parses and creates tasks
  4. you create a PR
  5. Cirrus Creates a PR build
  6. Cirrus cancels the Branch build with tasks
  7. UI shows canceled tasks from the build branch
  8. Cirrus parses tasks for the PR build
  9. Cirrus now updates UI back to running state

Need to skip step 7 in case of auto-cancelation.

I think step 9 also isn't occurring properly, since the UI doesn't get updated until the tasks actually complete successfully. Skipping step 7 would fix the issue almost entirely though.

If step 7 is skipped, the only case where I think step 9 would change the UI state would be if one or more tasks in the branch build finished successfully before the PR was opened, in which case they would need to be reset to the running state

Yeah, I meant skipping only in case of auto-cancelation. 👌

Actually I think I misread the original issue and it's the same issue:

  1. you create a branch
  2. Cirrus creates a Branch build
  3. Cirrus parses and creates tasks
  4. you create a PR
  5. Cirrus Creates a PR build
  6. Cirrus cancels the Branch build with tasks
  7. UI shows canceled tasks from the build branch
  8. Cirrus parses tasks for the PR build
  9. Cirrus now updates UI back to running state

Need to skip step 7 in case of auto-cancelation.

Can I set-up somehow to run builds only for PRs (not their branches) and master branch?

You can use

only_if: $CIRRUS BRANCH == 'master' || $CIRRUS_PR != ''

You can use

only_if: $CIRRUS BRANCH == 'master' || $CIRRUS_PR != ''

Thank you. :heart:

Skipping of GH UI update on such auto-cancelation cases was deployed. Please let me know if you'll see any issue again.

@fkorotkov I just saw this again with the last PR I opened. Here's a screenshot:

Screenshot 2020-04-16 16 35 26

And here are the build links (let me know if you want task links too):

What's strange is that the integration tests task didn't seem to have its branch cancellation reported. Or maybe the new state (queued) was reported after the cancellation was reported to GH 🤷‍♂️

Seems resolved for me now in https://github.com/AlexWayfer/formalism/pull/48

It was failing at the morning by the way.

Scheduled:

image

GitHub displays as "cancelled" and "not successful":

image

I think it's a similar to this issue this is what happens:

  • you open a PR
  • Cirrus cancels the tasks
  • GitHub gets updates
  • Cirrus runs a new tasks and sends updates to GitHub
  • But GitHub doesn't update

I think it's a similar to this issue this is what happens:

  • you open a PR
  • Cirrus cancels the tasks
  • GitHub gets updates
  • Cirrus runs a new tasks and sends updates to GitHub
  • But GitHub doesn't update

Got it, thank you! Liked/subscribed/waiting…

Was this page helpful?
0 / 5 - 0 ratings

Related issues

cjdb picture cjdb  ·  5Comments

fkorotkov picture fkorotkov  ·  3Comments

RDIL picture RDIL  ·  4Comments

hilbix picture hilbix  ·  3Comments

iskakaushik picture iskakaushik  ·  5Comments