Skip to content

feat(chart): run Hasura migrations on helm upgrade behind a flag - #357

Open
mosoriob wants to merge 3 commits into
developfrom
feat/hasura-migrate-on-upgrade
Open

mosoriob wants to merge 3 commits into
developfrom
feat/hasura-migrate-on-upgrade

Conversation

@mosoriob

Copy link
Copy Markdown
Contributor

Closes #348. Part of the map #342.

Change

  • jobs.hasura.run_on_upgrade (default false) adds post-upgrade to the Hasura job. Seeds run on install only.
  • A new init container, check-transactions, fails the job if a transaction is older than 60 s. It does not end the session.
  • backoffLimit: 0, activeDeadlineSeconds: 900, hook delete policy before-hook-creation,hook-succeeded.
  • The job is now <prefix>-hasura-migrate, and it honors jobs.hasura.enabled.

TACC does not change: it takes the false default.

Test on the dev cluster (OrbStack)

Step Result
Fresh install 67 migrations, metadata, seeds. 100 s.
Upgrade with one test migration 68 migrations, new table tracked, no seeds.
Same upgrade again nothing to apply on database
Idle transaction older than 60 s The guard fails the job. UPGRADE FAILED.
Upgrade after the failure The failed job is deleted. The new job succeeds.

Note: run helm upgrade with --timeout 20m. A failed --wait skips the hook.

Maximiliano Osorio added 2 commits October 25, 2026 21:50
jobs.hasura.run_on_upgrade adds post-upgrade to the Hasura job. The
default is false. Seeds run on install only, because they are not
idempotent.

A new init container, check-transactions, fails the job before the
migration if a transaction is older than
jobs.hasura.guard.max_transaction_age_seconds (60). The job has
backoffLimit 0 and activeDeadlineSeconds 900, and the hook delete
policy now includes before-hook-creation, so a failed job does not
block the next run.

The job is renamed to <prefix>-hasura-migrate, and it now honors
jobs.hasura.enabled.
@vercel

vercel Bot commented Oct 26, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
monorepo Ready Ready Preview Oct 26, 2026 12:56am UTC

This branch was successfully deployed

1 active deployment
Preview — 69d50ec1 Deployed Oct 26, 2026 by vercel[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Change the chart and test the upgrade on the dev cluster

1 participant