Skip to content

Commit 0614490

Browse files
committed
Add support for disambiguating multiple responses for cache exporters
by adding IDs similar to output exporters. Signed-off-by: a-palchikov <[email protected]>
1 parent ea8ded7 commit 0614490

File tree

9 files changed

+246
-502
lines changed

9 files changed

+246
-502
lines changed

api/services/control/control.pb.go

Lines changed: 24 additions & 393 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

api/services/control/control.proto

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -104,6 +104,9 @@ message CacheOptionsEntry {
104104
// Attrs are like mode=(min,max), ref=example.com:5000/foo/bar .
105105
// See cache importer/exporter implementations' documentation.
106106
map<string, string> Attrs = 2;
107+
// ID identifies this exporter.
108+
// ID should be treated by the exporter as opaque.
109+
string ID = 3;
107110
}
108111

109112
message SolveResponse {

api/services/control/control_vtproto.pb.go

Lines changed: 47 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

client/client_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2419,7 +2419,7 @@ func testSessionExporter(t *testing.T, sb integration.Sandbox) {
24192419
require.Equal(t, "foo", resp.Entries[1].Path)
24202420

24212421
exporterCalled = true
2422-
target.Add(filesync.WithFSSync(0, fixedWriteCloser(nopWriteCloser{outW})))
2422+
target.Add(filesync.WithFSSync("0", fixedWriteCloser(nopWriteCloser{outW})))
24232423
return []*exporter.ExporterRequest{
24242424
{
24252425
Type: ExporterOCI,

0 commit comments

Comments
 (0)