Repository navigation
Record the bake server type; validate returns it with the rates - #291
Merged
Merged
Conversation
The bake stores the build box server type on the snapshot.
POST /api/v1/deploy/validate returns quick_deploy {server_type, rates}: the
type of the snapshot a clone of the stack uses, and every type daily rate
and monthly cap, so the price shown matches the type deployed.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_012TKZy6f5shPzM9WLdswH6f
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.
A Quick Deploy clones a baked snapshot, and the snapshot carries the disk of the server type it was baked on. Until now that type was not recorded, so a clone could be offered and priced as a smaller type.
baked_snapshots.server_type TEXT NULL(older snapshots stay NULL).POST /api/v1/deploy/validatereturnsquick_deploy { server_type, rates }: the type of the snapshot a clone would use (exact version when the stacker.yml pins one, else the latest) and the daily rate / monthly cap of every server type fromserver_type_daily_rate. Without a pool (unit tests) it returns null and no rates.Tests:
tests/quick_deploy_server_type.rs(red first). Full nextest 2874 passed / 0 failed / 36 skipped; BDD 334/334.cargo clippy -D warningsalready fails on dev with the current toolchain (build.rs, td-audit, others); none in the files changed here.After deploy, snapshots baked before this need their type set by hand, e.g.
UPDATE baked_snapshots SET server_type = 'cpx42' WHERE id = <id>;🤖 Generated with Claude Code
https://claude.ai/code/session_012TKZy6f5shPzM9WLdswH6f