Repository navigation
fix(devnets): release a deleted devnet's name - #65
Merged
Merged
Conversation
A devnet created and deleted from the console kept its name forever: the request was refused with "already exists; journal records are permanent". A name whose registry entry is `deleted` can now be requested again. The new devnet shares nothing with the old one: - Preparation moves the deleted devnet's work directory (plans, host keys, secrets, stage journals) aside to devnets-deleted/, once, and removes its published connection facts. Creation stages resume from files in that directory, so reusing it would have continued the old deployment. - When the confirmed creation starts, the registry entry is replaced, not merged: addresses, promo codes, wallet, versions and readiness of the old devnet do not carry over. A short history of who held the name is kept. - Only a creation requested after the deletion, and prepared, takes the name. The creation that built the deleted devnet can no longer be resumed. - The review says the name, and so the chain name, was used before. Whether the EC2 journal record may be replaced is decided by dash-network-go when it provisions. With a dashnet build that keeps records permanent, the provision step still fails closed. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
|
Warning Review limit reachedYou've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. Next included review available in 45 minutes. View limit details
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. |
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.
Problem
A devnet created and deleted from the console keeps its name forever.
devnet-sakurawas deployed and destroyed, and a new request for that name is refused with "already exists; journal records are permanent, pick a new name".There are two locks on a name. This PR removes the console's. The second is in dash-network-go, whose state table binds a name to its first EC2 plan permanently; that is dashpay/dash-network-go#32, which lets a new plan take over a name only when the old record is
addresses-released(what a finished console delete leaves) and unclaimed, and archives the old record instead of deleting it. Until the agent runs a dashnet build with it, a re-created devnet gets through preparation and then fails at "Provision" with dashnet's own "bound to a different plan" error. Nothing is created in that case.Change
A name whose registry entry is
deletedcan be requested again.deleting,failedand every live status still refuse. The new devnet shares nothing with the old one:ec2-plan.json,bootstrap-plan.json,known_hosts,deployment.json, the pinneddashnet). Preparing a creation for a deleted name first moves that directory toprivate/devnets-deleted/<name>-<time>. It is kept, not removed, and is done once: preparing again does not move the new files.data/devnets/<name>/config.json(hosts and masternode identities for members) is removed at the same time, so the old devnet's connection files are never served for the new one.previouskeeps who created the old one, when it was deleted and its operation ID (last 20).Not changed
deleted.devnets-deleted/; nothing prunes them.Testing
Run locally on Windows (Node 22):
node --test: 183 tests, 167 passed, 11 skipped, 5 failed. The same 5 fail on unmodifiedmasteron that machine (181 tests, 165 passed). 2 tests added, 1 extended: validation per status; a full prepare and start of a creation on a deleted name against a fake dashnet (old files kept aside and not reused, facts removed, registry replaced, old operation refused, repeat prepare and resume); the form's list.eslint .clean,vite buildsucceeds.🤖 Generated with Claude Code