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

Allow error message from remote builder with error type indicator. #698

Open
wants to merge 5 commits into
base: master
Choose a base branch
from

Conversation

kquick
Copy link
Contributor

@kquick kquick commented Dec 21, 2019

Original code was unconditionally erasing any error messages received from a remote builder, which made diagnostics more difficult. This change allows remote builder errors to be displayed in Hydra, including an indicator of the type of error that occurred along with the log message information.


result.errorMsg = "";
if (result.stepStatus != bsSuccess) {
result.errorMsg += " Log: " + chomp(readFile(result.logFile));
Copy link
Member

Choose a reason for hiding this comment

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

We definitely should not store the log file in the database. It's already way to big.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Good point. Is it worth storing the tail end of the log (10 lines?) for informative purposes, or would you rather there was no log message information stored?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I investigated this further and have updated this PR. There are two locations where this diagnostic information could be viewed: (1) on the hydra system directly via journalctl, and (2) on the .../build/NUM#tabs-buildsteps page. I had been focused on (1), and hadn't considered (2). For (2) there is already a mechanism for viewing the logfile, so I've updated to only show the logfile in (1) and not add this information to the database.

break;
case BuildResult::InputRejected:
case BuildResult::OutputRejected:
result.stepStatus = bsFailed;
result.canCache = true;
result.errorMsg += " {inp/out rejected}";
Copy link
Member

Choose a reason for hiding this comment

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

Hm, it's not clear to me what this adds over the stepStatus, which is already stored in the database IIRC.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Added stepStatus information to logging output (not to database for web ui output) and removed this text where not covered by the stepStatus.

@kquick
Copy link
Contributor Author

kquick commented Dec 25, 2019

@edolstra I've update the PR based on your comments. Please review this again when you get a chance. Thanks!

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.

None yet

2 participants