-
Notifications
You must be signed in to change notification settings - Fork 313
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
Diff fails if stack Ignore parameter set to True #1462
Comments
The Sceptre docs says.. @goopilot I think we can agree that Sceptre should not throw an exception in this case. Do you expect ignore to support the |
@zaro0508 Thanks for the quick response. Yes I expect that any command run on a stack with any valid configuration should not throw an exception. My use case is a pipeline which is running I did quick workaround for myself (#1463) but now as you mentioned that |
Any chance you are still planning on sending in a PR @goopilot ? |
The chance is around 0% I'm more of a user of the sceptre than a developer. But I'd appreciate if somebody can take this over. |
Subject of the issue
When running "sceptre diff" on a stack with
ignore
set toTrue
, getting an error message "ValueError: max() arg is an empty sequence"Your environment
$ sceptre --version
Sceptre, version 4.4.2
$ python --version
Python 3.8.10
OS: Windows
Steps to reproduce
Set ignore to Trues for any sceptre project:
Expected behaviour
Stack should be ignored with corresponding message
Actual behaviour
$ sceptre --var-file vars.yaml --var runlocal=true diff XXXX/YYYYY
Traceback (most recent call last):
File "c:\users\asalamatov\appdata\local\programs\python\python38\lib\runpy.py", line 194, in _run_module_as_main
return _run_code(code, main_globals, None,
File "c:\users\asalamatov\appdata\local\programs\python\python38\lib\runpy.py", line 87, in run_code
exec(code, run_globals)
File "C:\Users\asalamatov\AppData\Local\Programs\Python\Python38\Scripts\sceptre.exe_main.py", line 7, in
File "c:\users\asalamatov\appdata\local\programs\python\python38\lib\site-packages\click\core.py", line 1157, in call
return self.main(*args, **kwargs)
File "c:\users\asalamatov\appdata\local\programs\python\python38\lib\site-packages\click\core.py", line 1078, in main
rv = self.invoke(ctx)
File "c:\users\asalamatov\appdata\local\programs\python\python38\lib\site-packages\click\core.py", line 1688, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File "c:\users\asalamatov\appdata\local\programs\python\python38\lib\site-packages\click\decorators.py", line 33, in new_func
return f(get_current_context(), *args, **kwargs)
File "c:\users\asalamatov\appdata\local\programs\python\python38\lib\site-packages\sceptre\cli\helpers.py", line 46, in decorated
return func(*args, **kwargs)
File "c:\users\asalamatov\appdata\local\programs\python\python38\lib\site-packages\sceptre\cli\diff.py", line 142 File "c:\users\asalamatov\appdata\local\programs\python\python38\lib\site-packages\click\decorators.py", line 33, in new_func
return f(get_current_context(), *args, **kwargs)
File "c:\users\asalamatov\appdata\local\programs\python\python38\lib\site-packages\sceptre\cli\helpers.py", line 46, in decorated
return func(*args, **kwargs)
File "c:\users\asalamatov\appdata\local\programs\python\python38\lib\site-packages\sceptre\cli\diff.py", line 142, in diff_command
num_stacks_with_diff = output_diffs(
File "c:\users\asalamatov\appdata\local\programs\python\python38\lib\site-packages\sceptre\cli\diff.py", line 176, in output_diffs
output_buffer_with_normalized_bar_lengths(line_buffer, output_buffer)
File "c:\users\asalamatov\appdata\local\programs\python\python38\lib\site-packages\sceptre\cli\diff.py", line 190, in output_buffer_with_normalized_bar_lengths
max_length = len(max(buffer, key=len))
ValueError: max() arg is an empty sequence
The text was updated successfully, but these errors were encountered: