Skip to content

Commit 7c2c504

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 2cece19 commit 7c2c504

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

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

0 commit comments

Comments
 (0)