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

Traces can be skipped when pulling down history records #5089

Closed
tonistiigi opened this issue Jun 25, 2024 · 0 comments · Fixed by #5109
Closed

Traces can be skipped when pulling down history records #5089

tonistiigi opened this issue Jun 25, 2024 · 0 comments · Fixed by #5109
Assignees
Milestone

Comments

@tonistiigi
Copy link
Member

When history record is saved after build completed, the OpenTelemetry trace is not saved initially and instead there is a 3 second sleep https://github.com/moby/buildkit/blob/v0.14.1/solver/llbsolver/solver.go#L402 before this process starts in the background. This is because clients can report their own traces concurrently and not all traces may have arrived yet (actually they never have as the solve request from the client itself is also being traced).

This is problematic to github actions that export the history in the post step. If less than 3 second passes between build and post-step then the opentelemetry trace is skipped and missing from the export.

There should be some way to tell buildkit that no more traces are coming from client and it can finish up storing the trace. This would be an extra request client can do after it has confirmed that it has completed all the build-related work. The daemon needs to then block until it has completed saving the trace and only return after it is ready.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant