-
Notifications
You must be signed in to change notification settings - Fork 441
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
Redirect docker buildkit stderr to info #1373
Conversation
At least one pull request committer is not linked to a user. See https://help.github.com/en/articles/why-are-my-commits-linked-to-the-wrong-user#commits-are-not-linked-to-any-user |
Confused about the failing formatting. When I ran |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A small nit pick, but otherwise this looks good
val logger = publishLocalLogger(log) | ||
val ret = sys.process.Process(buildCommand, context) ! sys.env | ||
.get("DOCKER_BUILDKIT") | ||
.map(_ => publishLocalBuildkitLogger(log)) | ||
.getOrElse(logger) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
maybe put the decision logic here. I always find the !
syntax of the sys.process.Process
already hard to read and with additional logic behind, it gets even harder.
val logger = publishLocalLogger(log) | |
val ret = sys.process.Process(buildCommand, context) ! sys.env | |
.get("DOCKER_BUILDKIT") | |
.map(_ => publishLocalBuildkitLogger(log)) | |
.getOrElse(logger) | |
val logger = sys.env.get("DOCKER_BUILDKIT") | |
.exists(_ == "1") | |
.map(_ => publishLocalBuildkitLogger(log)) | |
.getOrElse(publishLocalLogger(log)) | |
val ret = sys.process.Process(buildCommand, context) ! logger |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That would change the logger for the other cmd running docker images prune...
. Not sure this is a good idea ? Or shall I create another variable ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would keep it consistent. One build kit logger and one if no buildkit is being in use.
So yeah. I'm fine with changing the logger for the prune command if buildkit is enabled
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It will potentially output in INFO actual errors from the pruning though. But if you're fine with it, I made the change.
Can you try running Or maybe you have a global scalafmt plugin installed? |
At least one pull request committer is not linked to a user. See https://help.github.com/en/articles/why-are-my-commits-linked-to-the-wrong-user#commits-are-not-linked-to-any-user |
1 similar comment
At least one pull request committer is not linked to a user. See https://help.github.com/en/articles/why-are-my-commits-linked-to-the-wrong-user#commits-are-not-linked-to-any-user |
Thanks for fixing this 🤗 I'll release as soon as I got the release process up and running again 😞 |
Fixes #1371
First draft, let me know what you think.
Tested it on my project, it works fine now.