Skip to content

feat: compute file digest - #8114

Merged
TomChv merged 10 commits into
dagger:mainfrom
TomChv:feat/compute-file-digest
Aug 8, 2024
Merged

TomChv merged 10 commits into
dagger:mainfrom
TomChv:feat/compute-file-digest

Conversation

@TomChv

@TomChv TomChv commented Aug 6, 2024

Copy link
Copy Markdown
Member

Fixes #7709

@TomChv
TomChv requested review from jedevc, sipsma and vito August 6, 2024 21:18
@TomChv TomChv self-assigned this Aug 6, 2024
@TomChv
TomChv requested review from a team as code owners August 6, 2024 21:18
Comment thread core/file.go Outdated
}

func (file *File) Digest(ctx context.Context) (string, error) {
content, err := file.Contents(ctx)

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 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

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.

Doesn't BuildKit already have a digest that it uses for caching purposes, that we can reuse 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.

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.

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.

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.

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.

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)
}

Comment thread core/schema/file.go
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).

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.

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.

@jedevc jedevc Aug 7, 2024 •

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.

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).

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.

Is it possible with the buildkit cache digest implementation? I didn't see the options to do so

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.

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 Checksum function

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.

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.

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.

I added the excludeMetadata options with the separate codepath :D

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.

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

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.

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.

@TomChv

TomChv commented Aug 7, 2024

Copy link
Copy Markdown
Member Author

@sipsma I made the changes you asked, hope it improve the implementation :D

@TomChv

TomChv commented Aug 7, 2024

Copy link
Copy Markdown
Member Author

PHP linter works locally so I'm quite confused by the fail in the CI

dagger call -m dev --source=.:default sdk php lint
Full trace at https://dagger.cloud/Quartz/traces/e045e23d3885374f42d894078e3fce12

✔ connect 1.2s
✔ initialize 7.7s
✔ prepare 1.1s
✔ daggerDev(
    source: ✔ ModuleSource.resolveDirectoryFromCaller(path: ".", viewName: "default"): Directory! 0.0s
  ): DaggerDev! 0.3s
✔ DaggerDev.sdk: DaggerDevSdk! 0.3s
✔ DaggerDevSdk.php: DaggerDevPhpsdk! 0.0s
✔ DaggerDevPhpsdk.lint: Void 24.3s

@sipsma sipsma left a comment

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.

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

@TomChv
TomChv force-pushed the feat/compute-file-digest branch from 09c15dc to 53460fe Compare August 8, 2024 10:21
@@ -0,0 +1,6 @@
kind: Added
body: Add `Digest` method to `File`

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.

👀 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 🎉 🎉

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.

Sure

}
}

func (FileSuite) TestDigest(ctx context.Context, t *testctx.T) {

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.

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.

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.

Done :D

@jedevc jedevc left a comment

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.

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.

@TomChv

TomChv commented Aug 8, 2024

Copy link
Copy Markdown
Member Author

I asked for help in the Discord php channel for the lint failure, we need to fix that before merging.

@TomChv

TomChv commented Aug 8, 2024

Copy link
Copy Markdown
Member Author

Tom Chauveau added 9 commits August 8, 2024 17:15
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]>
@TomChv
TomChv force-pushed the feat/compute-file-digest branch from 353d28e to 139eea5 Compare August 8, 2024 15:15
@TomChv

TomChv commented Aug 8, 2024

Copy link
Copy Markdown
Member Author

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.

@sipsma

sipsma commented Aug 8, 2024

Copy link
Copy Markdown
Contributor

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

@TomChv
TomChv merged commit 5140413 into dagger:main Aug 8, 2024
@TomChv
TomChv deleted the feat/compute-file-digest branch August 8, 2024 18:35
@jedevc jedevc mentioned this pull request Aug 9, 2024
scottames referenced this pull request in scottames/dots Aug 22, 2024
[![Mend
Renovate](https://app.renovatebot.com/images/banner.svg)](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
[@&#8203;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
[@&#8203;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>@&#8203;<version>`.
- Add `File.digest` method by
[@&#8203;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
[@&#8203;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 [@&#8203;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
[@&#8203;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
@&#8203;jedevc/[@&#8203;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
[@&#8203;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 [@&#8203;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
[@&#8203;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
[@&#8203;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>
scottames referenced this pull request in scottames/containers Aug 22, 2024
[![Mend
Renovate](https://app.renovatebot.com/images/banner.svg)](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
[@&#8203;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
[@&#8203;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>@&#8203;<version>`.
- Add `File.digest` method by
[@&#8203;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
[@&#8203;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 [@&#8203;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
[@&#8203;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
@&#8203;jedevc/[@&#8203;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
[@&#8203;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 [@&#8203;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
[@&#8203;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
[@&#8203;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>
renovate Bot referenced this pull request in scottames/daggerverse Aug 22, 2024
[![Mend
Renovate](https://app.renovatebot.com/images/banner.svg)](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
[@&#8203;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
[@&#8203;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>@&#8203;<version>`.
- Add `File.digest` method by
[@&#8203;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
[@&#8203;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 [@&#8203;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
[@&#8203;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
@&#8203;jedevc/[@&#8203;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
[@&#8203;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 [@&#8203;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
[@&#8203;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
[@&#8203;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>
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.

Get a file's digest

5 participants