Repository navigation
More visualization plumbing and polish - #6704
Conversation
e6f787b to
30e0df3
Compare
There was a problem hiding this comment.
@sipsma I had to make this nullable since otherwise it's possible to call it and get back a zero-value dagql.Instance[*Directory] which leads to a nil panic. (Nothing load-bearing hit this, I was just monkeying around in the GraphQL playground and accidentally triggered it.)
There was a problem hiding this comment.
@sipsma I mentioned this could probably be simplified before, decided to do that now but lmk if there was a reason you couldn't (seems OK judging by tests)
There was a problem hiding this comment.
I think I left it as is because it wasn't 100% clear to me that it was doing all the exact same things. E.g. the previous code appended the obj from s.ToSelectable(nthID, val) but afaict just using assign won't end up doing that (based on the implementation of DynamicArrayOutput.SetField).
Really not sure whether that's meaningful and, if so, in which cases, so no biggie either way at the moment. Can patch up more if we hit a case where it breaks.
There was a problem hiding this comment.
Ah, it looks like nothing actually calls this path right now because the whole conditional is beneath if _, ok := s.ObjectType(res.Type().Name()); ok { and the only slice value we ever select out is []string, which is not an object type. I'll just revert this to reduce noise.
There was a problem hiding this comment.
We do also select into []dagql.Instance[*core.ModuleDependency] here: https://github.com/sipsma/dagger/blob/58f4b8f7791786a740134ee36854002f9021c1fc/core/schema/module.go#L686-L686
But sounds good nonetheless
92d849c to
09a4d50
Compare
I think there is a middle ground. I propose defining 2 rules:
The first rule is an incentive to show more detail. The second rule is an incentive to show less. Hopefully, together they get us to a good middle ground. Applying this to the problem of "initialize":
You get the idea. I think it's OK to show more detail than just "initialize", to keep things moving, but we should be careful to only show information that is relevant to the end user. |
|
@shykes Sounds good, I agree with those guidelines. I wonder if the new hiding of self-calls helps balance things out any. Will try an iteration that reveals the |
Ooo nice! I had just been thinking about adding something similar but for the entirely different purpose of making some APIs like Blob and (added in my other open pr for improving sdk loading) BuiltinContainer hidden entirely from external clients and only available internally. That would alleviate a common itch I get with dagql where I need an Instance in order to use an arg which means I have to add an API which currently means it will end up being user facing too. Just a driveby tangential thought, I may follow up with that if time. |
|
@shykes Here are three readily available options: 1. Collapse
|
b49187e to
a9dd807
Compare
sipsma
left a comment
There was a problem hiding this comment.
RE: initialize output, the main thing that came to mind looking at verbose and middle ground options was actually just that I want slightly more higher-level/annotated vertexes. Like ModuleSource.asModule just really means nothing. At the very minimum just having the source metadata being displayed (path for local, git url/path for git) alongside would be better.
You could probably also debate whether it should only be human readable by default (e.g. Loading module from "/home/you/coolmod") and only show the api name in a debug mode, show both always, etc. etc.
(None of the above is a blocker of course, just throwing it out there)
There was a problem hiding this comment.
I think I left it as is because it wasn't 100% clear to me that it was doing all the exact same things. E.g. the previous code appended the obj from s.ToSelectable(nthID, val) but afaict just using assign won't end up doing that (based on the implementation of DynamicArrayOutput.SetField).
Really not sure whether that's meaningful and, if so, in which cases, so no biggie either way at the moment. Can patch up more if we hit a case where it breaks.
| defer func() { | ||
| vtx.Done(err) | ||
| }() | ||
| // always show health checks |
There was a problem hiding this comment.
no-blocker, but are the health check intervals at the beginning slow enough to not like show 3 every time before either the check passes or exponential backoff grows enough to make them not noisy?
|
|
||
| rec := progrock.FromContext(ctx) | ||
| if callContext.ProgrockParent != "" { | ||
| if header := r.Header.Get("X-Progrock-Parent"); header != "" { |
There was a problem hiding this comment.
nit: const where this is used
previously marked all ID vertices as internal so they wouldn't be displayed in non-Zenith UIs like dagger run or in Cloud. now we will consider any `dag.Select` call as internal, and not set it for IDs corresponding to direct user queries. to maintain compatibility, the telemetry.LegacyIDInternalizer progrock.Writer is used for Cloud and the old TUIs. Signed-off-by: Alex Suraci <[email protected]>
Signed-off-by: Alex Suraci <[email protected]>
Signed-off-by: Alex Suraci <[email protected]>
originally wrote these for the initial idtui PR. seems worth committing rather than deleting; in lieu of integration tests these have been an easy way to just spot check various use cases and record before/after. Signed-off-by: Alex Suraci <[email protected]>
Signed-off-by: Alex Suraci <[email protected]>
* allows CLI to group initialization work separate from the primary work * adopt progrock.Span everywhere (new higher-level otel-style API) * make service health check vertex non-internal, grouped under service * TODO update TUI to respect primary vertex Signed-off-by: Alex Suraci <[email protected]>
otherwise this defaultPlatform call shows up in everyone's builds Signed-off-by: Alex Suraci <[email protected]>
Signed-off-by: Alex Suraci <[email protected]>
Signed-off-by: Alex Suraci <[email protected]>
* now uses same CollectLogsView function used by dagviz * renders primary output at the bottom of the screen, though i don't think this really matters at the moment since nothing streams to it * TODO: support expanding Signed-off-by: Alex Suraci <[email protected]>
Signed-off-by: Alex Suraci <[email protected]>
previously it would go on to show their children + start switching to dagql.IsInternal + unrelated tweak for robustness of MostInterestingVertex Signed-off-by: Alex Suraci <[email protected]>
Signed-off-by: Alex Suraci <[email protected]>
Signed-off-by: Alex Suraci <[email protected]>
Signed-off-by: Alex Suraci <[email protected]>
Signed-off-by: Alex Suraci <[email protected]>
Signed-off-by: Alex Suraci <[email protected]>
Signed-off-by: Alex Suraci <[email protected]>
Signed-off-by: Alex Suraci <[email protected]>
way too quiet Signed-off-by: Alex Suraci <[email protected]>
Signed-off-by: Alex Suraci <[email protected]>
Signed-off-by: Alex Suraci <[email protected]>
ideally the image pull stuff would be moved to progrock tasks so it can have the same progress style from elsewhere, but that's too much work atm Signed-off-by: Alex Suraci <[email protected]>
a9dd807 to
67d6341
Compare
|
Pushed another commit that brings back the (Ignore the silent 'initialize', it's because it's pointing to an old engine) @sipsma Feedback addressed, thanks for the review!
Agree |
Signed-off-by: Alex Suraci <[email protected]>
67d6341 to
c89d0dd
Compare

(I pinged a bunch of people at the end to fish for any super quick feedback, low prio, ignore if busy)
Summary
(*progrock.Recorder).Vertexcalls to use a new higher-levelprogrock.SpanAPI which additionally sets the vertex as the current parent inctxso any subsequent progress is grouped benath it, tracing/span-style.gqlerror.Errorresults for each failed path.dag.Select) as internal, exposed viadagql.IsInternal. This supersedes the shortlivedanalytics.WithInternal/IsInternalpattern.--debug, which I think is a good balance; it means we can refactor things into fine-grained APIs that call each other without exposing a ton of extra calls.re: collapsing in the TUI
After changing the TUI to collapse all the initialization and internal calls, my gut reaction was to dislike it. It kind of sucks not seeing what's going on when you're forced to wait anyway. It definitely makes sense in the web UI but I wonder if the TUI should just keep showing the user exactly what's going on.
Now that the TUI has been out for a bit, how do people feel about the noise level? cc @shykes @jedevc @helderco @sipsma @samalba (sorry for the spam, ignore if busy)