Skip to content

[IMP] runbot: handle main command exit status#1382

Open
d-fence wants to merge 1 commit into
19.0from
19.0-handle-exit-status-moc
Open

[IMP] runbot: handle main command exit status#1382
d-fence wants to merge 1 commit into
19.0from
19.0-handle-exit-status-moc

Conversation

@d-fence
Copy link
Copy Markdown
Contributor

@d-fence d-fence commented Apr 9, 2026

Since the runbot executes Docker containers non-blockingly, there is no direct way to capture the main command's exit status.

This commit writes the exit status code to a file at the end of the main Docker command. The feature is now used in Semgrep builds.

@C3POdoo C3POdoo requested a review from a team April 9, 2026 12:52
@d-fence d-fence force-pushed the 19.0-handle-exit-status-moc branch 4 times, most recently from 6db7e8a to 72d2f2d Compare April 10, 2026 09:20
Comment thread runbot/models/build.py Outdated
@d-fence d-fence force-pushed the 19.0-handle-exit-status-moc branch from 72d2f2d to 785a761 Compare May 12, 2026 08:35
Since the runbot executes Docker containers non-blockingly, there is no direct way
to capture the main command's exit status.

With this commit the exit status code of the main command is written to a file.
It also adds a new boolean field 'check_exit_status' on ConfigStep that enables
checking the exit status.

When enabled, the step reads the exit status from the dedicated file and sets
the build result to 'ko' if the exit code is non-zero.

This allows config steps to properly detect and handle command failures
that may not produce error logs but still indicate a failed execution.
@d-fence d-fence force-pushed the 19.0-handle-exit-status-moc branch from 785a761 to 3f662cd Compare May 12, 2026 09:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants