exporter: add session export finalization - #6978
Merged
Merged
Conversation
fiam
force-pushed
the
alberto/session-export-finalization
branch
4 times, most recently
from
July 22, 2026 23:45
41c8633 to
ddb31ed
Compare
fiam
marked this pull request as ready for review
July 22, 2026 23:50
fiam
force-pushed
the
alberto/session-export-finalization
branch
from
July 22, 2026 23:51
ddb31ed to
1684055
Compare
crazy-max
reviewed
Jul 23, 2026
| } | ||
|
|
||
| func (s *Solver) finalizeSessionExport(ctx context.Context, sessionID string, exporterResponse map[string]string) error { | ||
| caller, err := s.sm.Get(ctx, sessionID, false) |
Member
There was a problem hiding this comment.
I think we should have the same shape as getSessionExporters for s.sm.Get:
buildkit/solver/llbsolver/export.go
Lines 33 to 35 in b8a2467
Collaborator
Author
There was a problem hiding this comment.
Thanks for the clarification! I've added the same timeout for s.sm.Get in both places, PTAL
tonistiigi
approved these changes
Jul 23, 2026
Add a FinalizeExport RPC to pass the combined exporter response back to the session provider after all exports complete. This lets clients run completion work while the build's gateway references remain available. Keep the callback optional for compatibility with existing session exporters. Ignore unsupported finalization, propagate callback failures, and support providers that only register a finalization callback. Signed-off-by: Alberto Garcia Hierro <alberto.hierro@docker.com>
fiam
force-pushed
the
alberto/session-export-finalization
branch
from
July 23, 2026 15:46
1684055 to
30a3c27
Compare
crazy-max
approved these changes
Jul 23, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
FinalizeExportRPC for session exporter providersUnimplementedandUnavailableresponses while propagating other callback errors
This gives session providers a completion hook while build gateway
references are still available.
Testing
make generated-filesgo test ./session/exporter/...go test ./solver/llbsolvergo test ./client -run '^$'