fix(ci): docker compose v2 + bump terraform-validate to 1.10.5 - #1136
Conversation
Two mechanical CI infrastructure fixes surfaced by the audit after the integration branch was promoted to main and ci.yml started running on all PRs. 1. ubuntu-24.04 runners dropped docker-compose v1 (the standalone `docker-compose` binary). Switch the four command invocations in the e2e-tests job (ci.yml) and the docker-compose-test Makefile target to the Docker Compose v2 plugin form `docker compose`. The docker-compose.test.yml filename is unchanged. 2. The terraform-validate job pinned setup-terraform to 1.6.0, but every terraform/environments/*/main.tf declares required_version >= 1.10.0, so `terraform init`/`validate` aborted with "Unsupported Terraform Core version" for all three clouds. Bump to 1.10.5 to match the pin already used in pre-commit.yml. Verified: ci.yml parses as valid YAML; terraform init/validate against terraform/environments/aws now passes the version constraint (only the sandbox's offline provider cache fails, which the CI runner downloads).
📝 WalkthroughWalkthroughThis PR updates infrastructure tooling: Terraform is pinned to version 1.10.5 in the CI workflow, and Docker Compose commands are migrated from the deprecated hyphenated ChangesInfrastructure Tooling Updates
Estimated code review effort🎯 1 (Trivial) | ⏱️ ~3 minutes Suggested labels
Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
|
@coderabbitai review |
✅ Action performedReview finished.
|
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@Makefile`:
- Around line 232-233: Replace the two separate Makefile command lines so
teardown always runs: run the test-up command (docker compose -f
docker-compose.test.yml up --abort-on-container-exit --exit-code-from
test-runner) in the same shell, capture its exit code, then always run the
teardown (docker compose -f docker-compose.test.yml down -v) and finally exit
with the captured code; i.e., group them so the up command's exit code is saved
(e.g., rc=$$?), teardown runs unconditionally, and the recipe returns the saved
rc.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: defaults
Review profile: CHILL
Plan: Pro
Run ID: 6d044531-04ca-4061-83bb-b7dc8eeab455
📒 Files selected for processing (2)
.github/workflows/ci.ymlMakefile
| docker compose -f docker-compose.test.yml up --abort-on-container-exit --exit-code-from test-runner | ||
| docker compose -f docker-compose.test.yml down -v |
There was a problem hiding this comment.
Ensure teardown always runs even when tests fail.
Line 232 can legitimately return non-zero (because of --exit-code-from test-runner), which prevents Line 233 from running in make. That leaves test containers/volumes behind on failing runs.
Suggested fix
docker-compose-test:
`@echo` "Running E2E tests with docker-compose..."
- docker compose -f docker-compose.test.yml up --abort-on-container-exit --exit-code-from test-runner
- docker compose -f docker-compose.test.yml down -v
+ `@set` -e; \
+ rc=0; \
+ docker compose -f docker-compose.test.yml up --abort-on-container-exit --exit-code-from test-runner || rc=$$?; \
+ docker compose -f docker-compose.test.yml down -v; \
+ exit $$rc📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
| docker compose -f docker-compose.test.yml up --abort-on-container-exit --exit-code-from test-runner | |
| docker compose -f docker-compose.test.yml down -v | |
| `@set` -e; \ | |
| rc=0; \ | |
| docker compose -f docker-compose.test.yml up --abort-on-container-exit --exit-code-from test-runner || rc=$$?; \ | |
| docker compose -f docker-compose.test.yml down -v; \ | |
| exit $$rc |
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
In `@Makefile` around lines 232 - 233, Replace the two separate Makefile command
lines so teardown always runs: run the test-up command (docker compose -f
docker-compose.test.yml up --abort-on-container-exit --exit-code-from
test-runner) in the same shell, capture its exit code, then always run the
teardown (docker compose -f docker-compose.test.yml down -v) and finally exit
with the captured code; i.e., group them so the up command's exit code is saved
(e.g., rc=$$?), teardown runs unconditionally, and the recipe returns the saved
rc.
What
Two mechanical CI infrastructure fixes from the failing-CI audit, after the integration branch was promoted to
mainandci.ymlstarted running on all retargeted PRs.1. Docker Compose v2 (
docker compose)ubuntu-24.04runners dropped the standalonedocker-composev1 binary, so thee2e-testsjob and thedocker-compose-testMakefile target failed withdocker-compose: command not found. Switched the four command invocations to the Compose v2 plugin formdocker compose. Thedocker-compose.test.ymlfilename is unchanged.2. terraform-validate Terraform version
The
terraform-validatejob pinnedsetup-terraformto1.6.0, but everyterraform/environments/*/main.tfdeclaresrequired_version = ">= 1.10.0", soterraform init/validateaborted with "Unsupported Terraform Core version" on all three clouds (aws/gcp/azure). Bumped to1.10.5, matching the pin already used inpre-commit.yml.Verification
ci.ymlparses as valid YAML.terraform init/validateagainstterraform/environments/awsnow passes the version constraint (only the offline sandbox's provider cache fails, which the CI runner downloads normally).Scope note
This PR fixes only the unambiguous mechanical CI failures. Other distinct failures found in the audit (real govulncheck CVEs needing a Go toolchain/dep bump, the golangci-lint v2 config-schema migration, and the integration-test compile errors on
main) require code/dependency decisions and are reported separately, not fixed here.Summary by CodeRabbit
Chores