Repository navigation
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
This was referenced Oct 15, 2026
scttfrdmn
added a commit
that referenced
this pull request
Oct 16, 2026
* CI: run unit tests on windows-latest (#971) * Windows CI: LF checkout * Windows CI: fix Windows test failures and real Windows bugs, skip Linux-only tests (#971) Fixes #997 (plugin local paths), #998 (pipeline S3 key matching), #999 (snapshot raw-image Cleanup). Skips pkg/security (#1000) and pkg/pluginruntime (#1001); Linux-only tests skip on Windows (#1002). * Windows CI: skip the Linux MPI user-data execution tests (#1002) * Windows CI: audit.log mode assertion is POSIX-only (#1002) * Windows CI: run pkg/service and pkg/taskproto now that #941 made their tests compile (#971) * Windows CI: fix spored status clock skew, make or skip Linux-only tests (#971) cmd/spored (real bug): buildStatusReport read uptime BEFORE the CPU/network samples and "now" after them, so boot and billed time were late by the sampling time — seconds on Windows, where each sample is a PowerShell process (47s after launch reported 52s billed). And on the checkpoint path (always on Windows, which publishes no compute clock) compute included the status process's own run time, so it read "2s as of the last checkpoint" with no checkpoint written. Clock readings now follow the samples, and an unadopted clock reports exactly the checkpoint. The tests bound times by a before/after window instead of assuming the report is instant; verified to fail against the old code with a simulated 2.5s sampling delay. pkg/agent: the /sys/class/net fixture used kernel-style names with ':', which Windows rejects; the parser never reads them, so use '-'. lambda/pipeline-orchestrator (part of the root module, no go.mod) and pkg/taskproto: tests that execute Linux user-data / wrapper / flush hook under bash are skipped on Windows (#1002).
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.
Fixes #925.
The bug
GOOS=windows go vet ./...failed on main:(plus
syscall.Kill, and a secondStat_tat :775). The production code builds for Windows, butgo buildnever type-checks_test.gofiles, and CI vets linux only. So nothing noticed while windows/amd64 shipped.The fixes, one per test's intent
pkg/taskproto.TestGenerateWrapper_OutputOnlyDirExistsBeforeDockerRunandTestGenerateWrapper_StagedFileOwnedByInvokingUID_RealFilesystemexist to prove Unix uid ownership (and sticky-bit semantics) after running the generated Linux wrapper under bash. Neither concept exists on Windows. I moved both tests verbatim intowrapper_unix_test.gounder//go:build !windows. It is a pure move: the sorted lines of old vs new differ only in the new file's header and imports, and there are 32 tests before and after. The rest ofwrapper_test.go, including its portable text assertions, still compiles and runs everywhere.pkg/service. Every test inremote_test.gothat usesfakeSSHExecalready skips at runtime on Windows ("uses a POSIX shell"). Others in the file (TestSSHExecArgs,TestHTTPProbe, …) are portable. So the intent is "the file compiles everywhere; the POSIX-shell tests skip", and constraining the whole file would have dropped the portable ones. The process-group calls moved intoprocgroup_posix_test.go(!windows), with Windows stubs inprocgroup_windows_test.go.fakeSSHExecitself now skips on Windows, so that guard belongs to the fixture and no longer depends on each caller remembering it.The gate
scripts/release-goos-vet.shrunsgo vet ./...once per GOOS that.goreleaser.yamlbuilds. Today that is darwin, linux and windows. It runs frommake check-goos(step 2b ofmake check) and from aRelease GOOS vet gateCI step, which is the same script in both places.builds:section'sgoos:lists in block and flow form, quoted or not. It ignoresignore:entries' scalar- goos: windows, andgoos:keys outsidebuilds:.TestReleaseGOOSDiscoveryAgreesWithYAML(inrelease_builds_test.go, runs ingo test -short) compares the script's--listoutput with a realgopkg.in/yaml.v3decode (already a direct dependency). The testos.ReadFiles both the script and the config, sogo test's cache invalidates when either changes.Evidence
remote_test.go, which compiles on the host (go vet ./pkg/servicepassed).make check-goosthen failed withvet: pkg/service/remote_test.go:41:42: unknown field Setpgid …/FAIL GOOS=windows, exit 2. With the fix restored:✅ go vet clean for every release GOOS: darwin,linux,windows.- "freebsd"to.goreleaser.yamlmade it fail (discovers GOOS [darwin linux windows], but .goreleaser.yaml decodes to [darwin freebsd linux windows]). That exposed a real gap: quoted list items were not parsed. I fixed it, and the test then passed with freebsd discovered. Config restored.ignore:, a non-buildsgoos:, a build with no goos, an emptygoos: [], a config with no builds) give identical results under BSD awk, mawk (the awk on Ubuntu runners) and gawk. The last three fail with a message.pkg/servicesuite (not-short, so the process-group fixture really runs) passes.make check: everything passes except the knownTestGenerateWrapper_ChownFixesCrossUIDStickyUnlink_Docker, which needs a Docker daemon.make check-nested: all 9 nested modules clean.Caveats
make checkstep and aci.ymlstep right afterVet. Keep all of them. Make integration-tagged tests compile, and gate every build tag (#913) #927 gates custom build tags, and this gates GOOS, so they complement each other.