Add keyspace storage settings to keyspace settings commands - #1431
Open
inelpandzic wants to merge 1 commit into
Open
inelpandzic wants to merge 1 commit into
inelpandzic wants to merge 1 commit into
Conversation
no-itsbackpack
approved these changes
Sep 18, 2026
| // The API only recreates disks at a new size when shrinking, so | ||
| // the strategy has to be part of the same request. | ||
| if !strategyChanged || flags.diskScalingStrategy != shrinkStrategy { | ||
| return fmt.Errorf("--storage can only be set when --disk-scaling-strategy is %s", shrinkStrategy) |
Contributor
There was a problem hiding this comment.
What if they previously shrank a disk? In that case the API has already stored shrink scaling strategy. Seems like they ought to be able to just update the storage. Would it simplify things if we didn't do this validation in the CLI and just relied on the API.
This branch has not been deployed
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.
Adds the keyspace
storageobject from planetscale/api-bb#22099 topscale keyspace settingsandpscale keyspace update-settings.--disk-scaling-strategy—grow,disable, orshrink--max-storage— max size in bytes disks may autoscale to--storage— size in bytes to recreate disks at; only withshrink, must be a whole GiBOnly the flags that are passed are sent, matching the existing update-settings pattern.
keyspace settingsoutput gainsdisk scaling strategy,storage, andmax storagecolumns:JSON output carries the raw API object:
Handles https://github.com/planetscale/issues/issues/2020