Skip to content

Commit eaef139

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 2150a20 commit eaef139

File tree

9 files changed

+298
-550
lines changed

9 files changed

+298
-550
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
@@ -105,6 +105,9 @@ message CacheOptionsEntry {
105105
// Attrs are like mode=(min,max), ref=example.com:5000/foo/bar .
106106
// See cache importer/exporter implementations' documentation.
107107
map<string, string> Attrs = 2;
108+
// ID identifies this exporter.
109+
// ID should be treated by the exporter as opaque.
110+
string ID = 3;
108111
}
109112

110113
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
@@ -2707,7 +2707,7 @@ func testSessionExporter(t *testing.T, sb integration.Sandbox) {
27072707
require.Equal(t, "foo", resp.Entries[1].Path)
27082708

27092709
exporterCalled = true
2710-
target.Add(filesync.WithFSSync(0, fixedWriteCloser(nopWriteCloser{outW})))
2710+
target.Add(filesync.WithFSSync("0", fixedWriteCloser(nopWriteCloser{outW})))
27112711
return []*exporter.ExporterRequest{
27122712
{
27132713
Type: ExporterOCI,

0 commit comments

Comments
 (0)