Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Merged
merged 9 commits into from
Jun 24, 2024

Conversation

vito
Copy link
Contributor

@vito vito commented Jun 18, 2024

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.
    • There's now a SpanProcessor that translates the attribute as described. New scheme:
      • vertex -> dagger.io/effect.id
      • dagger.io/llb.digests -> dagger.io/effect.ids
    • These attributes are set by services now too, so it makes sense to decouple from Buildkit's naming.
    • Update Cloud to handle new attribute names

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
Signed-off-by: Alex Suraci <alex@dagger.io>
otherwise going 'out' really jumps across the universe

Signed-off-by: Alex Suraci <alex@dagger.io>
Signed-off-by: Alex Suraci <alex@dagger.io>
Signed-off-by: Alex Suraci <alex@dagger.io>
Signed-off-by: Alex Suraci <alex@dagger.io>
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 <alex@dagger.io>
fixes remaining tests, addresses comment (kinda; with a helper)

Signed-off-by: Alex Suraci <alex@dagger.io>
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 <alex@dagger.io>
Signed-off-by: Alex Suraci <alex@dagger.io>
Copy link
Member

@jedevc jedevc left a comment

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
Member

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
44 checks passed
@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