Repository navigation
feat(apps): reclaim a deleted app ID from bl apps create - #49
Draft
nandiheath wants to merge 1 commit into
Draft
nandiheath wants to merge 1 commit into
nandiheath wants to merge 1 commit into
Conversation
bl apps create stopped at reserve for a deleted app's ID, and bl apps initialize refused it client-side, so a deleted static site could not be re-created, e.g. as fetch-js with MySQL, under the same URL. When reserve fails and the app turns out to be deleted (newer servers answer app_deleted, older ones app_id_collision), create now reclaims it through initialize, even for a static plan, and reports reclaimed: true. --private is applied after the reclaim because a deleted app has no live route to change. initialize keeps refusing deleted apps and points to create.
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
After
bl apps delete, there was no way to create the same app ID again throughbl:bl apps createstopped at reserve withapp_id_collision.bl apps initializerefused any app withdeleted_aton the client side.So a deleted
staticsite could not be re-created, for example asfetch-jswith MySQL, under the same URL. People created-v2IDs instead.The control plane already reclaims a deleted app ID through initialize, as a fresh lifecycle. squareup/blockplat-compose#667 makes plan and reserve lead clients to that path.
Changes
bl apps create: when reserve fails withapp_deleted(newer servers) orapp_id_collision(older servers), create already inspects the app. If the app is deleted, create now reclaims it through initialize with the planned runtime profile and persistence, and the output reportsreclaimed: true.app_deleted. The error says to wait a few minutes and retry the same command.--privateon a reclaim: visibility is applied after initialize, because a deleted app has no live route to change and the reclaimed route publishes no version. If that step fails, the recovery message points tobl apps visibility <id> privateonly. Retryingcreatecannot resume a reclaimed app.bl apps initialize: still refuses deleted apps. The message now points tobl apps create.README.mdexplain how to reuse a deleted app's ID. Sharing, publishers, versions and data are not carried over.Verification
app_deleted.app_id_collisionwith a no-initialize plan.--privateordering on reclaim.just check(fmt, clippy-D warnings, all tests) passes.Rollout
The full flow (re-creating a deleted static site as fetch-js+mysql) needs squareup/blockplat-compose#667 deployed: older servers still reject that plan with
mysql_profile_unsupported. With an older server, same-profile reclaims already work through theapp_id_collisionfallback.