Hello Folks ๐
I am using dagger 0.11.9 and using dagger cli to run pipelines with TUI. TUI works well with collasable and scrollable in my local macbook but when i run same pipeline in gitlab job those logs are auto collapsable and ended up with printing everything on console.
Could you please help how to fix? Appreaciate quick help here ๐
#TUI collapsable progress not working in gitlab terminal
1 messages ยท Page 1 of 1 (latest)
Heya ๐ so the TUI view can't be run in a collapsable way in gitlab/github/etc:
1 - there's no real way to get user input in those contexts, and it's super dependent on that
2 - the tui uses a lot of fun interactive features that just aren't available in a terminal like that
so for those views, we fallback to the plain progress
hmm..so recommened usecase for TUI is local machine mostly right? ๐
Yup exactly
i have been discussing this in other threads. Running dagger run go main.go gives us certains benefits like application logs can also be part of otel by default, but i wish if we can disable logs by extending --silent but still send logs telemetry, may something like this --soft_silent feature
so in our usecase we don't require TUI feature but we do require telemtry logs from it ๐
@somber canyon this reminds me of our discussion on tuesday: TUI and telemetry are two different features, they may be tightly coupled in their implementation, but users expect them to be decoupled
i'm a bit confused sorry
- Sometimes you want to see a TUI but not send telemetry
- Sometimes you want to send telemetry but disable TUI
we always send telemetry for call/etc, no matter what flags we pass
i think if you're logged in, you should always be sending telemetry for commands that it makes sense to
I agree, Akki's comment above made it seem like that's not the case
(And my own request is: when we disable TUI for certain commands, can we not also disable sending telemetry)
cc @untold crown on that one, i don't really have strong opinions, but if we send telemetry, it needs cloud side changes
(to not show them in the list)
also @tepid pelican i guess
so we would be sending telemetry without displaying it in the UI?
Yeah, telemetry should be sent no matter what, the TUI is decoupled from that
mm, i guess we need to take it out of withEngine then
will take a look at that
I think that should be fine ๐ค we always run the frontend, silent mode just tells it not to print much iirc.
ah
no there's an issue with this
cmd.OutOrStdout or whatever
we set that to the otel span
we need a frontend to print it ๐ฑ
otherwise, no output for you (or if always print to actual stdout, no output in cloud)
i guess we want a "dummy frontend"? or something like that
hm that feels like such a codesmell
ah i see:
- https://dagger.cloud/dagger/traces/88ae5249fd5397e97ee05b35642f6bd2 <- works without
--silent - https://dagger.cloud/dagger/traces/704911b875c2d0e2687fea56ef5ea6cc <- no logs with
--silent
ahhh, is that cause the top-level span is the command itself?
yeah
oh, dagger run just does something weird
we probably don't want that anymore 
the frontend already painstakingly preserves the original stdout/stderr streams even when it's directed to otel, so it should be redundant
i think the OG intent was so people could pipe stdout/stderr independently and have them behave as expected
but that should work as-is with how the frontend works
so i think this can just unconditionally assign Stdout = cmd.OutOrStdout() (and stderr)
the only catch really is that it won't be a live stream - we'll buffer up stdout/stderr and print them on exit
๐ค hm
that might be an issue for users of dagger run
bleh, i'm kinda of on a different track, trying to understand how to get telemetry enabled for every command, but only show the frontend for some commands
cause the frontend is absolutely builtin to our understanding of how to display all otel output
but if the frontend is doing this, then we have to change frontend depending on command? but the frontend is determined at the beginning of main, so we'd need to push that further down
and so it's just kind of everything that needs refactoring
a bit confused - what issue are you hunting down now? seems like the only problem is in dagger run?
the commands that don't use the frontend just use cmd.OutOrStdout() etc
so from my understanding, @lofty mason wants us to keep telemetry for dagger version and co - but, not display the frontend with it
and then use cloud to filter these out
That would be my preference yeah.
oh. we had separate requests to not send telemetry for version / login / etc. though. overruled? ๐งโโ๏ธ
iirc some folks run dagger version as a quick sanity check in CI, and the extra noise in Cloud was annoying
even if we filter it in cloud, the issue is that dagger version isn't neccessarily expected to be networked
having removed the telemetry init from it, it's much faster
also that yea, it's a super primitive command
I am not using dagger cloud but my original ask is to control TUI logs and sending OTEL independantly as of now it is coupled with one flag --silent, we could have two flags to control both aspects eg: --soft-silent could just disable TUI but will send otel data no matter, but may be using --hard-silent we just disable both, just an opinion
that's exactly what i want ๐
going back to this @untold crown IIUC seems like this is only a dagger run ๐ where --silent doesn't collect stdout/err logs?
Yeah. You could probably run with plain progress and just direct stdout/stderr to a file or /dev/null as a workaround
Actually this also will not solve my problem, because there are some info logs(from code itself)that we print out on stdout which is important logs for customers. Doing above solution also disable my application logs in console
So I have to wait eventually for this bug to be fixed before i even use dagger run
let me know when this issue will be solved in coming releases ๐
Any chance this fix/feature might be shipped in next release or so?