Skip to content
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

Odd concurrency issue where GitHub commit links to different Cirrus CI pipelines #1167

Closed
2 tasks
kratsg opened this issue May 19, 2023 · 1 comment
Closed
2 tasks
Labels

Comments

@kratsg
Copy link

kratsg commented May 19, 2023

Expected Behavior

What should have happened is that all jobs for a given Cirrus CI pipeline are linked correctly to the corresponding commit.

Real Behavior

What ended up happening was not clear. I'm still not quite sure what's going on so I'll link below.

Related Info

This is a (tick one of the following):

  • Website issue
    • Link to page:
  • Task issue
    • OS: (Docker, macOS, Windows, FreeBSD)
    • Task name:
    • Script/cache name (if applies):

Neither a website issue or task issue -- probably related to how Cirrus CI and GitHub are communicating between themselves. See below for more details.


In kratsg/pylibmagic, I need to build aarch64/arm64 wheels (cross-compile) using cibuildwheel. If you view the jobs on this commit: kratsg/pylibmagic@1cdc904, you'll see three checks from Cirrus:

Screenshot 2023-05-18 at 5 34 20 PM

which link to:

However, if you go to the individual pages here, you'll see they are built from different sources (two of them from the main branch and one of them from the v0.4.0 branch)! I'm not sure how this happened, but it's likely a concurrency issue that I'm not clear on how to fix so easily beyond just... tagging after bumping up my versions (I rely on your-tools/tbump here).

In fact, I have two separate pipelines here on Cirrus:

and I suspect it's truly just a race condition, but I'm a bit surprised that it's breaking the linkage of the runs on GitHub. The reason is I rely on being able to find the corresponding runs from Cirrus CI to be able to download the artifacts back into GitHub to collect with other wheels I'm building in GitHub actions and release/deploy to pypi afterwards... so I need to have the right runs linked correctly in GitHub (as I rely on GitHub API here for figuring out the correct jobs).

@kratsg kratsg added the bug label May 19, 2023
@fkorotkov
Copy link
Contributor

Hey @kratsg, unfortunately it's a caveat of GitHub API. Specifically that we can only set SHA basis and not on a more specific ref.

In your case the main branch and v0.4.0 tag were updated within a second of each other so two builds that you linked raced to finish. Status that you see on the check runs are the representing results of the last fished task chronologically speaking.

Unfortunately I don't think there is anything we can do because it's not clear what is the expected behaviour should be give the API limitation.

@fkorotkov fkorotkov closed this as not planned Won't fix, can't repro, duplicate, stale May 20, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants