ci: run full test suite on Windows - #3866
Open
Sayt-0 wants to merge 16 commits into
Open
Conversation
Sayt-0
marked this pull request as draft
July 29, 2026 15:02
Sayt-0
marked this pull request as ready for review
July 30, 2026 15:32
Sayt-0
enabled auto-merge
July 30, 2026 15:35
aheritier
requested changes
Jul 30, 2026
Comment on lines
95
to
+120
| - name: Run plan tests | ||
| run: go test ./pkg/tools/builtin/plan/ ./pkg/plans/ | ||
| run: go test -count=1 ./pkg/tools/builtin/plan/ ./pkg/plans/ | ||
|
|
||
| # Run everything except the plan packages covered above. Splatting the | ||
| # package list avoids command-line length limits and quoting ambiguity. | ||
| - name: Run remaining tests | ||
| env: | ||
| # Mirror .env.test: blank out provider credentials on the runner. | ||
| DOCKER_AGENT_MODELS_GATEWAY: "" | ||
| OPENAI_API_KEY: "" | ||
| ANTHROPIC_API_KEY: "" | ||
| GOOGLE_API_KEY: "" | ||
| GOOGLE_GENAI_USE_VERTEXAI: "" | ||
| MISTRAL_API_KEY: "" | ||
| OPENROUTER_API_KEY: "" | ||
| shell: pwsh | ||
| run: | | ||
| $exclude = @( | ||
| 'github.com/docker/docker-agent/pkg/tools/builtin/plan' | ||
| 'github.com/docker/docker-agent/pkg/plans' | ||
| ) | ||
| $listed = @(go list ./...) | ||
| if ($LASTEXITCODE -ne 0) { throw "go list failed with exit code $LASTEXITCODE" } | ||
| $packages = @($listed | Where-Object { $_ -notin $exclude -and -not [string]::IsNullOrWhiteSpace($_) }) | ||
| if ($packages.Count -eq 0) { throw 'go list returned no packages to test' } | ||
| go test -count=1 @packages |
aheritier
reviewed
Jul 30, 2026
| # Native Windows tests. Plan storage relies on OS-specific file locking and | ||
| # path semantics, so its tests run first as a dedicated gate; the remaining | ||
| # suite runs afterwards and is blocking as well. | ||
| windows-tests: |
Collaborator
There was a problem hiding this comment.
Why not using the same pattern than linux by installing and using gotask ?
aheritier
reviewed
Jul 30, 2026
| homeDir, err := os.UserHomeDir() | ||
| if err != nil { | ||
| return nil, fmt.Errorf("getting home directory: %w", err) | ||
| homeDir := paths.GetHomeDir() |
Collaborator
There was a problem hiding this comment.
I was expecting fixes in tests but not in app code.
aheritier
reviewed
Jul 30, 2026
| }) | ||
| } | ||
|
|
||
| func userHomeDir() (string, error) { |
Collaborator
There was a problem hiding this comment.
I am not sure, os.UserHomeDir() should be the value to use by default ..
https://cs.opensource.google/go/go/+/refs/tags/go1.26.5:src/os/file.go;l=605
With this PR we change the user home from USERPROFILE to HOME which will create a lot of issues I think for windows users because they won't look at the default settings etc in the same place. I am not confident
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.
Summary
windows-latestas a blocking CI gateWhy this is useful
The project publishes Windows binaries and contains Windows-specific implementations for file locking, atomic writes, paths, sockets, processes, and executable handling. Cross-compilation proves that these implementations compile, but only a native Windows runner exercises their real filesystem and process semantics.
The initial observational run exposed failures in 36 packages. The fixes in this PR address those failures rather than hiding them behind
continue-on-error, including:.exeresolutionfile://URI handlingos.RoothandlesCI design
Validation
Latest fully green run: https://github.com/docker/docker-agent/actions/runs/30551413628
The Windows runner reports
GOOS=windows,GOARCH=amd64,CGO_ENABLED=1, andCC=gcc.