Repository navigation
fix(chart): alembic hook Job for migrations.autoApply=false (AIFactory#2003) - #1493
Merged
Merged
Conversation
…Factory#2003) Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01L5j1hQCdA4NmA4jiKDNBX4
…AIFactory#2003) Pre-approved by the user for the 2026-10-31 wave. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01L5j1hQCdA4NmA4jiKDNBX4
…ctory#2003) Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01L5j1hQCdA4NmA4jiKDNBX4
…Factory#2003) Pre-approved by the user for the 2026-10-31 wave. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01L5j1hQCdA4NmA4jiKDNBX4
…ctory#2003) Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01L5j1hQCdA4NmA4jiKDNBX4
…Factory#2003) Pre-approved by the user for the 2026-10-31 wave. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01L5j1hQCdA4NmA4jiKDNBX4
…und/AIFactory#2003) Plan steps 1-3, ported by Claude from AIFactory PR #2004. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01L5j1hQCdA4NmA4jiKDNBX4
TFactory coverage54.91% on this PR vs 54.82% on its base ( PASS - Coverage 54.91% (unchanged vs base 54.82%)
|
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
Same fix as olafkfreund/AIFactory#2004 for olafkfreund/AIFactory#2003:
charts/tfactory/values.yamlpromised an alembic-upgrade Job formigrations.autoApply=false(the chart default), but no template created one, so a chart install never migrated.Decision (lead): a Helm
pre-install,pre-upgradehook Job runningalembic upgrade headwith the app image and the sameDATABASE_URLSecret as the web Deployment, rendered only whenautoApply=false.charts/tfactory/templates/job-migrations.yaml(new): hook weight -5, delete policybefore-hook-creation,hook-succeeded,jobImage/jobBackoffLimithonoured, labelstfactory.selectorLabels+component: migrations(inside the NetworkPolicy; the Service also requirescomponent: server, so never an endpoint), no chart ServiceAccount (does not exist at pre-install) and no token mount,/tmpemptyDir for the read-only root FS. Env isDATABASE_URLonly:alembic/env.pyreads nothing else.autoApply=true).tests/helm/test_migrations_job.py: default render has the hook Job,autoApply=truerenders none,jobImageoverride.Artifacts (slug reused from AIFactory):
Coder: Claude ported all steps from AIFactory#2004 (mechanical port; Codex implemented the original there).
Verification:
helm lint charts/tfactorypasses;helm templaterenders one migrations Job by default, none withautoApply=true;pytest tests/helm -m helmpasses locally. The kind install test already setsautoApply=true.Refs olafkfreund/AIFactory#2003
🤖 Generated with Claude Code
https://claude.ai/code/session_01L5j1hQCdA4NmA4jiKDNBX4