-
-
Notifications
You must be signed in to change notification settings - Fork 1.7k
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
Read docker credentials stdout and stderr independently #8007
Conversation
@Smeb thanks for your contribution. Just trying to understand a little bit more about, the doc mentions |
Sure - basically the protocol does not expect any protocol specific information on STDERR, and only sends information on STDOUT - so we should not combine STDERR and STDOUT, because in some cases credential helpers can use STDERR for logging. For us, we have an internal credential helper which writes log messages to STDERR - this works with Docker/Rancher etc as they don't treat STDERR as STDOUT (the behaviour this PR removes). The credential helper does not work when using testcontainers-java because the log messages on STDERR get combined with STDOUT, and then the testcontainer-java tries to read the output and runs into unexpected log messages and crashes. To deal with this we could either store the messages on stderr and re-emit them, or drop them (the approach taken here). I don't think there's a valid use case where we should treat STDERR as STDOUT when implementing the protocol. |
In the tc-go implementation, the helper library we use also does not merge |
Thanks for your contribution, @Smeb! |
Previously, the process stderr would be combined with stdout. This meant that a credential helper which logged to stderr could cause the credential fetching logic to fail.
As described here the protocol only replies on STDOUT, so this should not break any protocol compliant helpers.
fixes: #8006