Repository navigation
feat: compute file digest - #8114
Conversation
| } | ||
|
|
||
| func (file *File) Digest(ctx context.Context) (string, error) { | ||
| content, err := file.Contents(ctx) |
There was a problem hiding this comment.
This will require loading the whole file into memory first, which is bad if it's a large file (100s of MB or greater).
We can actually just stream the file contents though which should avoid this. The existing file.Open method returns a io.ReadCloser which we can stream right into a sha256 hasher, e.g. https://pkg.go.dev/crypto/sha256#example-New-File
There was a problem hiding this comment.
Doesn't BuildKit already have a digest that it uses for caching purposes, that we can reuse here?
There was a problem hiding this comment.
It doesn't have anything as part of its official API that exposes it.
We could use it's internals directly I suppose, specifically this Checksum func: https://github.com/moby/buildkit/blob/78f24da143968ed6fa4237c25e766b14a96df159/cache/contenthash/checksum.go#L54
We'd need to be careful to provide the right path arg (file.File) and such, but yeah I think that'd be another option.
Overall it would probably be slightly more convoluted than what I suggested above, but also slightly more reusable for other use cases (especially if it's added as a method on Result in this package), so I don't mind either approach.
There was a problem hiding this comment.
I understand the logic, I see that I can add a method Digest in the package to get the digest directly from the cache keys.
However I'm confused about the cache key.
Here's a snippet of my attempt:
func (r *ref) Digest(ctx context.Context) (string, error) {
cacheResult, err := r.resultProxy.Result(ctx)
if err != nil {
return "", err
}
// This is an array of `[]ExportableCacheKey` that have a method `Digest` in it, however
// What should I do with this array? Should I sum all of them in a hasher?? I'm confused
keys := cacheResult.CacheKeys()As explained in the code's comment, what should I do with the array? Should I only keep the last entry of the array or should I compute a sum of all digest?
The ref.Digest method can then be called from the file proxy service, like for evaluate so that super cool but I'm stuck on the part above.
Let me know what I should do with it.
There was a problem hiding this comment.
It seems I found a workaround with
func (r *ref) Digest(ctx context.Context, path string) (digest.Digest, error) {
cacheRef, err := r.CacheRef(ctx)
if err != nil {
return "", err
}
sessionGroup := bksession.NewGroup(r.c.ID())
return contenthash.Checksum(ctx, cacheRef, path, contenthash.ChecksumOpts{}, sessionGroup)
}| Doc(`Retrieves the size of the file, in bytes.`), | ||
| dagql.Func("name", s.name). | ||
| Doc(`Retrieves the name of the file.`), | ||
| dagql.Func("digest", s.digest). |
There was a problem hiding this comment.
One thing worth consideration is if the digest should include the file metadata in addition to the file contents (i.e. owner, permissions, timestamps, etc.). The file metadata is part of its definition, impacts caching, etc. so depending on the use case it may or may not be what the user wants.
We can just add an optional argument for whether or not metadata is included of course, so then the question is just what the default behavior is (metadata included or not).
Personally, I have a slight preference for including metadata in the digest by default, but curious if others have thoughts.
Not a blocker for me, just raising the question.
There was a problem hiding this comment.
I think I'd expect the default to just be a content digest - I can imagine a lot of the cases of wanting a digest of the file to just get the contents - especially as that's what lots of users would be use to using sha256sum or similar command line tools.
Having this as an option definitely makes sense though (although, there's no authoritative way to hash file metadata in a consistent way - it feels a bit weird to have something non-standard like this, but I don't have any better suggestions).
There was a problem hiding this comment.
Is it possible with the buildkit cache digest implementation? I didn't see the options to do so
There was a problem hiding this comment.
Having this as an option definitely makes sense though (although, there's no authoritative way to hash file metadata in a consistent way - it feels a bit weird to have something non-standard like this, but I don't have any better suggestions).
The closest thing to a standard is the tar format, which includes all file metadata. That's how container layer digests are computed, so I suppose it's part of the OCI standard in that respect.
That's also what the contenthash package ends up doing (without creating an actual tar file on disk): https://github.com/sipsma/buildkit/blob/699623575173eedf09b43b797bd74439c86a3071/cache/contenthash/filehash.go#L47-L47
Is it possible with the buildkit cache digest implementation? I didn't see the options to do so
The Checksum implementation you switched to does include the file metadata in addition to the file contents. You're right it doesn't currently have an option to disable inclusion of metadata.
Like I said before, I'm personally fine with including the metadata by default and adding an option down the line to enable digesting only based off the contents. There's a few approaches for doing that (not needed now IMO, just noting for the future):
- Upstream changes to the buildkit package to support that
- When that "contents-only" option is enabled, reset all the metadata on the file so it's consistent and then get the hash from
Checksum - Just have a separate codepath when "contents-only" is enabled where we just read the contents and hash those directly rather than use the
Checksumfunction
There was a problem hiding this comment.
BTW, I do see your point Justin about contents-only being the expectation from using sha256sum and similar.
I feel torn overall still because in the rest of Dagger the file metadata does impact the "checksum" of a file (and caching etc.) so including it by default feels aligned with the rest of our behavior. Really splitting hairs here though.
So still fine with including it by default, but not strongly opinionated if there's any more thoughts on this topic.
There was a problem hiding this comment.
I added the excludeMetadata options with the separate codepath :D
There was a problem hiding this comment.
If I had to pick a side I think I'd argue for alignment with sha56sum being less surprising, and if we want a digest that includes the metadata and anything else that influences caching, maybe that should be something like cacheKey.
Going back to the original request (#7709) it sounds like one goal is to see if two files are "the same" - which I think most people would take to mean same contents, metadata aside, the same way sha256sum etc. works.
But, yeah, low conviction and I'm coming in late so I'm good with shipping in either form
There was a problem hiding this comment.
Since @TomChv added support for both codepaths, it's trivial to switch the default behavior to not including metadata. Seems like more are leaning towards switching to that default, so we have time before the release to switch it.
|
@sipsma I made the changes you asked, hope it improve the implementation :D |
|
PHP linter works locally so I'm quite confused by the fail in the CI |
sipsma
left a comment
There was a problem hiding this comment.
Code LGTM, but would like to ensure others are okay with the behavior of including metadata by default before merging: https://github.com/dagger/dagger/pull/8114/files#r1706167239
09c15dc to
53460fe
Compare
| @@ -0,0 +1,6 @@ | |||
| kind: Added | |||
| body: Add `Digest` method to `File` | |||
There was a problem hiding this comment.
👀 can we get another line in the changelog body here explaining roughly what this method does and what it's for?
I'd really like to have users read release notes and get excited about the features/fixes we're shipping, and having a bit more of an explanation for each point goes a long way to getting that 🎉 🎉
| } | ||
| } | ||
|
|
||
| func (FileSuite) TestDigest(ctx context.Context, t *testctx.T) { |
There was a problem hiding this comment.
Can we expand these tests? Ideally each test should have have two files with the same contents, but different metadata.
Then in "without metadata", the files will have the same digest, but in "with metadata" they'll be different.
jedevc
left a comment
There was a problem hiding this comment.
Left a new nits, but good to merge IMO once those are handled 🎉
I think it's fine to default to included metadata (I don't have a good enough reason to block), but let's just keep an eye on feedback, we can always change this in the future if it turns out to be super confusing for users.
|
I asked for help in the Discord php channel for the lint failure, we need to fix that before merging. |
|
Test failed because of flacky Python, not related to the PR |
Signed-off-by: Tom Chauveau <[email protected]>
Signed-off-by: Tom Chauveau <[email protected]>
Signed-off-by: Tom Chauveau <[email protected]>
Signed-off-by: Tom Chauveau <[email protected]>
Signed-off-by: Tom Chauveau <[email protected]>
Signed-off-by: Tom Chauveau <[email protected]>
Signed-off-by: Tom Chauveau <[email protected]>
Signed-off-by: Tom Chauveau <[email protected]>
Signed-off-by: Tom Chauveau <[email protected]>
Signed-off-by: Tom Chauveau <[email protected]>
353d28e to
139eea5
Compare
|
PR still failing because of flacky TestGit & TestGoInit, should I merge that PR even if it fails these? My changes are not impacting this part. |
Yeah I think you are good to merge if it's just those ones |
[](https://renovatebot.com) This PR contains the following updates: | Package | Update | Change | |---|---|---| | [dagger/dagger](https://togithub.com/dagger/dagger) | patch | `v0.12.4` -> `v0.12.5` | --- ### Release Notes <details> <summary>dagger/dagger (dagger/dagger)</summary> ### [`v0.12.5`](https://togithub.com/dagger/dagger/blob/HEAD/CHANGELOG.md#v0125---2024-08-15) [Compare Source](https://togithub.com/dagger/dagger/compare/v0.12.4...v0.12.5) ##### Added - cli: allow calling core functions directly by [@​helderco](https://togithub.com/helderco) in [https://github.com/dagger/dagger/pull/7310](https://togithub.com/dagger/dagger/pull/7310) \ Usage: `dagger core <function>` \ Example: `dagger core container from --address=alpine terminal` Works the same as `dagger call`, but instead of loading a user module, it only uses functions from the core API. Run `dagger core --help` for available functions. *Note that this command is experimental and the DX for calling core functions in the CLI may change in the future.* - New SDK aliases for `elixir` and `php` by [@​jedevc](https://togithub.com/jedevc) in [https://github.com/dagger/dagger/pull/8067](https://togithub.com/dagger/dagger/pull/8067) \ SDKs with experimental module support (elixir and php) can now be accessed using `--sdk=<sdk>` (such as `--sdk=elixir` and `--sdk=php` respectively) instead of the full form `--sdk=github.com/dagger/dagger/sdk/<sdk>@​<version>`. - Add `File.digest` method by [@​TomChv](https://togithub.com/TomChv) in [https://github.com/dagger/dagger/pull/8114](https://togithub.com/dagger/dagger/pull/8114) \ This method provides an efficient way to compute a file's digest, which unlock optimized file comparison or check for file changes. - Bundle CLI in the Engine image so that both parts of Dagger (CLI+Engine) ship as a single artefact by [@​gerhard](https://togithub.com/gerhard) in [https://github.com/dagger/dagger/pull/8147](https://togithub.com/dagger/dagger/pull/8147) ##### Changed - Reimplemented the OpenTelemetry data pipeline to avoid hangs and other complications by [@​vito](https://togithub.com/vito) in [https://github.com/dagger/dagger/pull/7996](https://togithub.com/dagger/dagger/pull/7996) ##### Fixed - Fix `Directory.glob` to correctly handle globs with subdir prefixes by [@​jedevc](https://togithub.com/jedevc) in [https://github.com/dagger/dagger/pull/8110](https://togithub.com/dagger/dagger/pull/8110) \ Previously, attempting to glob with a prefix subdir in a pattern like `<subdir>/*` would not match any files. This should now be fixed, and files in `<subdir>` will now be correctly matched. - Fix `failed to collect IDs from parent fields` error when module objects contain fields with nil values by @​jedevc/[@​sipsma](https://togithub.com/sipsma) in [https://github.com/dagger/dagger/pull/8132](https://togithub.com/dagger/dagger/pull/8132) - Fixed enum lists in modules by [@​helderco](https://togithub.com/helderco) in [https://github.com/dagger/dagger/pull/8096](https://togithub.com/dagger/dagger/pull/8096) - Fixed referring to module's own objects/interfaces/enums in constructor signature by [@​jedevc](https://togithub.com/jedevc) in [https://github.com/dagger/dagger/pull/8115](https://togithub.com/dagger/dagger/pull/8115) \ Previously, modules would fail to launch if they declared a constructor that contained a reference to a type from it's own module in it's args. - Fixed using custom enum types as optional arguments by [@​jedevc](https://togithub.com/jedevc) in [https://github.com/dagger/dagger/pull/8148](https://togithub.com/dagger/dagger/pull/8148) \ Previously, function calls that defined an optional argument would not be callable. - Make retrieving secret from command works on Windows by [@​wingyplus](https://togithub.com/wingyplus) in [https://github.com/dagger/dagger/pull/8121](https://togithub.com/dagger/dagger/pull/8121) ##### What to do next? - Read the [documentation](https://docs.dagger.io) - Join our [Discord server](https://discord.gg/dagger-io) - Follow us on [Twitter](https://twitter.com/dagger_io) </details> --- ### Configuration 📅 **Schedule**: Branch creation - "after 4pm on thursday" in timezone America/Los_Angeles, Automerge - At any time (no schedule defined). 🚦 **Automerge**: Enabled. ♻ **Rebasing**: Whenever PR is behind base branch, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check this box --- This PR was generated by [Mend Renovate](https://www.mend.io/free-developer-tools/renovate/). View the [repository job log](https://developer.mend.io/github/scottames/dots). <!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzOC4yNi4xIiwidXBkYXRlZEluVmVyIjoiMzguMjYuMSIsInRhcmdldEJyYW5jaCI6Im1haW4iLCJsYWJlbHMiOlsiZGVwZW5kZW5jaWVzIl19--> --------- Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> Co-authored-by: scottames-github-bot[bot] <162828115+scottames-github-bot[bot]@users.noreply.github.com>
[](https://renovatebot.com) This PR contains the following updates: | Package | Update | Change | |---|---|---| | [dagger/dagger](https://togithub.com/dagger/dagger) | patch | `v0.12.4` -> `v0.12.5` | --- ### Release Notes <details> <summary>dagger/dagger (dagger/dagger)</summary> ### [`v0.12.5`](https://togithub.com/dagger/dagger/blob/HEAD/CHANGELOG.md#v0125---2024-08-15) [Compare Source](https://togithub.com/dagger/dagger/compare/v0.12.4...v0.12.5) ##### Added - cli: allow calling core functions directly by [@​helderco](https://togithub.com/helderco) in [https://github.com/dagger/dagger/pull/7310](https://togithub.com/dagger/dagger/pull/7310) \ Usage: `dagger core <function>` \ Example: `dagger core container from --address=alpine terminal` Works the same as `dagger call`, but instead of loading a user module, it only uses functions from the core API. Run `dagger core --help` for available functions. *Note that this command is experimental and the DX for calling core functions in the CLI may change in the future.* - New SDK aliases for `elixir` and `php` by [@​jedevc](https://togithub.com/jedevc) in [https://github.com/dagger/dagger/pull/8067](https://togithub.com/dagger/dagger/pull/8067) \ SDKs with experimental module support (elixir and php) can now be accessed using `--sdk=<sdk>` (such as `--sdk=elixir` and `--sdk=php` respectively) instead of the full form `--sdk=github.com/dagger/dagger/sdk/<sdk>@​<version>`. - Add `File.digest` method by [@​TomChv](https://togithub.com/TomChv) in [https://github.com/dagger/dagger/pull/8114](https://togithub.com/dagger/dagger/pull/8114) \ This method provides an efficient way to compute a file's digest, which unlock optimized file comparison or check for file changes. - Bundle CLI in the Engine image so that both parts of Dagger (CLI+Engine) ship as a single artefact by [@​gerhard](https://togithub.com/gerhard) in [https://github.com/dagger/dagger/pull/8147](https://togithub.com/dagger/dagger/pull/8147) ##### Changed - Reimplemented the OpenTelemetry data pipeline to avoid hangs and other complications by [@​vito](https://togithub.com/vito) in [https://github.com/dagger/dagger/pull/7996](https://togithub.com/dagger/dagger/pull/7996) ##### Fixed - Fix `Directory.glob` to correctly handle globs with subdir prefixes by [@​jedevc](https://togithub.com/jedevc) in [https://github.com/dagger/dagger/pull/8110](https://togithub.com/dagger/dagger/pull/8110) \ Previously, attempting to glob with a prefix subdir in a pattern like `<subdir>/*` would not match any files. This should now be fixed, and files in `<subdir>` will now be correctly matched. - Fix `failed to collect IDs from parent fields` error when module objects contain fields with nil values by @​jedevc/[@​sipsma](https://togithub.com/sipsma) in [https://github.com/dagger/dagger/pull/8132](https://togithub.com/dagger/dagger/pull/8132) - Fixed enum lists in modules by [@​helderco](https://togithub.com/helderco) in [https://github.com/dagger/dagger/pull/8096](https://togithub.com/dagger/dagger/pull/8096) - Fixed referring to module's own objects/interfaces/enums in constructor signature by [@​jedevc](https://togithub.com/jedevc) in [https://github.com/dagger/dagger/pull/8115](https://togithub.com/dagger/dagger/pull/8115) \ Previously, modules would fail to launch if they declared a constructor that contained a reference to a type from it's own module in it's args. - Fixed using custom enum types as optional arguments by [@​jedevc](https://togithub.com/jedevc) in [https://github.com/dagger/dagger/pull/8148](https://togithub.com/dagger/dagger/pull/8148) \ Previously, function calls that defined an optional argument would not be callable. - Make retrieving secret from command works on Windows by [@​wingyplus](https://togithub.com/wingyplus) in [https://github.com/dagger/dagger/pull/8121](https://togithub.com/dagger/dagger/pull/8121) ##### What to do next? - Read the [documentation](https://docs.dagger.io) - Join our [Discord server](https://discord.gg/dagger-io) - Follow us on [Twitter](https://twitter.com/dagger_io) </details> --- ### Configuration 📅 **Schedule**: Branch creation - "after 4pm on thursday" in timezone America/Los_Angeles, Automerge - At any time (no schedule defined). 🚦 **Automerge**: Enabled. ♻ **Rebasing**: Whenever PR is behind base branch, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check this box --- This PR was generated by [Mend Renovate](https://www.mend.io/free-developer-tools/renovate/). View the [repository job log](https://developer.mend.io/github/scottames/containers). <!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzOC4yNi4xIiwidXBkYXRlZEluVmVyIjoiMzguMjYuMSIsInRhcmdldEJyYW5jaCI6Im1haW4iLCJsYWJlbHMiOlsiZGVwZW5kZW5jaWVzIl19--> --------- Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> Co-authored-by: scottames-github-bot[bot] <162828115+scottames-github-bot[bot]@users.noreply.github.com>
[](https://renovatebot.com) This PR contains the following updates: | Package | Update | Change | |---|---|---| | [dagger/dagger](https://togithub.com/dagger/dagger) | patch | `v0.12.4` -> `v0.12.5` | --- ### Release Notes <details> <summary>dagger/dagger (dagger/dagger)</summary> ### [`v0.12.5`](https://togithub.com/dagger/dagger/blob/HEAD/CHANGELOG.md#v0125---2024-08-15) [Compare Source](https://togithub.com/dagger/dagger/compare/v0.12.4...v0.12.5) ##### Added - cli: allow calling core functions directly by [@​helderco](https://togithub.com/helderco) in [https://github.com/dagger/dagger/pull/7310](https://togithub.com/dagger/dagger/pull/7310) \ Usage: `dagger core <function>` \ Example: `dagger core container from --address=alpine terminal` Works the same as `dagger call`, but instead of loading a user module, it only uses functions from the core API. Run `dagger core --help` for available functions. *Note that this command is experimental and the DX for calling core functions in the CLI may change in the future.* - New SDK aliases for `elixir` and `php` by [@​jedevc](https://togithub.com/jedevc) in [https://github.com/dagger/dagger/pull/8067](https://togithub.com/dagger/dagger/pull/8067) \ SDKs with experimental module support (elixir and php) can now be accessed using `--sdk=<sdk>` (such as `--sdk=elixir` and `--sdk=php` respectively) instead of the full form `--sdk=github.com/dagger/dagger/sdk/<sdk>@​<version>`. - Add `File.digest` method by [@​TomChv](https://togithub.com/TomChv) in [https://github.com/dagger/dagger/pull/8114](https://togithub.com/dagger/dagger/pull/8114) \ This method provides an efficient way to compute a file's digest, which unlock optimized file comparison or check for file changes. - Bundle CLI in the Engine image so that both parts of Dagger (CLI+Engine) ship as a single artefact by [@​gerhard](https://togithub.com/gerhard) in [https://github.com/dagger/dagger/pull/8147](https://togithub.com/dagger/dagger/pull/8147) ##### Changed - Reimplemented the OpenTelemetry data pipeline to avoid hangs and other complications by [@​vito](https://togithub.com/vito) in [https://github.com/dagger/dagger/pull/7996](https://togithub.com/dagger/dagger/pull/7996) ##### Fixed - Fix `Directory.glob` to correctly handle globs with subdir prefixes by [@​jedevc](https://togithub.com/jedevc) in [https://github.com/dagger/dagger/pull/8110](https://togithub.com/dagger/dagger/pull/8110) \ Previously, attempting to glob with a prefix subdir in a pattern like `<subdir>/*` would not match any files. This should now be fixed, and files in `<subdir>` will now be correctly matched. - Fix `failed to collect IDs from parent fields` error when module objects contain fields with nil values by @​jedevc/[@​sipsma](https://togithub.com/sipsma) in [https://github.com/dagger/dagger/pull/8132](https://togithub.com/dagger/dagger/pull/8132) - Fixed enum lists in modules by [@​helderco](https://togithub.com/helderco) in [https://github.com/dagger/dagger/pull/8096](https://togithub.com/dagger/dagger/pull/8096) - Fixed referring to module's own objects/interfaces/enums in constructor signature by [@​jedevc](https://togithub.com/jedevc) in [https://github.com/dagger/dagger/pull/8115](https://togithub.com/dagger/dagger/pull/8115) \ Previously, modules would fail to launch if they declared a constructor that contained a reference to a type from it's own module in it's args. - Fixed using custom enum types as optional arguments by [@​jedevc](https://togithub.com/jedevc) in [https://github.com/dagger/dagger/pull/8148](https://togithub.com/dagger/dagger/pull/8148) \ Previously, function calls that defined an optional argument would not be callable. - Make retrieving secret from command works on Windows by [@​wingyplus](https://togithub.com/wingyplus) in [https://github.com/dagger/dagger/pull/8121](https://togithub.com/dagger/dagger/pull/8121) ##### What to do next? - Read the [documentation](https://docs.dagger.io) - Join our [Discord server](https://discord.gg/dagger-io) - Follow us on [Twitter](https://twitter.com/dagger_io) </details> --- ### Configuration 📅 **Schedule**: Branch creation - "after 4pm on thursday" in timezone America/Los_Angeles, Automerge - At any time (no schedule defined). 🚦 **Automerge**: Enabled. ♻ **Rebasing**: Whenever PR is behind base branch, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check this box --- This PR was generated by [Mend Renovate](https://www.mend.io/free-developer-tools/renovate/). View the [repository job log](https://developer.mend.io/github/scottames/daggerverse). <!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzOC4yNi4xIiwidXBkYXRlZEluVmVyIjoiMzguMjYuMSIsInRhcmdldEJyYW5jaCI6Im1haW4iLCJsYWJlbHMiOlsiZGVwZW5kZW5jaWVzIl19--> --------- Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> Co-authored-by: scottames-github-bot[bot] <162828115+scottames-github-bot[bot]@users.noreply.github.com>
Fixes #7709