-
Notifications
You must be signed in to change notification settings - Fork 10
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
return non-zero error code when function run sees error #401
Conversation
I think we stopped auto-updating in this PR, which was released in the 3.65.0 version on August 2. I wonder if that's enough time that it would be okay to ship this PR as the default behaviour. @nickwesselman Do you have an opinion on this? |
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.
Could we make a case for a breaking change for older versions of the Shopify CLI here? I would imagine we would want older versions of the CLI to error out in these cases. But if not, this seems fine.
src/main.rs
Outdated
|
||
/// Return a non-zero exit code when a module error occurs during the function run. | ||
#[clap(short = 'n', long)] | ||
non_zero_exit_code_for_module_errors: bool, |
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.
This seems like a pretty long flag name to me. Unfortunately I don't have a constructive suggestion for something more succinct.
I think it could be fair to make a case on that. It would make the changes here much nicer. I'll wait to see if Nick has an opinion there. |
fcde9f1
to
a59c72b
Compare
… on success results The exit code function does not return valid JSON which means it will fail with a non-zero exit code. Instead, use a new noop test fixture that does return valid JSON for tests that expect a successful result.
a59c72b
to
41d5220
Compare
I got confirmation from Nick that we can release this with a changelog without needing a command line option. I'll release a new 7.0 version once this ships. As a side effect of removing the option, some integration tests started failing because the test fixture produced an invalid result. Thats been fixed by this commit. |
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.
🥇
We want to support returning a non-zero error code anytime a module sees an error during a run.
Heres an example output: