Skip to content
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

When a non-existent Stack is Launched, the List of Valid Stack Paths is not useful in a Large Workspace #1268

Open
X-Guardian opened this issue Nov 28, 2022 · 1 comment · May be fixed by #1270

Comments

@X-Guardian
Copy link
Contributor

Subject of the issue

If a non-existent stack is launched, Sceptre tries to be helpful in its error message by outputting a list of valid stack paths. In a large workspace (we have nearly 5000 stacks), this is not useful.

Your environment

  • version of sceptre 3.2.0
  • version of python 3.8.8
  • which OS/distro: Windows 10

Steps to reproduce

Run a sceptre command (launch, generate etc) on a stack name that doesn't exist. i.e. sceptre launch dev/foo2.yaml

Expected behaviour

Annotate the error message with the valid stack paths only when there are a limited number of stacks in the workspace (<10?)

Actual behaviour

The following error is produced, listing all stack paths in the workspace.

"No stacks detected from the given path dev/foo2.yaml. Valid stack paths are: ['dev/foo.yaml', 'dev/bar.yaml']"

Solution

I am happy to raise a PR to improve this error handling.

@jfalkenstein
Copy link
Contributor

That's a great call-out. I think a maximum number is probably appropriate, since I know there are some folks running 500, 1000 stack setups.

With that said, I think added functionality ought to be that if you've specified "dev/foo2.yaml", if "dev/" actually does exist, perhaps we would only show the valid stacks that start with "dev/" and only limit those if they're > than the max.

I think a PR for this would be good.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
2 participants