fix(ci): allow deploying an arbitrary commit (rollback was broken) - #36
Merged
Conversation
Rolling back is documented as re-running the deploy against the previous commit, and that did not work. actions/checkout defaults to a shallow fetch and resolves ref as a branch or tag glob, so a raw SHA fails: git fetch --depth=1 origin +refs/heads/<sha>*:... +refs/tags/<sha>*:... The process '/usr/bin/git' failed with exit code 1 fetch-depth: 0 fetches full history so a commit can be checked out. Found by actually running the rollback rather than trusting it. The run failed at checkout, long before the release step, so production was never touched — the same ordering that protected it when the image build failed.
Contributor
Deploying hookdrop with
|
| Latest commit: |
c45b4a4
|
| Status: | ✅ Deploy successful! |
| Preview URL: | https://fcabc615.hookdrop.pages.dev |
| Branch Preview URL: | https://fix-deploy-checkout-sha.hookdrop.pages.dev |
Contributor
Deploying hookdrop-frontend with
|
| Latest commit: |
c45b4a4
|
| Status: | ✅ Deploy successful! |
| Preview URL: | https://550be1a7.hookdrop-frontend.pages.dev |
| Branch Preview URL: | https://fix-deploy-checkout-sha.hookdrop-frontend.pages.dev |
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.
Found by running the rollback drill instead of assuming it worked.
Rolling back is documented as re-running Deploy against the previous commit. That failed:
actions/checkoutdefaults to a shallow fetch and resolvesrefas a branch/tag glob, so a raw SHA cannot be fetched.fetch-depth: 0fixes it. The recovery path would have failed during an actual incident, which is the worst possible time to discover it.Production was never touched — the run died at checkout, long before the release step, same as when the image build failed earlier.