Skip to content

tui/go sdk: clean up redundant error wrapping - #7833

Closed
vito wants to merge 27 commits into
dagger:mainfrom
vito:tui-errors
Closed

vito wants to merge 27 commits into
dagger:mainfrom
vito:tui-errors

Conversation

@vito

@vito vito commented Jul 5, 2024

Copy link
Copy Markdown
Contributor

fixes #7007

  • remove a couple of not really helpful error wrapping spots (invoke:, response from query:)
  • specifically for modules, stop printing ExecErrors and GraphQL errors, so that we don't have redundant output with the trace visualization
    • cc @helderco @TomChv - we should make sure the equivalent is done by Python and TypeScript SDKs too. Basically, the module entrypoint should just skip logging things that look like "typical" errors (exec error or GraphQL API error). Not sure what they currently do.
  • hoist error logs up to the top level and print them beneath the progress tree on the final render

@vito
vito marked this pull request as draft July 5, 2024 17:36
@vito
vito force-pushed the tui-errors branch 7 times, most recently from d8cd267 to 74a8140 Compare July 13, 2024 17:56
@github-actions

Copy link
Copy Markdown
Contributor

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.

@vito
vito force-pushed the tui-errors branch 2 times, most recently from be2848d to 6f9dd68 Compare August 12, 2024 13:09
vito and others added 15 commits August 13, 2024 11:46
this does two things:

* remove a couple of not really helpful error wrapping spots
* specifically for modules, stop printing ExecErrors and GraphQL errors,
  so that we don't have redundant output with the trace visualization

Signed-off-by: Alex Suraci <[email protected]>
fixes dagger#7007

rather than printing log output in the tree view, which is annoying
because it can't be copy-pasted, print error logs below it.

this involves a mildly tedious process of hopping from unlazying spans
(sync) to its unlazied effects (exec foo) in order to resurface it
wherever it was installed in the tree (Go.gotestsum >
Container.withExec).

same logic as with Cloud.

Signed-off-by: Alex Suraci <[email protected]>
don't need Err() anymore, overly precise

Signed-off-by: Alex Suraci <[email protected]>
Signed-off-by: Alex Suraci <[email protected]>
these are always redundant with the effects they force to run
currently only implemented for exec ops, redundantly separated from
ExecutionMetadata, but soon this can be used by all ops for effect
tracking purposes.

the end goal is to install a Span Link from the Buildkit span to the
causal span
now we can associate spans to one another in the UI in a much more
sensible manner
* instead of all effect IDs, include a singular LLB output digest
* for caches, emit an attr containing all cached digests
* refactor client Op tracking

Signed-off-by: Alex Suraci <[email protected]>
Signed-off-by: Alex Suraci <[email protected]>
vito added 2 commits August 13, 2024 11:50
Signed-off-by: Alex Suraci <[email protected]>
so you can browse the trace for as long as you want

Signed-off-by: Alex Suraci <[email protected]>
vito added 5 commits August 13, 2024 21:50
* back to an array of effect IDs, instead of single output
* a span is pending iff it has effects and they're all pending
* a span is cached iff it's cached itself or all of its effects are
  cached

tricky bits:

* have to exclude the "wrapper" op from the set of effects
* have to emit an op's transitive input digests since Buildkit won't
  always send a span for every op

Signed-off-by: Alex Suraci <[email protected]>
vito added 4 commits August 13, 2024 23:03
trying this on, not sure about it, but I like that you can see
unabridged recipes, and it eliminates some randomness from the UI

Signed-off-by: Alex Suraci <[email protected]>
ended up as a bit of a sprawl of work, TODO write message

somewhat sizeable refactor to fix navigating out past the zoomed span

Signed-off-by: Alex Suraci <[email protected]>
@github-actions

Copy link
Copy Markdown
Contributor

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.

@github-actions

github-actions Bot commented Sep 8, 2024

Copy link
Copy Markdown
Contributor

This PR was closed because it has been stalled for 7 days with no activity.

@jedevc

jedevc commented Oct 8, 2024

Copy link
Copy Markdown
Contributor

@vito is this one getting closed intentional?

@vito

vito commented Oct 8, 2024

Copy link
Copy Markdown
Contributor Author

@jedevc Yep, this is superseded by #8442

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

CLI: don't show stderr twice on error

2 participants