Take main off Vercel's git trigger - #10
Merged
Merged
Conversation
The release workflow applies migrations and only then deploys, but until now Vercel also deployed main off the same push with nothing ordering the two. The first release showed it concretely: two production deployments of b195da1, eighteen seconds apart. Harmless there because nothing was pending, a real race for any release carrying a migration - issue #6 made intermittent rather than fixed. Held back from #9 on purpose. Whether the CLI deploy still works with the git trigger disabled takes a real production deploy to find out, and keeping the git deploy as a fallback meant a broken deploy step could not strand the project. That release has since deployed successfully, so the remaining unknown is narrow: this change carries no migration, so if the deploy step fails, nothing is half-applied and reverting this file restores the git trigger. Also drops the interim wording it invalidates - three passages in the README and two comments in the workflow described a state that no longer exists once this lands. Refs #6
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
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.
The follow-up promised in #9. Refs #6.
Why this was held back
#9 moved migrations into
release.yml, which applies them and only then deploys. But Vercel was still deployingmainoff the same push, with nothing ordering the two. The first release made that concrete rather than theoretical — three GitHub deployment records forb195da1:vercel[bot]7174Andy7174Andyenvironment: production)Two production deployments of the same commit, eighteen seconds apart. Harmless there because that release had nothing pending — but for any release carrying a migration it is a race, which is issue #6 made intermittent rather than fixed.
vercel.jsoncloses it by disabling Vercel's git trigger formain, leavingrelease.ymlas the only path git can trigger.Why it was not in #9
Whether
npx vercel deploy --prodstill works oncegit.deploymentEnabledisfalsetakes a real production deploy to find out. Landing it with #9 meant that if the answer were no, migrations would already be applied, the deploy step would fail, and there would be no remaining way to ship anything — including an unrelated hotfix.#9's release has since deployed successfully to
https://gitcron.vercel.app, so the CLI path itself is proven. The narrow remaining unknown is whether it still works with the git trigger off, and this PR is deliberately the safest possible way to test that: it carries no migration, so a failing deploy step leaves nothing half-applied, and reverting this one file restores the git trigger immediately.What else changed
Landing
vercel.jsonmakes the interim wording false, so it goes in the same commit — three passages inREADME.mdand two comments inrelease.ymlthat described a state which no longer exists. Stale documentation has been the recurring defect in this work: two separate reviews caught README passages contradicting the code, so leaving these for later was not an option.The replacement text says what the file now does, that deleting it silently reopens the race with no check to catch it, and names the cost honestly — with no git-triggered fallback, a broken deploy step means no way to ship until it is fixed or this file is reverted.
The release will run as usual: CI on
main, thenMigrate then deploy. ExpectNo pending migrations to apply.again, then the deploy.The thing to check is the deploy step, and the deployment count. Vercel should now produce exactly one production deployment for the merge commit, created by the workflow rather than
vercel[bot]:Two entries with a
vercel[bot]among them would meanvercel.jsondid not take effect on this push and the race is still open.If the deploy step fails, the diagnosis is almost certainly that the CLI cannot deploy with the git trigger disabled. Revert this PR to restore the git trigger, then switch the deploy step to a Deploy Hook —
release.ymldocuments that fallback, with the tradeoff that a hook only starts a build, so the step passes as soon as the request is accepted and a failed build no longer fails the release.Nothing is at risk in the database either way: this PR touches no schema, and
migrate deployis a no-op for it.🤖 Generated with Claude Code