-
Notifications
You must be signed in to change notification settings - Fork 386
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
Bootstrap if simple heuristics say we haven't run it yet. #989
Conversation
@@ -61,7 +61,7 @@ type ConsoleLogger struct { | |||
// Current returns the current console. | |||
func Current(colorMode ColorMode, prefixPadding int) ConsoleLogger { | |||
return ConsoleLogger{ | |||
outW: os.Stdout, | |||
outW: os.Stderr, // So logs dont sully any intended outputs of commands. |
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.
As discussed in standup this morning
…is what our CI uses).
@@ -431,7 +431,7 @@ save-artifact-after-push: | |||
--post_command="2>&1 | perl -pe 'BEGIN {\\\$status=1} END {exit \\\$status} \\\$status=0 if /not found/;'" | |||
|
|||
push-build: | |||
DO +RUN_EARTHLY --earthfile=push-build.earth --target=+test --extra_args="--push" --post_command="2>&1 > output" | |||
DO +RUN_EARTHLY --earthfile=push-build.earth --target=+test --extra_args="--push" --post_command="> output 2>&1" |
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.
Flipping this order means we capture stderr properly
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.
👍
Perhaps these two should be moved to stderr too?
- https://github.com/earthly/earthly/blob/main/builder/docker.go#L72
- https://github.com/earthly/earthly/blob/main/builder/docker.go#L85
(This one is already done https://github.com/earthly/earthly/blob/main/buildkitd/buildkitd.go#L485)
Oh.. did we want to move auto-complete installation under a new flag too? Otherwise the bootstrapping might not work due to missing |
I was trying to see if we could get away without it, and although CI does work, it does fail in bootstrap a lot and really increases noise. Ill add that flag. |
I can dig some; what are these hooked up to? |
Not sure what you mean. They're hooked up to stdout - they show up during the output phase, when Earthly exports images to the local Docker. |
Pulled the logic out of the TCP pull request.
Note that this does not separate the shell completions from bootstrap itself yet. It seemed like we could skate by and see if we wanted to do that later?
I was on board with logging to stderr; but given the number of places I had to redirect I am concerned; but not enough to change course. Just want to think more deeply one more time before we merge something like this.