Make publisher capture errors from hooks
We want the publisher to capture stdout+stderr output from failing publisher hooks.
This implementation requires the hook to always return an error code (non-zero) for the output to be captured. Both stdout and stderr are captured.
This MR also included changes from !77 (merged).
Merge request reports
Activity
assigned to @em
requested review from @em
unassigned @em
- Resolved by Andrej Shadura
This implementation is a bit limited: it requires the hook to always return an error code (non-zero), and doesn’t capture stdout.
I assume "always" means "iff there's an error return an error code, otherwise 0 to report success", right? In that case it does not seem to be a limitation, but a pretty sensible assumption.
As for stdout, does it still get printed on stdout or somewhere else?
Again, as long as it does not go into the void, it seems to be a sensible thing to do.
And it is then up for the publisher to print useful/clear error messages and use an appropriate return code.
- Resolved by Andrej Shadura
- Resolved by Emanuele Aina
added 4 commits
Toggle commit listadded 4 commits
Toggle commit listadded 4 commits
Toggle commit listadded 5 commits
- f1e38dda - bs_publish: Store the complete error output in the repo state
- ab863e58 - [backend] XML::Structured: fix pure perl encoding of '[' and ']'
- 843a928d - backend: Do not strip out newlines when generating XML
- c2b0872e - bs_publish: Preserve error output when calling hooks
- 05d057e9 - backend: Don't install XML::Structured from Debian
Toggle commit listadded 1 commit
- f6a2c075 - backend: Add libcapture-tiny-perl to Dockerfile
added 6 commits
- 76994288 - bs_publish: Store the complete error output in the repo state
- ecc4dd45 - [backend] XML::Structured: fix pure perl encoding of '[' and ']'
- 1905e813 - backend: Do not strip out newlines when generating XML
- 8b4528b1 - bs_publish: Preserve error output when calling hooks
- dfe48e14 - backend: Add libcapture-tiny-perl to Dockerfile
- 53e3d237 - backend: Don't install XML::Structured from Debian
Toggle commit list- Resolved by Emanuele Aina