-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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
actions/checkout@v2 breaks on a (self-hosted runner, repository) pair with submodules; no way to revert #385
Comments
@marcelopontipedra I do not see how your comment is relevant to the original issue. Please avoid asking for help in irrelevant issues: a) you've already created your own; b) there is GitHub Support Community. |
@yeputons Sorry about that, I freak out about this issue. My bad. I've also created a ticket for the issue the same time I commented here in the support community. |
Github Actions checkout@v2 fails to properly cleanup state in self-hosted runners which leads to errors from prior CI runs. actions/checkout#385 Adding the created submodule directory to gitignore should hopefully prevent this from happening: actions/checkout#424 (comment).
Github Actions checkout@v2 fails to properly cleanup state in self-hosted runners which leads to errors from prior CI runs. actions/checkout#385 Adding the created submodule directory to gitignore should hopefully prevent this from happening: actions/checkout#424 (comment).
May be a duplicate of #354 |
Adding the step below before checkout works for me.
|
There's a workaround for this in #590 (comment) |
#964 might be a fix in the actual code, but i'm having issues getting any eyeballs on it. |
It hadn't happened in a long time, but I'm using the latest actions/checkout and just saw a runner bricking itself after a submodule got into a bad state: https://github.com/lampepfl/dotty/actions/runs/4244282953/jobs/7378178653 (in this case I didn't even figure out how it got stuck in this state, I think it might have been because a job got cancelled while the submodule was being updated?) I don't really get why the action insists on running commands on submodules even though |
Ftr, i have a rebased PR here that takes care of this: #1321 The repro case described at the top of this issue helped reliably reproduce it, e.g. just add a random Note again: Only happens if you are using non-ephemeral runners. |
How to reproduce:
actions/checkout@v2
succeeds. Let's say that you have it in a repositorymain-repo
.other-repo
insidemain-repo
, and thengit add . && git commit -m"" && git push
, effectively addingother-repo
as a submodule tomain-repo
.labs-yeputons
ismain-repo
, andlabs
is theother-repo
that was accidentally add as a submodule):So, after the first workflow run the working directory is forever contaminated and all subsequent builds break even if we reset branch to the previous state. The only way to fix this is to either manually clean up working directory on each affected worker, or to add an extra step to nuke repository before checking it out from scratch.
The text was updated successfully, but these errors were encountered: