-
-
Notifications
You must be signed in to change notification settings - Fork 14.4k
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
Occasional pkgs/by-name
checkout failure
#256756
Comments
Here is the failed workflow run. It looks the same as actions/checkout#36, but there the problem seems to have been that the PR was merged before the workflow was able to run. This doesn't appear to be the case here though, because the workflow failed at exactly 2023-09-18 14:12:57 but the PR was only merged days later. However, the PR was opened at I think the problem can occur when the PR has a merge conflict, or GitHub hasn't computed the merge commit yet, so the ref isn't valid yet. Relevant GitHub docs are here:
Kind of makes sense, can't get a merge ref before that. I think the best way around this would be to fetch both the latest base branch commit and the PR's head commit, then do an explicit |
Another case here: https://github.com/NixOS/nixpkgs/actions/runs/6321982259/job/17166813954, and indeed it's due to a merge conflict, the PR (#257561) even got the merge conflict label assigned. Turns out the manual merging idea is pretty tricky, because to merge two commits, git needs a common ancestor, but Git doesn't have that without fetching the Git history, and GitHub doesn't have an API endpoint for getting that either. Maybe the best approach here is to have a step before the checkout which just resolves the merge ref using
And fails with a better error if it can't be resolved. (If it can be resolved, that resolved SHA should get used in following steps to avoid a potential race condition). |
I just created #259074 which improves the error message in case of conflicts. I'll consider this fixed after that. |
Looks like it's not just merge conflicts that can cause this: https://github.com/NixOS/nixpkgs/actions/runs/6548548919/job/17783482639?pr=261650 The corresponding PR definitely doesn't have a merge conflict: #261650 @Artturin opened #261693 to hopefully see what's going on in the future. I'll open this issue again for now |
This should be fixed by #261741 |
Originally posted by @doronbehar in #237439 (comment)
The text was updated successfully, but these errors were encountered: