Repository navigation
test(orchestrator): run the git provider wiring tests' git through gitexec - #1175
Draft
sbalabanov wants to merge 1 commit into
Draft
sbalabanov wants to merge 1 commit into
sbalabanov wants to merge 1 commit into
Conversation
sbalabanov
commented
Dec 3, 2026
sbalabanov
left a comment
Collaborator
Author
There was a problem hiding this comment.
[flaky-1-d3-reviewer] nit: PR body, Test Plan, "Before" line. Spec D3's acceptance evidence asks for 20/20 failing runs before the fix. This line records a single run and only says FAILED. The failure is deterministic, so one run is enough, but give the count and where it failed so nobody reads FAILED as 1 of 20. For example: "1/1 failed: git commit -m seed exited 128 because the system signing program failed."
I checked these and found nothing to fix:
- Isolation:
gitexec.Commandreplaces the whole environment, so no system or global config reaches either fixture: not signing, notcore.hooksPath, not LFS filters. InheritedGIT_CONFIG_PARAMETERSandGIT_TEMPLATE_DIRare gone too. Only the repo-local identity the tests write is left. I reproduced this by hand on a host whose system config setscommit.gpgsign=true:- the pinned git with a Bazel-like env exits 128 at commit;
- the same commit with this closure's env exits 0, unsigned.
So dropping--no-gpg-signis safe.
- Leftovers and precedent: nothing else in
config_test.goruns git, andos/execis gone. The pattern matchesplatform/git/repo/repo_test.go:63andsubmitqueue/extension/changeprovider/git/provider_test.go:95. - Repo rules:
- no new comments;
- gofmt is clean;
- the BUILD change is the single sorted dep gazelle adds;
- scope is D3's two files;
- the diff, commit and PR body name no internal systems;
- the PR body puts the TLDR first and has no Revert Plan or Issue Links sections.
- Test Plan: it matches the implementer's test logs. The pre-change run fails at
git commit -m seedwith exit 128. 20/20 runs pass, and 10/10 pass under race. - Smaller alternative:
-c commit.gpgsign=falseon the one commit would be a smaller diff with no BUILD change. But it leaves system hooks and filters in place, and it leaves the Tango test's one-off flag.gitexecis the repo's single source for this environment, so the PR takes the right route.
Out of scope, no action needed: the code under test (newProfiles calling gitrepo.NewRepo with an empty Git) resolves git from PATH. Run locally, it uses the host's git binary, but under gitrepo's own scrubbed config.
…texec TestNewProfiles_GitChangeProviderReadsARealRepository failed on every run on hosts whose system git config enables commit signing: `git commit -m seed` exited 128 with "gpg failed to sign the data". The local `run` closure used exec.Command with the inherited environment, so system and global git config (signing, hooks) applied to the test repositories. Both `run` closures now build their commands with gitexec.Command, which isolates host git config (system and global) and puts the pinned git first on PATH, so plain `git <subcommand>` calls use it. It does not pin every git helper binary: local clone and push still run git-upload-pack and git-receive-pack by name, and those resolve from host git. The Tango test only passed because it hard-coded --no-gpg-sign; that flag is dropped, since removing host config makes it unnecessary and keeping it would suggest the isolation is not enough. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
sbalabanov
force-pushed
the
sergeyb/test-orchestrator-config-gitexec
branch
from
December 3, 2026 21:22
93865ef to
40ef5b8
Compare
This branch has not been deployed
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.
TLDR: The orchestrator git provider wiring tests now run git through gitexec, so they no longer fail on hosts whose git config enables commit signing.
Summary
TestNewProfiles_GitChangeProviderReadsARealRepositoryfailed on every run on hosts with systemcommit.gpgsign=true(git commitexited 128) because itsrunclosure usedexec.Commandwith the inherited environment.runclosures inservice/submitqueue/orchestrator/server/config_test.gonow usegitexec.Command, which isolates host git config (system and global, removing signing and hooks) and puts the pinned git first onPATH. It does not pin every git helper: local clone and push still rungit-upload-packandgit-receive-packfrom host git.--no-gpg-signworkaround is dropped; it is no longer needed.//platform/git/exectest dep.Test Plan
commit.gpgsign=true:./tool/bazel test //service/submitqueue/orchestrator/server:go_default_test --nocache_test_resultsfailed 1/1 atgit [commit -m seed], exit status 128,error: gpg failed to sign the data/fatal: failed to write commit object.--runs_per_test=20 --runs_per_test_detects_flakespassed 20/20.--@rules_go//go/config:race --build_tests_only --runs_per_test=10 --nocache_test_resultspassed 10/10.make gazelle,make fmt,make lint,make check-gazelle,make check-tidyall pass.🤖 Generated with Claude Code