Repository navigation
Avoid upgrading installed Git during Linux CI setup - #337
Open
dajiaohuang wants to merge 2 commits into
Open
dajiaohuang wants to merge 2 commits into
dajiaohuang wants to merge 2 commits into
Conversation
Owner
|
Thank you very much! Do you think the fix itself could be enough and we can drop the new integration test file? |
Author
|
Yes—the one-line apt-get install -y --no-upgrade git change is the essential fix. I removed the standalone integration-test file in commit 8ea2977 to keep this PR focused: the current workflow does not invoke it (script/ci.sh run_tests runs the C++ CTest suite), so it would not provide automatic regression coverage. The isolated APT test had validated both installed-Git and missing-Git behavior before removal; no new tests were run for this deletion. |
Dobiasd
approved these changes
Oct 21, 2026
Owner
|
Perfect, thanks! 👍 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Linux CI setup only needs Git to be available, but
apt-get install -y gitalso upgrades an already installed copy. In the captured GCC 9 failure on PR #336, Git 2.30.2 was already working,apt-get updatefetched its indexes successfully, and setup then attempted an unnecessary upgrade whose bullseye-security package URL returned 404. Build and Test never ran. Exact evidence: job 117076513097, run attempt 2, head b239483.Add
--no-upgradeto the install command. Existing Git is retained, while missing Git is still installed. This behavior is supported by the Debian bullseye APT manual. The index update and compiler matrix are unchanged; this does not repair a repository outage when Git actually needs installing.Validation: two new integration tests run the actual setup script through real APT 2.8.3 on Linux, using a task-local file repository, package status, configuration, cache and download-only mode. Original canonical-LF script fails when a newer Git artifact is absent; missing-Git control downloads a valid synthetic package. The changed script passes both cases, and fixture status remains unchanged (no package installation).
bash -nandgit diff --checkpass. Run withpython3 -m unittest discover -s script -p test_ci_setup_linux.py -v.A preliminary Windows checkout CRLF run failed before meaningful APT assertions; the baseline was repeated using the byte-verified canonical Git blob.
gh run view --job ... --log-failedalso returned a later attempt's log, so the evidence above was reconciled through the exact job metadata/log endpoints instead. No Docker/compiler image, production package mirror, full C++ suite/matrix, hosted CI rerun, or successful #336 CI acceptance is claimed. This is an independent CI repair against master, leaving #336's docs branch unchanged.