Repository navigation
[JENKINS-76271] In case of error in an http request, to log also de returned data - #228
Conversation
|
Can you please review this PR? @MarkEWaite |
I don't plan to review this pull request. I'm not generally considering enhancements for this plugin. I think that users should use shell steps and run command line programs like @strangelookingnerd has been a great help, but I suspect that he is also not a user of the plugin. If you'd like to adopt the plugin, I'm happy to offer some limited coaching on what it means to adopt the plugin. |
Then can you please suggest some repositories where you are active and accept new pull request? I am interested working on backend related tasks (not front end or visuals changes). @MarkEWaite |
Not really. Here are a few that you might consider, though with the understanding that my interests may change at any time:
|
Default-config failure now asserts the body lands in the build log on both surfaces (fails without the change), and the consoleLogResponseBody case asserts the body is not logged a second time.
4a6652b to
aafec7b
Compare
h3nr1-d14z
left a comment
There was a problem hiding this comment.
better late than never — the plugin had no active maintainer when you opened this, that's sorted now (adoption went through last week, #342) and the old queue is being worked through.
The change itself looks right: it only reads the body once the build is already failing, skips the read when consoleLogResponseBody already logged it, and the throw right after means nothing downstream needs the stream. I rebased your branch onto current master (the surrounding error handling was reworked in #343, but responseCodeIsValid itself is untouched — no conflicts) and force-pushed, so sorry for the history rewrite.
I also added tests on top: default-config failure now asserts the body lands in the build log on both freestyle and pipeline (fails without your change), and the consoleLogResponseBody case asserts the body isn't logged twice.
Merging once CI is green. Thanks for the patience.
— h3nr1-d14z
|
putting one design choice on record now that this is merged: the error-body logging fires on any status-code failure, including for users who deliberately left consoleLogResponseBody off. I kept it that way on purpose — when the build already failed validation, the response body is usually exactly what you need to debug it, and that was the whole ask in #330. the opt-in path (consoleLogResponseBody: true) still exists and logs the body before validation. if anyone's in a spot where error payloads carry secrets that can't land in build logs, say the word and I'll gate this behind a flag. — h3nr1-d14z |
JENKINS-76271
n case of error in an http request, to log also de returned data
Testing done
Submitter checklist