Repository navigation
Compile the release without the key and build the image on pull requests - #501
Merged
Merged
Conversation
Ecto dumps a field's default at compile time to validate it. For the encrypted attachments of timeline posts and mentions that encrypts, which needs CONFIG_ENCRYPTION_KEY, and a release reads the key only at runtime, so `mix compile` in the Docker build failed. Skip the default validation, as DeploymentTarget already does for its encrypted config. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The image job ran only on main, so a broken Docker build surfaced only after the merge. Pull requests now build the image too, without logging in, pushing or writing the layer cache; main still pushes it and is the only one to write the cache, so pull requests do not evict it. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Merges in quick succession started image builds in parallel, so an older build could finish last and push :latest over a newer image, which Watchtower would then deploy. A concurrency group per ref queues them; a newer build replaces a waiting older one. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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.
Why
After #500 the
imagejob on main gets pastdeps.compileand fails atmix compile: Ecto dumps a field's default at compile time, and for the encryptedattachmentsofTimelinePostandMention(from #499) that encrypts, which needsCONFIG_ENCRYPTION_KEY. A release reads the key only at runtime. Both fields now skip the default validation, asDeploymentTargetalready does.Both breakages passed every PR check because only main built the image. Pull requests now build it too, without logging in, pushing or writing the layer cache; main pushes it and is the only one to write the cache, so pull requests do not evict it.
The image job also gets a concurrency group per ref: merges in quick succession built in parallel, so an older build could push
:latestover a newer one.How tested
env -u CONFIG_ENCRYPTION_KEY MIX_ENV=prod mix compilefailed with the error from main before the fix and passes after it;mix assets.deployandmix releasepass without the key toomix compile --warnings-as-errors,mix format --check-formatted,mix credo --strict,mix deps.unlock --check-unused,mix test: all passci.ymlimagecheck of this PR builds the image with both changesRisk
Low. Struct defaults stay
[]. Pull requests take a few minutes longer for the image build; main's job is unchanged apart from the gating.🤖 Generated with Claude Code