-
Notifications
You must be signed in to change notification settings - Fork 0
Closed
coder/coder
#20776Labels
Description
CI Run: https://github.com/coder/coder/actions/runs/19353959038
Commit: fe3b825b86c0875898a716d2c03b087aa88af0f9 (Steven Masley)
Summary
- Job: test-go-pg (macos-latest)
- Package: github.com/coder/coder/v2/provisioner/terraform
- Failing test: TestInstall
- Root cause classification: Code change in test (platform-specific setup)
Error evidence (from logs)
=== FAIL: provisioner/terraform TestInstall (0.73s)
install_test.go:223:
Error: Received unexpected error:
install:
github.com/coder/coder/v2/provisioner/terraform.Install
/Users/runner/work/coder/coder/provisioner/terraform/install.go:109
- no ZIP archive found for terraform 1.13.4 darwin/arm64
Test: TestInstall
Why this is happening
- Recent change edf056babc3932cbfeebec29765b8531b0a529fd (test: add mocked terraform installation files) updated TestInstall to use a fake HTTP server that serves only linux/amd64 artifacts.
- On macOS runners (darwin/arm64), hc-install queries for darwin/arm64, which is not present in the mocked index, causing the error above.
Precise assignment analysis
- Test function and mock data introduced/modified by: edf056babc3932cbfeebec29765b8531b0a529fd by Paweł Banaszewski.
- install_test.go defines createFakeTerraformInstallationFiles and versionedJSON to only include linux_amd64 builds, e.g.:
- zipFilename:
terraform_%s_linux_amd64.zip - Builds:
{ OS: "linux", Arch: "amd64" }
- zipFilename:
- TestInstall passes the fake server base URL to Install, so platform-specific selection happens against this mocked catalog.
- install_test.go defines createFakeTerraformInstallationFiles and versionedJSON to only include linux_amd64 builds, e.g.:
Related issues
- Closed as fixed (different root cause): test flake: TestInstall reaches out over the internet #72 (TestInstall reached out to the internet). This is a new platform-specific catalog issue.
Proposed fix
- Extend the mocked product catalog and files to include the current runner’s GOOS/GOARCH (at minimum darwin/arm64 alongside linux/amd64), or adjust the test to force linux/amd64 selection irrespective of host platform.
- Optionally add a CI-only skip or guard for unsupported platforms if mocking multiple platforms is non-trivial.
Reproduction
- Run TestInstall on macOS arm64 (macos-latest). The fake server lacks darwin/arm64, leading to the error above.