Repository navigation
Pulled backups, managed snapshots, recipes and podman - #160
Merged
Merged
Conversation
# Conflicts: # USAGE.md
# Conflicts: # internal/cli/stack.go
# Conflicts: # internal/cli/stack.go
|
Caution Review failedThe pull request is closed. Finishing Touches
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. Comment |
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.
Wave 5 of the backlog: pulled backups, managed database snapshots, recipes and podman.
stack backup --pullcopies the files that backup run made to~/.baryovm/backups/<stack>/(dir 0700, files 0600, temp file and rename). A.partialfile, an unsafe name or a hand-edited stack name is refused. Refused on a forced-command VM and with--dry-run.stack set-managednames the RDS or Azure Postgres database beside a stack.stack releasesnapshots it with the operator's signed-inawsorazand waits, before the VM backup and before anything changes.--no-backupskips it,--dry-runlists the calls,doctorchecks each CLI is installed and signed in. Values are checked and run as an argv, no shell. CLAUDE.md now namesinternal/managedas the one place that shells out to a cloud CLI.stack add --recipeandstack release --recipe/--input. A recipe release writes the compose file as.new, pulls, keeps.prev, promotes, then brings each service up with a health probe and rolls back on failure. It takes the managed snapshot and the VM backup first, holds the host lock, and writes.envinputs only after a successful pull. Input references come only from--input; recipe defaults are literals.--runtime podmanonstack add,stack discover,deploy,upandvm bootstrap, and an optionalruntimein remote.json. It reaches compose, backup, deploy, manifest and recipe releases, and discover. Bootstrap detects apt-get, dnf, yum, apk and pacman, and skips the systemd steps on a host without systemd.Proof:
go test ./...passes and the nine gates pass (gofmt, build, vet, gen-docs, style-scan, golangci-lint, gosec, govulncheck, race suite). Adversarial review: 23 candidates, 17 confirmed and fixed, 6 refuted. The blocker was a recipe release skipping the managed snapshot. Other fixes: recipe releases ran docker on a podman stack, took no host lock, and wrote.envbefore the pull; a hand-edited stack name..pointed the pull dir at~/.baryovm; input defaults skipped value checks; the project file did not validate runtime or managed. Each fix has a test that fails with its line reverted.Known limits:
config --format json,ps --format json,pull --ignore-pull-failuresandcompose ls; docker-compose v2 as the provider is the tested shape. TLS and caddy, health, patch, prune, scan and the docker version line in doctor andvm pingstay on docker.--dry-run,--resume,--clear,--no-buildand--adopt, and keeps no step record (a failed deploy rolls itself back). Files, routes and builds are not part of a recipe release yet.--pullholds each file in memory while copying and never prunes old pulled files.vm pingandstack psdo not show the managed database.Closes #39
Closes #81
Closes #88
Closes #35