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

Propagate build process status #2041

Merged
merged 1 commit into from
Jul 23, 2024

Conversation

ezr-ondrej
Copy link
Member

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

@ezr-ondrej ezr-ondrej force-pushed the propagate_exit_code branch from 1dbb753 to d96b936 Compare July 22, 2024 10:39
@@ -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) => {
Copy link
Member Author

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);
Copy link
Contributor

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.

Copy link
Member Author

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?

Copy link
Contributor

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.

Copy link
Member Author

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.
@ezr-ondrej ezr-ondrej force-pushed the propagate_exit_code branch from d96b936 to 34128f3 Compare July 22, 2024 16:45
@Hyperkid123 Hyperkid123 added release Once merged it will trigger bugfix release bug Something isn't working labels Jul 23, 2024
@Hyperkid123 Hyperkid123 merged commit 27cc9ff into RedHatInsights:master Jul 23, 2024
3 checks passed
@nacho-bot
Copy link
Collaborator

                      :soon::shipit::octocat:
     :bug:Shipit Squirrel has this release bugfix surrounded, be ready for a new version:beetle:

@nacho-bot
Copy link
Collaborator

     🌱 🌸 🌷 🌻 🌟 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🚀

@nacho-bot nacho-bot added the released Pr has been released label Jul 23, 2024
@ezr-ondrej ezr-ondrej deleted the propagate_exit_code branch July 23, 2024 09:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working release Once merged it will trigger bugfix release released Pr has been released
Projects
None yet
Development

Successfully merging this pull request may close these issues.

fec build hides away error status codes
3 participants