Skip to content

fix(ci): docker compose v2 + bump terraform-validate to 1.10.5 - #1136

Merged
cristim merged 1 commit into
mainfrom
fix/ci-failures-audit
Jun 9, 2026
Merged

fix(ci): docker compose v2 + bump terraform-validate to 1.10.5#1136
cristim merged 1 commit into
mainfrom
fix/ci-failures-audit

Conversation

@cristim

@cristim cristim commented Jun 9, 2026

Copy link
Copy Markdown
Member

What

Two mechanical CI infrastructure fixes from the failing-CI audit, after the integration branch was promoted to main and ci.yml started running on all retargeted PRs.

1. Docker Compose v2 (docker compose)

ubuntu-24.04 runners dropped the standalone docker-compose v1 binary, so the e2e-tests job and the docker-compose-test Makefile target failed with docker-compose: command not found. Switched the four command invocations to the Compose v2 plugin form docker compose. The docker-compose.test.yml filename is unchanged.

2. terraform-validate Terraform version

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" on all three clouds (aws/gcp/azure). Bumped to 1.10.5, matching the pin already used in pre-commit.yml.

Verification

  • ci.yml parses as valid YAML.
  • terraform init/validate against terraform/environments/aws now 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

  • Updated Terraform to version 1.10.5 for infrastructure validation
  • Modernized Docker Compose CLI syntax in CI/CD pipeline and build tooling

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).
@cristim cristim added triaged Item has been triaged priority/p1 Next up; this sprint severity/high Significant harm type/bug Defect labels Jun 9, 2026
@coderabbitai

coderabbitai Bot commented Jun 9, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

📝 Walkthrough

Walkthrough

This 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 docker-compose CLI to the modern docker compose syntax across the CI workflow and Makefile, preserving all existing flags and exit-code propagation.

Changes

Infrastructure Tooling Updates

Layer / File(s) Summary
Terraform version upgrade
.github/workflows/ci.yml
The terraform-validate job's setup step pins Terraform to version 1.10.5 instead of 1.6.0.
Docker Compose CLI migration
.github/workflows/ci.yml, Makefile
Docker Compose commands in the e2e-tests workflow job and the docker-compose-test Makefile target are updated from docker-compose (hyphenated) to docker compose (space-separated), preserving all flags, test-runner exit-code propagation, and volume cleanup behavior.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~3 minutes

Suggested labels

urgency/now, impact/internal, effort/xs

Poem

A rabbit hops through versioned lands,
Where Terraform and Docker commands stand,
From hyphen'd past to modern ways,
The infrastructure brighter shines these days! 🐰

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The PR title accurately reflects the two main changes: upgrading Docker Compose to v2 syntax and bumping Terraform to version 1.10.5, which directly match the file changes in ci.yml and Makefile.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix/ci-failures-audit

Comment @coderabbitai help to get the list of available commands and usage tips.

@cristim

cristim commented Jun 9, 2026

Copy link
Copy Markdown
Member Author

@coderabbitai review

@coderabbitai

coderabbitai Bot commented Jun 9, 2026

Copy link
Copy Markdown
Contributor
✅ Action performed

Review finished.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

📥 Commits

Reviewing files that changed from the base of the PR and between 03c9a2b and a52a98b.

📒 Files selected for processing (2)
  • .github/workflows/ci.yml
  • Makefile

Comment thread Makefile
Comment on lines +232 to +233
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

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟡 Minor | ⚡ Quick win

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.

Suggested change
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.

@cristim
cristim merged commit 6b781c6 into main Jun 9, 2026
10 of 15 checks passed
@cristim
cristim deleted the fix/ci-failures-audit branch July 27, 2026 11:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

priority/p1 Next up; this sprint severity/high Significant harm triaged Item has been triaged type/bug Defect

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant