Repository navigation
test(deps): keep git lookup env in GitLab routing tests - #3828
Merged
Daniel Meppiel (danielmeppiel) merged 1 commit intoNov 18, 2026
Merged
Conversation
The GitLab routing tests clear os.environ, but since #3790 the REST fallback reads git config through get_git_executable(). On Windows, with PATH cleared, git cannot be found unless an earlier test on the same xdist worker already cached it, so the tests fail depending on test order (build-release run 44233799606 on e217a53). Keep PATH, SYSTEMROOT and PATHEXT in the cleared env, and mark the module windows_compat so the PR-time Windows gate runs it. Co-authored-by: Copilot App <[email protected]>
Daniel Meppiel (danielmeppiel)
requested a review
from Sergio Sisternes (sergio-sisternes-epam)
as a code owner
November 18, 2026 04:09
Contributor
There was a problem hiding this comment.
🟢 Approval recommended
No active review issues are identified for the test-only changes preserving Windows Git discovery and enabling compatibility-gate coverage.
No open issues 🎉
What changed in this PR
This test-only PR addresses order-dependent Windows failures in GitLab routing tests ahead of the v0.36.1 release gate. Product code is unchanged.
Changes:
- Preserve
PATH,SYSTEMROOT, andPATHEXTwhen clearing the test environment so native Git remains discoverable. - Mark the module
windows_compatto include it in the PR-time Windows Compatibility Gate.
| File | Description |
|---|---|
tests/unit/deps/test_github_downloader_gitlab_routing.py |
Preserves Git lookup environment variables and enables Windows gate coverage. |
Review effort: Balanced
Daniel Meppiel (danielmeppiel)
deleted the
fix/gitlab-routing-test-keeps-path
branch
November 18, 2026 04:23
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.
Description
Test-only fix for a Windows unit failure that breaks main's build-release (run 44233799606 on e217a53, Windows x86_64):
test_type_gitlab_routes_untrusted_bespoke_host_without_private_tokentest_type_gitlab_routes_trusted_bespoke_host_with_private_tokenBoth fail with
FileNotFoundError: git executable not found on trusted PATH directories.The helper clears
os.environwithpatch.dict(..., clear=True). Since #3790, the GitLab REST fallback builds the native git credential env and reads git config throughget_git_executable(). On Windows, with PATH cleared, git is found only if an earlier test on the same xdist worker has already cached it, so the result depends on test order. That makes it a risk for the v0.36.1 pre-tag gate. The fix keepsPATH,SYSTEMROOTandPATHEXTin the cleared env and marks the modulewindows_compat, so the PR-time Windows Compatibility Gate runs it. Product code is unchanged.Issue and approved scope
Issue: Refs #3790 (milestone 0.36.1, which 0.36.1 release PR #3827 depends on)
Human scope-approval comment: Part of the 0.36.1 release Daniel Meppiel (@danielmeppiel) authorized on 2026-11-17. This is a test-only fix for a red main.
Does this PR complete the issue, or what remains? It removes a test-order-dependent Windows failure. Nothing else remains.
Type of change
Testing
Local test runs were skipped (shared machine).
uvx [email protected] checkandruff format --checkon the changed file both pass. The Windows Compatibility Gate on this PR runs the module on win32.Spec conformance (OpenAPM v0.1)