#I haven t dove deep into that new

1 messages ยท Page 1 of 1 (latest)

frank harbor
#

Thanks Erik, I'll try and take a look at how Dagger uses it and figure out if Dagger can do the attestation..

somber mason
frank harbor
#

Looks like it's not the return value but it does require a flag to be set as input

#

If only I knew what Solve did and how it is different from Build ๐Ÿ˜…

#

From what I can tell, Dagger would need to pass that FrontendAttrs{ "attest:provenance": " provReq = "mode=max"}

And the resulting OCI artifact would be attested.

From the PR description and code, it seems like there are times where we would need to pass in the vcs:source
too.

#

So in Dagger world, VCS would only be applied when people have reference a "Git layer" , right? As in if the DAG has a git layer in it, all the subsequent buildkit calls need to have pass in the vcs:source attribute?

somber mason
# frank harbor If only I knew what `Solve` did and how it is different from `Build` ๐Ÿ˜…

It's extremely confusing. You can think of Build as the "outer" call that opens up a session between the client and buildkitd. Then within Build you can issue multiple Solve calls that run on that session.

From what I can tell, Dagger would need to pass that FrontendAttrs{ "attest:provenance": " provReq = "mode=max"}
Just did another pass through and yep that looks correct.

So in Dagger world, VCS would only be applied when people have reference a "Git layer" , right? As in if the DAG has a git layer in it, all the subsequent buildkit calls need to have pass in the vcs:source attribute?
This I'm still not sure about yet, looking through the code hasn't been super enlightening. The only place I saw this used is:

  1. Here, where it gets read: https://github.com/sipsma/buildkit/blob/9624ab4710dd1a63453cc028802c9992b9715f3c/solver/llbsolver/provenance/predicate.go#L166-L166
  2. And then later in the same function here, where it just gets passed through to the final attestation: https://github.com/sipsma/buildkit/blob/9624ab4710dd1a63453cc028802c9992b9715f3c/solver/llbsolver/provenance/predicate.go#L225-L225

So from that it just seems like metadata that gets passed through, not anything buildkit specifically processes really right now. What I don't understand is what's supposed to happen if there's multiple Git refs inside the DAG.

I'm wondering if it's meant to be the VCS of buildkit itself (or of the code for the frontend being used)? Would need to investigate more

frank harbor
#

I could be way off but in one of the test case it looks like that metadata is passed as a label in the attestation.

#

So it's probably just there for people to know that a git repo is associated with the build? I don't know why it would be there, tbh.