-
Notifications
You must be signed in to change notification settings - Fork 102
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
Propagate build process status #2041
Propagate build process status #2041
Conversation
1dbb753
to
d96b936
Compare
@@ -23,9 +23,10 @@ export function buildScript(argv: { [name: string]: string }, cwd: string) { | |||
fecLogger(LogType.error, err); | |||
process.exit(1); | |||
}); | |||
subprocess.on('exit', (code: string | null, signal: string) => { | |||
subprocess.on('exit', (code: number | null, signal: string) => { |
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 looks more logical and also according to https://nodejs.org/api/child_process.html#event-exit it seems correct
if (code) { | ||
fecLogger(LogType.error, 'Exited with code', code); | ||
process.exit(code); | ||
} else if (signal) { | ||
fecLogger(LogType.error, 'Exited with signal', signal); |
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 think we want to exit here as well.
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.
probably, would you have a recomendation for a code to exit with?
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.
It's a tough one. I think it should be 1 TBH. Build should never receive any signals. A signal means an intentional interrupt of the build. So Error it is.
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.
1 it is ;)
Build process is hiding away the status and doesn't propagate it to `fec build` status code, resulting in hiding away CI errors.
d96b936
to
34128f3
Compare
:soon::shipit::octocat: |
🌱 🌸 🌷 🌻 🌟 New version of package has been released 🌟 🌻 🌷 🌸 🌱 The release is available on: :package:@redhat-cloud-services/frontend-components-config/v/6.1.3📦 :boom:This feature is brought to you by probot🚀 |
Build process is hiding away the status and doesn't propagate it to
fec build
status code, resulting in hiding away CI errors.Fixes #2040