Skip to content

Update reported max API version to latest - #363

Open
peterebden wants to merge 6 commits into
please-build:masterfrom
peterebden:peter/update-reported-version
Open

peterebden wants to merge 6 commits into
please-build:masterfrom
peterebden:peter/update-reported-version

Conversation

@peterebden

@peterebden peterebden commented Sep 19, 2026 •

Copy link
Copy Markdown
Member

Handle newer symlink field for a client that sends that, and populate the new root_directory_digest field for a client that wants it.

Not much to do otherwise, we already supported most of the features of earlier versions (like compression) before they got (retroactively) tagged. There are other changes, mostly around multiple digest functions and split-and-splice but they're opt-in and we're a SHA-256 only server so we don't have to support any of them.

Update to a more recent Go version while I'm here.

I have not upgraded remote-apis-sdks. There are various changes in it which are IMO highly questionable (silently ignoring unreadable outputs and aggressively opening 25 parallel connections to the CAS server) and relatively little that looks particularly useful for us.

Comment thread mettle/api/api.go
ExecEnabled: true,
},
LowApiVersion: &semver.SemVer{Major: 2, Minor: 0},
HighApiVersion: &semver.SemVer{Major: 2, Minor: 1}, // optimistic

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

our optimism here eventually paid off and it did get tagged, quite some time after this comment.

Comment thread AGENTS.md
@@ -0,0 +1,254 @@
# AGENTS.md

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Adding this while I'm here

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

sneaky sneaky!

@peterebden peterebden changed the title Update reported max API version to 2.3 Update reported max API version to latest Sep 19, 2026
rootDigest, err := digest.NewFromMessage(tree.Root)
require.NoError(t, err)
assert.Equal(t, rootDigest.ToProto(), outDir.RootDirectoryDigest)
assert.NotEqual(t, digest.Digest{}, rexclient.PackDigest(tree.Root))

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why do we only assert that it is non-zero, but not assert what it actually is?

sub := &pb.Directory{}
require.NoError(t, proto.Unmarshal(blob(t, entries, root.Directories[0].Digest), sub))
require.Len(t, sub.Files, 1)
assert.Equal(t, "b.txt", sub.Files[0].Name)

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

require.Len(t, sub.Directories, 0)? Or not worth it?

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

or maybe assert.Empty

OutputDirectorySymlinks: []*pb.OutputSymlink{dir},
}))

// output_symlinks is already populated, which takes priority

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This test doesn't actually assert that output_symlinks takes priority; allOutputSymlinks could still read the deprecated fields and pass this test.

Comment thread AGENTS.md
@@ -0,0 +1,254 @@
# AGENTS.md

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

sneaky sneaky!

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 this pull request may close these issues.

2 participants