infra: decouple fargate migrations image#2613
Merged
daryllimyt merged 1 commit intomainfrom May 5, 2026
Merged
Conversation
topher-lo
approved these changes
May 5, 2026
|
✅ No security or compliance issues detected. Reviewed everything up to 9cae3d0. Security OverviewDetected Code Changes
|
jordan-umusu
approved these changes
May 5, 2026
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
Decouple the Fargate migrations init container image from the application image. This adds optional
tracecat_migrations_imageandtracecat_migrations_image_tagvariables at the root and ECS module layers, resolves them with fallbacks to the existing backend image settings, and wires the API migrations container to the resolved migration image.The default behavior is unchanged: if the new variables are unset, migrations continue to use
tracecat_image:tracecat_image_tag.Impact
This enables the same app-only rollback pattern used in the Helm chart: keep migrations on a version that understands the current Alembic database revision while rolling the app containers back to an older image tag.
Validation
terraform fmt -check -recursive deployments/fargateterraform -chdir=deployments/fargate validateuv run ruff check deployments/fargategit diff --checkSummary by cubic
Decouple the Fargate migrations init container image from the app image to allow pinning migrations while rolling back app versions. Default behavior is unchanged if new variables are not set.
tracecat_migrations_imageandtracecat_migrations_image_tagat root and ECS module.tracecat_imageandtracecat_image_tagwhen unset.tracecat_migrations_imageandtracecat_migrations_image_tagas outputs.Written for commit 9cae3d0. Summary will update on new commits.