-
-
Notifications
You must be signed in to change notification settings - Fork 905
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
3.1.38 many new failing tests #1713
Comments
Thanks for reporting. Is it possible to add Arch Linux to CI here? If you happen to know existing GitHub CI setups, I'd appreciate a pointer so maybe one day this platform can also be tested here. Maybe this is also related to recent changes though, so CC @EliahKagan . |
This has actions/checkout no longer automatically clone submodules in the CI test workflows. This change is for the purpose of reproducing gitpython-developers#1713, to allow the forthcoming fix for it to be tested. However, continuing to rely on init-tests-after-clone.sh to get the submodules would serve as a kind of regression testing for gitpython-developers#1713. So it is unclear at this time if and when this change should be undone.
Since 7110bf8 (in gitpython-developers#1693), "git submodule update --init --recursive" was not run on CI, on the mistaken grounds that the CI test workflows would already have taken care of cloning all submodules (ever since 4eef3ec when the "submodules: recursive" option was added to the actions/checkout step). This changes the init-tests-after-clone.sh script to again run that command unconditionally, including on CI. The assumption that it wasn't needed on CI was based on the specific content of GitPython's own GitHub Actions workflows. But this disregarded that the test suite is run on CI for *other* projects: specifically, for downstream projects that package GitPython (gitpython-developers#1713). This also brings back the comment from fc96980 that says more about how the tests rely on submodules being present (specifically, that they need a submodule with a submodule). However, that is not specifically related to the bug being fixed.
I'm pretty sure I inadvertently introduced this bug in #1693, when I had GitPython/init-tests-after-clone.sh Lines 50 to 53 in 6f765a2
I reasoned, incorrectly, that this was safe, due to the CI test workflows in this repository (and thus forks, reuploads, etc.) taking care of cloning submodules (this shows GitPython/.github/workflows/pythonpackage.yml Lines 27 to 30 in 6f765a2
The problem is that checking for CI--even conservatively, as done here--is not the same as checking for CI workflows originating in this repository: GitPython/init-tests-after-clone.sh Lines 7 to 10 in 6f765a2
Confusing the two does not cause data loss--any CI will want to skip the interactive prompt--but it does cause brittleness. GitPython's tests can be run on CI through workflows unrelated to the ones we have here, and projects distributing downstream packages of GitPython, including operating systems such as Arch Linux, are examples of where it makes sense to do that.
Lines 120 to 122 in 6f765a2
The need to clone submodules is intentionally not mentioned in The fix should be simple: the init script should unconditionally clone submodules. More granular solutions that still avoid cloning submodules on some CI configurations or if they appear already present are possible, but if that is to be done then I suggest deferring it, so the simpler fix can be applied sooner. I've proposed that fix in #1715, tested it (though not with Arch Linux), and included a more comprehensive analysis in the description. |
This issue should now be fixed with the latest release. Please let us know if that's not the case here. |
Hi! I maintain this package for Arch Linux. Many new failing test with 3.1.38:
python-gitpython-3.1.38-1-x86_64-check.log
As I neither use this package, nor really know how to fix these tests (or have the time to do so), I'll disable them.
The text was updated successfully, but these errors were encountered: