Split the AMI bake out of remote bootstrap - #142
Merged
Conversation
Bake's next step is spinloop remote deploy, which needs the AMI, so the common path should block until it is available; --no-wait keeps the bake-and-seed-in-parallel option.
bootstrap now stops at the control plane (install, cdk bootstrap, deploy:image, deploy) and signposts the next step; the bake moves to a first-class `spinloop remote bake [runner...]` command that waits for the AMI(s) by default and offers --no-wait to run bakes in parallel with a weight seed. The --runners, --wait and --force-bake flags go with the bake loop, along with the dead cdk.json context.runners write. The shared machinery (the step seams, source resolution, waitForBake, the package-manager preflight) is renamed and factored so both commands use it, and the BakedRunners poll that bootstrap --wait once used is bake's own wait.
The bare-group usage was a hand-rolled list of subcommand names, and it had drifted: `spinloop remote` did not name `bake`. The group parents (fleet, remote, seed) now do nothing themselves: bare, they show the help cobra generates from the tree, and a word that is not a subcommand is cobra's own unknown-command error. The help sentinel has to be pflag's, not the stdlib one — cobra's ExecuteC checks pflag.ErrHelp (cobra imports pflag as its flag package), and the stdlib twin surfaces as a bare "flag: help requested" error. The docs follow: the README's remote line gains bake, and docs/commands/remote.md notes that bootstrap and bake take no Spinloop and that deploy — not bootstrap — registers an environment.
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.
Split the AMI bake out of
spinloop remote bootstrapinto its ownspinloop remote bakecommand (issue #139).Summary
spinloop remote bake [runner...]command: starts an AMI bake for each named runner (default: bothllamacppandvllm) and waits until the AMI(s) are available, so it returns at the pointspinloop remote deploycan go;--no-waitreturns once the bakes are queued, for running them in parallel with a weight seed. It reuses bootstrap's version-matched source download, package-manager preflight, and--ref/--dir/--region/--package-managerflagsspinloop remote bootstrapno longer starts any bake — the--runners,--wait, and--force-bakeflags are removed, and the sequence is just install →cdk bootstrap→deploy:image→deployspinloop remote bakeas the next step, ahead ofspinloop remote deployspinloop remote/fleet/remote seed) was a hand-rolled subcommand list that had already drifted (it did not namebake); the group parents now show the help cobra generates from the tree, and a mistyped subcommand is cobra's own unknown-command errorendpoint-provisioning(new bake requirement, bootstrap requirements trimmed of the bake) andremote-endpoint(command group gainsbake)Implementation details
pnpm bakerecipe: bootstrap's sources sit in a ref-keyed cache under the user config dir, pruned after success, so there is no stable path to signpost--no-waitprints how to check on the buildsspinloop remote bootstrapwhen the control plane is absent — thepnpm bakescript's own error tells the user to runpnpm deploy:imageby handcdk.jsoncontext.runnerswrite goes with--runners: the CDK reads no such key, and the image stack always creates both runners' pipelineswaitForBake, the package-manager preflight) is renamed and factored intoremote_sources.goso both commands use itErrHelp, not the stdlib one: cobra'sExecuteCchecks pflag's, and the stdlib twin surfaces as a bare "flag: help requested" error