Skip to content

Conversation

@RazvanLiviuVarzaru
Copy link
Collaborator

When an error occurs, displaying system logs in standard output may not be beneficial if they do not provide additional information that could help with debugging the issue.

This was initially implemented as a trap, triggered whenever the scripts exit with a failure. See: MDBF-1130 (bbb5955)

Sometimes, the errors of interest are located at the beginning of the log, but they are obscured by a large number of system logs. Collecting system logs could be done into a file that is uploaded at the buildbot step level.

This can be implemented by defining the logfiles parameter at the step level. See: https://docs.buildbot.net/latest/manual/configuration/steps/shell_command.html

@RazvanLiviuVarzaru RazvanLiviuVarzaru force-pushed the MDBF-1159 branch 5 times, most recently from b0064f5 to 04c9ce2 Compare January 21, 2026 14:58
@RazvanLiviuVarzaru
Copy link
Collaborator Author

RazvanLiviuVarzaru commented Jan 21, 2026

@grooverdan I assigned you for review because you were the original implementer of the collection mechanism.
I kept the original logic you developed intact, it works very well, I just added means to offload the logs from stdio to dedicated log entries under the step, so that is much easier to debug.

Thank you for your time!

(FYI, this example is https://jira.mariadb.org/browse/MDEV-38628)


Test: https://buildbot.dev.mariadb.org/#/builders/809/builds/4

Where a step failure is present, logs are collected.
image

Copy link
Collaborator

@fauust fauust left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Overall, this looks good!

See my comments about >/dev/null filtering, in my experience it's a bad idea since you can miss errors and it makes script much more complex to maintain and debug.

When an error occurs, displaying system logs in standard output may not be beneficial if they do not provide additional information that could help with debugging the issue.

This was initially implemented as a trap, triggered whenever the scripts exit with a failure. See: MDBF-1130 (MariaDB/buildbot@bbb5955)

Sometimes, the errors of interest are located at the beginning of the log, but they are obscured by a large number of system logs. Collecting system logs could be done into a file that is uploaded at the buildbot step level.

This can be implemented by defining the logfiles parameter at the step level. See: https://docs.buildbot.net/latest/manual/configuration/steps/shell_command.html
@RazvanLiviuVarzaru
Copy link
Collaborator Author

@fauust thank you for the review,
I addressed your review comments, the remaining /dev/null are for tee because we don't want to pollute the main log but instead write to the uploaded log files.

Please approve if there's nothing else to fix.

@RazvanLiviuVarzaru RazvanLiviuVarzaru merged commit c788c48 into MariaDB:dev Feb 3, 2026
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

2 participants