Repository navigation
Log core.Start output. - #2561
Log core.Start output. #2561
Conversation
TomChv
left a comment
There was a problem hiding this comment.
You did a great job! I left few comments a question as usual 🚀
| @@ -0,0 +1,96 @@ | |||
| package core | |||
There was a problem hiding this comment.
Since this file contains multiple definition related to async, this would be more accurate to name it async.cue instead of start.cue?
WDYT?
There was a problem hiding this comment.
We moved away from the async terminology in the original PR (i.e. I changed the name from core.#AsyncExec to core.#Start), so I feel like it would be out of place now.
I did just realize that I never updated the actual go structs to remove the term async, which is maybe where the confusion is coming from. I'll update with that.
There was a problem hiding this comment.
Yes my bad, I was confuse with this..
There was a problem hiding this comment.
No worries! I changed the name of the go structs to just be startTask and stopTask now
| func init() { | ||
| Register("Start", func() Task { return &asyncExecTask{} }) | ||
| Register("Stop", func() Task { return &stopAsyncExecTask{} }) | ||
| Register("SendSignal", func() Task { return &sendSignalTask{} }) | ||
| } |
There was a problem hiding this comment.
Same as cue file, you are register all task to manage async, I'm not sure the file name is accurate
|
One thing I noticed when testing is that right now the output still never shows up when running in TTY mode (I had only tested this PR in plain mode before). I believe this is because the TTY mode considers the task to be done once started and thus won't show any output for it. This is worth fixing, but I don't think it's essential immediately as the main point of this PR was just to make sure that stdout/stderr weren't completely dropped like before. As long as they are visible in plain mode then users at least have basic debugability. I will add this task to the main epic, but not going to prioritize it immediately as there is already a PR out to fix up a bunch of TTY related issues. |
Totally agree, we can merge it and take care of that in another PR ;) |
|
This PR is stale because it has been open 14 days with no activity. Remove stale label or comment or this will be closed in 7 days. |
|
This PR was closed because it has been stalled for 7 days with no activity. |
|
Rebased, integ test failure seems unrelated (also happening in main right now). Ping @helderco if you have a spare min to look quickly, the changes to the |
Signed-off-by: Erik Sipsma <[email protected]>
Before this, core.Start output was just dropped entirely. Now, its stdout and stderr are logged in the same way core.Exec output is logged. This requires importing some Buildkit code that it uses for collecting and publishing log streams efficiently (internally uses a circular buffer). The interface is a bit clunky but gets us parity between core.Start and core.Exec. Signed-off-by: Erik Sipsma <[email protected]>
There was a problem hiding this comment.
This is a great PR that has been sitting open for too long, we want to get it in.
All changes look good to me. When all checks go green, this is OK to merge from my POV.
OK, apparently not. Will check what changed since the tests passed last time.
Just a go mod tidy 🏎
Signed-off-by: Gerhard Lazu <[email protected]>
|
@sipsma ⛴ (because this was so slow to get merged). |
|
Thank you @gerhard! |
Before this, core.Start output was just dropped entirely. Now, its
stdout and stderr are logged in the same way core.Exec output is
logged.
This requires importing some Buildkit code that it uses for collecting
and publishing log streams efficiently (internally uses a circular
buffer). The interface is a bit clunky but gets us parity between
core.Start and core.Exec.
Signed-off-by: Erik Sipsma [email protected]
Note: this also has a separate commit that refactors the code to split it amongst separate files, as requested in a previous PR: #2460
Will be somewhat easier to review by looking at the
Log core.Start outputcommit by itself.Fixes #2469