-
-
Notifications
You must be signed in to change notification settings - Fork 4.2k
Add stack option for CLI start command #12675
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Conversation
Test Results - Preflight, Unit21 579 tests ±0 19 927 ✅ ±0 6m 55s ⏱️ +39s Results for commit 931f2af. ± Comparison against base commit a298730b. ♻️ This comment has been updated with latest results. |
@click.option( | ||
"--stack", | ||
"-s", | ||
type=str, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'd use click.Choice here to enforce only snowflake
can be used here
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah, nice one! Today I learned. Added in 714e323.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reverted the choice in 931f2af to make it more flexible to add versions next to the image.
localstack start -s snowflake
localstack start -s snowflake:0.3
Happy to go back to restricting this only to image name as a first iteration.
Test Results (amd64) - Acceptance7 tests ±0 5 ✅ ±0 3m 15s ⏱️ +9s Results for commit 931f2af. ± Comparison against base commit a298730b. ♻️ This comment has been updated with latest results. |
Test Results - Alternative Providers597 tests 420 ✅ 15m 56s ⏱️ Results for commit 931f2af. ♻️ This comment has been updated with latest results. |
LocalStack Community integration with Pro 2 files ±0 2 suites ±0 1h 42m 30s ⏱️ - 2m 23s Results for commit 931f2af. ± Comparison against base commit a298730b. ♻️ This comment has been updated with latest results. |
Test Results (amd64) - Integration, Bootstrap 5 files 5 suites 2h 22m 44s ⏱️ Results for commit 931f2af. ♻️ This comment has been updated with latest results. |
Added opportunistically 4.5 as the milestone, but open to moving to 4.6 or Playground if this can't make it in time. Thanks @anisaoshafi for the nudge to add a milestone! 😃 |
Most of this was inspired by #12529, #12674, and the linked discussion in the PR description! Hat tip to @silv-io, @eruditmorina, @hovaesco, and @SimonWallner for sparking the discussion. ❤️ Looking for a code review since both code owners are OOO! Happy to make any changes or close the PR. |
Motivation
Following up from a relevant discussion, this is an attempt to add a CLI option for selecting a stack (image, emulator).
Currently, the command to start LocalStack for Snowflake is quite verbose by using the IMAGE_NAME environment variable.
Changes
This will add --stack and -s as a shorthand for selecting the image and optional a version.
Heads-up: We are experimenting with the Stacks terminology also in the Console, see https://github.com/localstack/localstack-web/pull/1787.