Skip to content

build: deterministic fix for nbgv \ race (replaces ineffective env hack)#16

Merged
marcschier merged 1 commit into
mainfrom
fix/nbgv-github-env-race-deterministic
Jul 15, 2026
Merged

build: deterministic fix for nbgv \ race (replaces ineffective env hack)#16
marcschier merged 1 commit into
mainfrom
fix/nbgv-github-env-race-deterministic

Conversation

@marcschier

Copy link
Copy Markdown
Owner

Follow-up to #15. That PR blanked GITHUB_ACTIONS on the Pack step, but GITHUB_ACTIONS is a default env var that cannot be overridden from a workflow (verified in CI on opc-classic: a step-level env: GITHUB_ACTIONS: '' still reports [true]) — so #15 did not actually prevent nbgv's \ writes; the release publish that followed passed by luck and the race can recur.

This replaces it with an MSBuild-layer fix: a root Directory.Build.targets clears nbgv's @(CloudBuildVersionVars) just before its SetCloudBuildVersionVars target, so nothing is written to . Verified locally (nbgv 3.10.91): baseline build writes GitBuildVersion*/GitAssemblyInformationalVersion to ; with the fix it writes zero, and the build still succeeds. Full build parallelism is retained (no -m:1 slowdown), and it covers every dotnet build/test/pack/publish. Also reverts the now-unnecessary env block on the Pack step.

…VersionVars); revert ineffective GITHUB_ACTIONS env hack
@marcschier
marcschier merged commit 3a49dab into main Jul 15, 2026
10 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant