fix: use sync waves to run migrations before app rollout#677
Merged
Mukil Loganathan (langchain-infra) merged 1 commit intoApr 17, 2026
Merged
Conversation
DB migrations currently run as PostSync hooks, meaning application code rolls out before migrations complete. This switches to sync-wave ordering so that databases are healthy (wave -2) and migrations finish (wave -1) before deployments roll out (wave 0). For Helm, migrations change from post-upgrade to pre-upgrade so they run before new code on upgrades, while keeping post-install for first installs when databases aren't yet available. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Mukil Loganathan (langchain-infra)
requested a review
from a team
as a code owner
April 15, 2026 18:38
ericdong-langchain
approved these changes
Apr 15, 2026
Mukil Loganathan (langchain-infra)
merged commit Apr 17, 2026
c7ff8ae
into
v14-stable
3 checks passed
Mukil Loganathan (langchain-infra)
deleted the
mukil/sync-waves-migration-ordering
branch
April 17, 2026 15:45
4 tasks
Mukil Loganathan (langchain-infra)
added a commit
that referenced
this pull request
Apr 20, 2026
DB migrations currently run as PostSync hooks, meaning application code rolls out before migrations complete. This switches to sync-wave ordering so that databases are healthy (wave -2) and migrations finish (wave -1) before deployments roll out (wave 0). For Helm, migrations change from post-upgrade to pre-upgrade so they run before new code on upgrades, while keeping post-install for first installs when databases aren't yet available. Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2 tasks
Mukil Loganathan (langchain-infra)
added a commit
that referenced
this pull request
Apr 20, 2026
* added .Values.commonEnv to hostBackend * fix: use sync waves to run migrations before app rollout (#677) DB migrations currently run as PostSync hooks, meaning application code rolls out before migrations complete. This switches to sync-wave ordering so that databases are healthy (wave -2) and migrations finish (wave -1) before deployments roll out (wave 0). For Helm, migrations change from post-upgrade to pre-upgrade so they run before new code on upgrades, while keeping post-install for first installs when databases aren't yet available. Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com> * chore: remove feedback migration jobs and configurations (#682) The feedback-data-migration and feedback-config-migration Jobs ran one-shot scripts (migrate-feedback-to-postgres.pyc, migrate-feedback-config.pyc) that are no longer shipped in the backend image. Both were disabled by default. Removes the templates and all values.yaml/ci fixture/README references. * chore: bump appVersion and image tags to 0.14.3 (#684) * chore: bump appVersion and image tags to 0.14.2 * chore: bump appVersion and image tags to 0.14.3 Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com> * fix: restore frontend.enabled default lost in rebase The v14-stable branch did not have frontend.enabled, but main added it as true. Rebase took v14-stable's file wholesale, dropping the default. New validate.yaml requires it when ingress is enabled. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com> --------- Co-authored-by: Joaquin Borggio <joaquin@langchain.dev> Co-authored-by: Claude Opus 4.6 (1M context) <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.
Summary
sync-wave: "-2"to all database resources (postgres, clickhouse, redis — StatefulSets, Services, Secrets, ServiceAccounts, PDBs, ConfigMaps) so they're healthy firstSynchooks atsync-wave: "-1"(Argo CD) andpost-install, pre-upgrade(Helm) so they run after DBs are up but before DeploymentsArgo CD sync order
Helm behavior
post-install— DBs are already deployed, migrations run afterpre-upgrade— migrations run before new app code rolls outTest plan
helm templaterenders without errors🤖 Generated with Claude Code