-
Notifications
You must be signed in to change notification settings - Fork 133
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
ci(windows): avoid using external gpg by mistake #1057
ci(windows): avoid using external gpg by mistake #1057
Conversation
On the Windows build agents, a lot of programs are installed, and added to the PATH automatically. One such program is Git for Windows, and due to the way it is set up, unfortunately its copy of `gpg.exe` is also reachable via the PATH. This usually does not pose any problems. To the contrary, it even allows us to test the GPG parts of Git's test suite even if `gpg.exe` is not delivered as part of `git-sdk-64-minimal`, the minimal subset of Git for Windows' SDK that we use in the CI builds to compile Git. However, every once in a while we build a new MSYS2 runtime, which means that there is a mismatch between the copy in `git-sdk-64-minimal` and the copy in C:\Program Files\Git\usr\bin. When that happens we hit the dreaded problem where only one `msys-2.0.dll` is expected to be in the PATH, and things start to fail. Let's avoid all of this by restricting the PATH to the minimal set. This is actually done by `git-sdk-64-minimal`'s `/etc/profile`, and we just have to source this file manually (one would expect that it is sourced automatically, but the Bash steps in Azure Pipelines/GitHub workflows are explicitly run using `--noprofile`, hence the need for doing this explicitly). Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
/submit |
Submitted as pull.1057.git.1634129748874.gitgitgadget@gmail.com To fetch this version into
To fetch this version to local tag
|
On the Git mailing list, Junio C Hamano wrote (reply to this):
|
This branch is now known as |
This patch series was integrated into seen via git@d01c730. |
On the Git mailing list, Johannes Schindelin wrote (reply to this):
|
On the Git mailing list, Junio C Hamano wrote (reply to this):
|
This patch series was integrated into seen via git@4cabc44. |
This patch series was integrated into next via git@3047fe5. |
There was a status update in the "New Topics" section about the branch The PATH used in CI job may be too wide and let incompatible dlls to be grabbed, which can cause the build&test to fail. Tighten it. Will merge to 'master'. |
This patch series was integrated into seen via git@1801777. |
This patch series was integrated into seen via git@f4c4923. |
This patch series was integrated into seen via git@ada1a17. |
This patch series was integrated into next via git@ada1a17. |
This patch series was integrated into master via git@ada1a17. |
Closed via ada1a17. |
I stumbled over a CI failure this morning when I scrambled to tie up all the loose ends for an unexpected v2.33.1 release. Turns out that the CI picked up the installed Git for Windows'
gpg.exe
, and due to a (new, as of this morning) mismatch in the MSYS2 runtime between the installed Git for Windows and the subset of the Git for Windows SDK used for compiling in the CI runs, it worked just enough to pass the prereq, but then failed the tests.Seeing as essentially every single CI build will fail without this patch right up until the point in time when Git for Windows is upgraded in the build agents (to a version that does yet exist), it would be good to fast-track this to
maint
.Note: I based this on the earliest topic where it would apply without merge conflicts,
js/ci-windows-update
(which is unfortunately quite recent, it is not reachable from any version older than v2.33.0).