fix: add missing CLI options for non-interactive create commands#53
Open
JoshSalway wants to merge 1 commit intolaravel:mainfrom
Open
fix: add missing CLI options for non-interactive create commands#53JoshSalway wants to merge 1 commit intolaravel:mainfrom
JoshSalway wants to merge 1 commit intolaravel:mainfrom
Conversation
Adds CLI options and nonInteractively() fallbacks to InstanceCreate, WebsocketClusterCreate, and WebsocketApplicationCreate so they can be used in scripts and CI pipelines without interactive prompts. Closes laravel#47 Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This comment was marked as spam.
This comment was marked as spam.
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.
Summary
Closes #47
This PR adds the missing CLI options and
nonInteractively()fallbacks to three create commands so they can be used in scripts and CI pipelines without interactive prompts.This PR requires design decisions from maintainers — see questions below.
Changes
instance:create— 4 new options added--scaling-type=customcustomthe right default? Interactively, the confirm prompt defaults totrue(autoscaling enabled =custom). Should the non-interactive default match, or should it benone?--scaling-cpu-threshold-percentage=50--scaling-memory-threshold-percentage=50--uses-scheduler=falseAlso added
nonInteractively()fallbacks to existing fields that were missing them:size— no default (remains required via--size)min_replicas— defaults to1max_replicas— defaults tomin_replicasvaluescaling_type— defaults tocustomwebsocket-cluster:create— 1 new option added--max-connections=100WebsocketServerMaxConnection::ONE_HUNDRED. Is 100 the right default for non-interactive use?Also added
nonInteractively()fallback toregion(falls back to the--regionvalue or$defaults['region']).websocket-application:create— 3 new options added--allowed-origins=null(none)--ping-interval=60--activity-timeout=30Also updated allowed origins parsing in
CreatesWebSocketApplicationto support comma-separated input (in addition to newline-separated from the interactive textarea).Questions for maintainers
instance:create --scaling-type: iscustom(autoscaling enabled) the correct non-interactive default?websocket-cluster:create --max-connections: is100the correct non-interactive default?websocket-application:create --allowed-origins: should the default benull(no restriction), or should origins be required in non-interactive mode?Test plan
phpstan analysepasses with no errorscloud instance:create <env-id> --name=test --size=compute-optimized-256 --no-interactioncloud websocket-cluster:create --name=test --region=us-east-1 --max-connections=100 --no-interactioncloud websocket-application:create <cluster-id> --name=test --no-interaction🤖 Generated with Claude Code