Repository navigation
Description
Problem
dagger update doesn't actually update dependencies. It refreshes pins for moving targets, but it can't move a dependency from one release tag to the next.
Discord thread: dagger update does not update dagger dependencies
I would then expect that the
dagger.jsonmanifest would be updated to point to v0.3.0
but it remains at v0.2.0.
dagger updatedoesn't do semver updating
The same gap exists for container images and Git repos used by core APIs: container.from(address: "alpine") means alpine:latest — there's no pinned "latest release" for dagger update to advance.
Solution: treat "latest release" as a pinned dependency
Give "use the latest release" package-manager semantics, on a single lifecycle:
| run | behavior |
|---|---|
| first run | select a release, record it in the lockfile |
| normal run | reuse the recorded release |
dagger update |
re-select and advance the pin |
| frozen run | replay the pin; never hit the remote |
Selection is one algorithm, shared by containers and Git:
- List the remote's tags.
- Pick the greatest semver tag (accept
1.2.3andv1.2.3). - Exclude prereleases unless subreleases are explicitly requested.
- No release tag? Fall back — container: the literal
latesttag; Git: remote HEAD. - Resolve to a digest/commit and pin the full reference.
So container.from(address: "alpine") resolves to docker.io/library/alpine:3.22.0@sha256:abc..., and a later dagger update bumps the lockfile to docker.io/library/alpine:3.23.0@sha256:def....
The lock modes map to the lifecycle: pinned reuses existing latest-release pins, frozen requires them and never lists remote tags/refs, and dagger update refreshes them.
Container
Whether latest-release applies depends on what the address already specifies — parse it before adding any implicit :latest:
| address | resolves to |
|---|---|
alpine |
latest release (the algorithm above) |
alpine:latest |
literal latest tag |
alpine:3.20 |
literal 3.20 tag |
alpine@sha256:... |
the digest |
A tag or digest in the address keeps today's exact behavior. Only a bare address triggers latest-release.
Failure handling: if tag listing fails or is unsupported, fail clearly — don't fall back to latest unless listing succeeded and found no release tag. If the literal latest tag is also missing, fail clearly. latestIncludeSubreleases: true on a tagged or digested address is a validation error.
Git
Latest-release always applies (there's no address to parse). The only delta from the shared algorithm: the fallback when no release tag exists is remote HEAD rather than a latest tag.
Schema
extend type Container {
"""
Download a container image.
If address includes a tag or digest, use that exact reference.
If address has no tag or digest, use the latest release tag. If no release
tag exists, fall back to the literal "latest" tag.
This operation is pinned.
"""
from(
address: String!
latestIncludeSubreleases: Boolean = false
# ...
): Container!
}
extend type GitRepository {
"""
Return the latest release tag. If no release tag exists, fall back to the
remote HEAD branch.
This operation is pinned.
"""
latest(includeSubreleases: Boolean = false): GitRef!
}Lockfile
["","container.from",["docker.io/library/alpine","linux/amd64","latest-release",false],"docker.io/library/alpine:3.22.0@sha256:abc...","pin"]
["","git.latest",["https://github.com/dagger/dagger.git",false],"refs/tags/v0.21.4@0123456789abcdef0123456789abcdef01234567","pin"]The container value must carry both tag and digest; the Git value must carry both ref and commit.
Implementation notes
- Engine-side behavior; SDKs only expose the generated API.
- Container tag listing uses the OCI/Docker registry endpoint
GET /v2/<name>/tags/list. container.fromcurrently appliesreference.TagNameOnly— latest-release must branch before that, and store tag+digest instead of digest-only.GitRepository.latestreuses the existing Git lock/update machinery.
Activity
marcosnils commentedon Jul 15, 2026
cc @tiborvass
tiborvass commentedon Aug 28, 2026
Fixed by #13754