Skip to content

tui: associate effects to their origin, not their unlazier - #7686

Merged
vito merged 9 commits into
dagger:mainfrom
vito:accounting
Jun 24, 2024
Merged

vito merged 9 commits into
dagger:mainfrom
vito:accounting

Conversation

@vito

@vito vito commented Jun 18, 2024 •

Copy link
Copy Markdown
Contributor

The place where something becomes un-lazied is not that useful. Better to show effects at their point of origin instead. This is a bit of ✨ movie magic ✨ but it's a lot more useful than telling "the truth" (arguably an implementation detail of our telemetry plumbing).

This also effectively works around a Buildkit bug that ends up associating LLB to incorrect spans1, which would sometimes put a failed span beneath a succeeding one, making it especially hard to find.

  • Bikeshed the attribute name? We overload Buildkit's vertex attribute, but we have the power to translate that to something like dagger.io/effect.id.

Footnotes

  1. possibly from here which the race detector is also unhappy with) ↩

@vito
vito force-pushed the accounting branch 2 times, most recently from 9e10362 to 13637d4 Compare June 18, 2024 16:48
@vito
vito force-pushed the accounting branch 9 times, most recently from 48cfed1 to f087511 Compare June 21, 2024 00:05
vito added 8 commits June 21, 2024 12:33
otherwise going 'out' really jumps across the universe

Signed-off-by: Alex Suraci <[email protected]>
otherwise we mark too many spans 'running'; we only show it in one
place, so make the data represent that

Signed-off-by: Alex Suraci <[email protected]>
fixes remaining tests, addresses comment (kinda; with a helper)

Signed-off-by: Alex Suraci <[email protected]>
this was added while flailing on effects, now that we track running
effects in IsRunning() i don't think we need this

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

@jedevc jedevc left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Neat 🎉

Comment on lines +61 to +64
type buildkitSpan struct {
trace.Span
provider *buildkitTraceProvider
}

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Aha, this is so much neater now that this logic isn't done entirely in Start 🎉

@vito
vito merged commit 1deaeab into dagger:main Jun 24, 2024
@vito
vito deleted the accounting branch June 24, 2024 15:08
@gerhard gerhard added this to the v0.12.0 milestone Jul 2, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

kind/bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants