Skip to content

deduplicate warnings & errors found in logs and add initial newline + tab in output#4361

Merged
boegel merged 2 commits intoeasybuilders:developfrom
Flamefire:improve-error-check
Nov 8, 2023
Merged

deduplicate warnings & errors found in logs and add initial newline + tab in output#4361
boegel merged 2 commits intoeasybuilders:developfrom
Flamefire:improve-error-check

Conversation

@Flamefire
Copy link
Copy Markdown
Contributor

It isn't useful to report duplicate errors multiple times. And e.g. configure may report a wrong option at the start and end. Hence deduplicate it.
Also change the logged warning/error to include a newline & tab in front of each element which makes it nicer to read. E.g.:

build failed (first 300 chars): Found 1 error(s) in command output:
	configure: WARNING: unrecognized options: --with-foo, --with-bar (took 2 mins 39 secs)

…output

It isn't useful to report duplicate errors multiple times. And e.g.
configure may report a wrong option at the start and end.
Hence deduplicate it.
Also change the logged warning/error to include a newline & tab in front
of each element which makes it nicer to read. E.g.:
> build failed (first 300 chars): Found 1 error(s) in command output:
>	configure: WARNING: unrecognized options: --with-foo, --with-bar (took 2 mins 39 secs)
@boegelbot

This comment was marked as outdated.

@Flamefire
Copy link
Copy Markdown
Contributor Author

Doesn't look like those test failures can be caused by the change. One is related to network, the other is... strange

@boegel
Copy link
Copy Markdown
Member

boegel commented Nov 8, 2023

@Flamefire That test failure was a fluke, I've re-triggered the failing test runs, and they passed just fine on 2nd attempt, so do ignore.

@boegel boegel changed the title Deduplicate warnings&errors found in logs and add initial newline in output deduplicate warnings & errors found in logs and add initial newline + tab in output Nov 8, 2023
Copy link
Copy Markdown
Member

@boegel boegel left a comment

Choose a reason for hiding this comment

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

Pretty trivial change that actually only impacts the logged warnings or raised errors for easyblocks that use actually check_log_for_errors (which currently only includes OpenBLAS and FreeFEM), so good to go.

In practice the lifetime of this change will probably be rather limited, since in EasyBuild 5.x we're switching to a now mechanism for running shell commands, which will probably make check_log_for_errors for errors pretty useless.

@boegel boegel merged commit 731649d into easybuilders:develop Nov 8, 2023
@Flamefire Flamefire deleted the improve-error-check branch November 8, 2023 07:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants