GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — engine: verify no new APIs get added without version gates by matipan · Pull Request #13155 · dagger/dagger

Conversation

@matipan

@matipan matipan commented May 15, 2026 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Contributor

Fixes #13115


Whenever we add new fields or functions we feature gate them so that codegen using future dagger versions doesn't change generated files that target an older version of the engine. However, we never had support for version gating top level objects. I'm not entirely sure if this addition makes sense, but it felt more correct to include it. Otherwise, running dagger generate using a newer engine version but for a module targeting older engine version might still yield a diff that needs to be applied even though the engine version being targeted did not change at all. Up for debate whether its necessary or not though!

There were a few APIs that were introduced since v0.20.6 that were not version gated. That caused dagger generate to generate code for a module targeting v0.20.6 but with newer APIs. Below is a list of the APIs that were added and were missing the version gating:

Gated API surface Why gated Introduced by
Query.cacheVolume(source) Not present in v0.20.6; added with new DAGQL cache-volume persistence model. aa719a10d52ed24d0ed635b82dd9bb26ef83ed26 migrate all caching to dagql (#11856)
Query.cacheVolume(sharing) Not present in v0.20.6; added with new DAGQL cache-volume persistence model. aa719a10d52ed24d0ed635b82dd9bb26ef83ed26 migrate all caching to dagql (#11856)
Query.cacheVolume(owner) Not present in v0.20.6; added with new DAGQL cache-volume persistence model. aa719a10d52ed24d0ed635b82dd9bb26ef83ed26 migrate all caching to dagql (#11856)
Container.withMountedDirectory(readOnly) Not present in v0.20.6; added during the DAGQL/persistable container filesystem mutation migration. aa719a10d52ed24d0ed635b82dd9bb26ef83ed26 migrate all caching to dagql (#11856)
Container.withDirectory(permissions) Not present in v0.20.6; added during the DAGQL/persistable directory-copy migration. aa719a10d52ed24d0ed635b82dd9bb26ef83ed26 migrate all caching to dagql (#11856)
Directory.withDirectory(permissions) Not present in v0.20.6; added during the DAGQL/persistable directory-copy migration. aa719a10d52ed24d0ed635b82dd9bb26ef83ed26 migrate all caching to dagql (#11856)
Query.http(checksum) Not present in v0.20.6; added with the persistent HTTPState HTTP caching model. aa719a10d52ed24d0ed635b82dd9bb26ef83ed26 migrate all caching to dagql (#11856)
Query._httpState Not present in v0.20.6; added as an internal persistable owner for HTTP cache state. aa719a10d52ed24d0ed635b82dd9bb26ef83ed26 migrate all caching to dagql (#11856)
HTTPState object, HTTPStateID, loadHTTPStateFromID Not present in v0.20.6; derived schema surface from the new internal HTTPState object. aa719a10d52ed24d0ed635b82dd9bb26ef83ed26 migrate all caching to dagql (#11856)
Binding.asHTTPState, Env.withHTTPStateInput, Env.withHTTPStateOutput Not present in v0.20.6; dynamically generated helper fields derived from the new HTTPState object. aa719a10d52ed24d0ed635b82dd9bb26ef83ed26 migrate all caching to dagql (#11856)
HTTPState._resolve Not present in v0.20.6; added as the internal resolver for persistent HTTP state. aa719a10d52ed24d0ed635b82dd9bb26ef83ed26 migrate all caching to dagql (#11856)
Query._remoteGitMirror Not present in v0.20.6; added as an internal persistable bare git mirror. aa719a10d52ed24d0ed635b82dd9bb26ef83ed26 migrate all caching to dagql (#11856)
RemoteGitMirror object, RemoteGitMirrorID, loadRemoteGitMirrorFromID Not present in v0.20.6; derived schema surface from the new internal mirror object. aa719a10d52ed24d0ed635b82dd9bb26ef83ed26 migrate all caching to dagql (#11856)
Binding.asRemoteGitMirror, Env.withRemoteGitMirrorInput, Env.withRemoteGitMirrorOutput Not present in v0.20.6; dynamically generated helper fields derived from the new RemoteGitMirror object. aa719a10d52ed24d0ed635b82dd9bb26ef83ed26 migrate all caching to dagql (#11856)
Query._clientFilesyncMirror Not present in v0.20.6; added as an internal persistable filesync mirror. aa719a10d52ed24d0ed635b82dd9bb26ef83ed26 migrate all caching to dagql (#11856)
ClientFilesyncMirror object, ClientFilesyncMirrorID, loadClientFilesyncMirrorFromID Not present in v0.20.6; derived schema surface from the new internal mirror object. aa719a10d52ed24d0ed635b82dd9bb26ef83ed26 migrate all caching to dagql (#11856)
Binding.asClientFilesyncMirror, Env.withClientFilesyncMirrorInput, Env.withClientFilesyncMirrorOutput Not present in v0.20.6; dynamically generated helper fields derived from the new ClientFilesyncMirror object. aa719a10d52ed24d0ed635b82dd9bb26ef83ed26 migrate all caching to dagql (#11856)
Check.checkType Not present in v0.20.6; added to distinguish normal checks from generate-as-checks. 18733b36527851d56bcea43ae8e88e1a78022478 Built-in check for generate functions (#12923)
Module.checks(noGenerate) Not present in v0.20.6; added with generate-as-check support. 18733b36527851d56bcea43ae8e88e1a78022478 Built-in check for generate functions (#12923)
Env.checks(noGenerate) Not present in v0.20.6; added with generate-as-check support. 18733b36527851d56bcea43ae8e88e1a78022478 Built-in check for generate functions (#12923)
Workspace.checks(noGenerate) Not present in v0.20.6; added with generate-as-check support. 18733b36527851d56bcea43ae8e88e1a78022478 Built-in check for generate functions (#12923)
Workspace.update Not present in v0.20.6; added with workspace lockfile support. 3dcdc50d9c35edfe477ccfe7d47f0c0b840e35fe Dagger lockfile (#12046)

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@matipan
matipan requested review from a team as code owners May 15, 2026 16:28
@matipan
matipan marked this pull request as draft May 15, 2026 16:28
@matipan
matipan force-pushed the feature-gate-new-apis branch 2 times, most recently from 9fc3101 to 396c6f0 Compare May 15, 2026 19:30
@matipan
matipan marked this pull request as ready for review May 15, 2026 20:13
@matipan
matipan requested review from marcosnils and tiborvass May 15, 2026 20:14
@tiborvass tiborvass added this to the v0.21.0 milestone May 19, 2026
@matipan
matipan force-pushed the feature-gate-new-apis branch from 396c6f0 to a58645f Compare May 20, 2026 13:16
@matipan
matipan requested a review from a team as a code owner May 20, 2026 13:16
@matipan
matipan force-pushed the feature-gate-new-apis branch from a58645f to 4771982 Compare May 20, 2026 14:53
@matipan

matipan commented May 20, 2026

Copy link
Copy Markdown
Contributor Author

Not sure if someone more familiar with codegen can take a closer look and make sure this kind of gating is in fact what we want, maybe @sipsma? I've committed the files generated by dagger generate using an engine built from this PR, not sure if that is how things are usually done when changing how codegen works in general.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@matipan
engine: add version gates to new APIs
fd87513
Signed-off-by: Matias Pan <[email protected]>
@matipan
matipan requested a review from sipsma May 20, 2026 19:14
@matipan
matipan force-pushed the feature-gate-new-apis branch 2 times, most recently from 28f7c65 to bf4c99d Compare May 20, 2026 19:16
@matipan matipan changed the title engine: add version gates to new APIs engine: verify no new APIs get added without version gates May 21, 2026
@matipan

matipan commented May 21, 2026

Copy link
Copy Markdown
Contributor Author

@tiborvass found a new issue that is very related to this in the context of Dagger Cloud. There is one organization that has a v0.19.11 module and they apparently define a Workspace type in their module that they use as a field on a struct. Module loading is failing for them because the "Workspace" keyword is reserved for our own workspace object. That keyword was added without any version gates so its being generated by the newer dagger engine. Did not think about this particular issue, but it makes it even more relevant to always version gate.

Maybe we should change the focus of this PR to only be about adding the "must be version gated" test and we can see about fixing all the APIs that weren't version gated on a follow up PR. That way we can keep the surface of this PR smaller and introduce the test ASAP.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@matipan
engine: base schema allow list test
28d4232
Signed-off-by: Matias Pan <[email protected]>
@matipan
matipan force-pushed the feature-gate-new-apis branch from bf4c99d to 28d4232 Compare May 21, 2026 16:33
@tiborvass tiborvass modified the milestones: v0.21.0, v0.21.1 May 21, 2026
@matipan

matipan commented May 21, 2026

Copy link
Copy Markdown
Contributor Author

We discussed with @tiborvass and @sipsma and concluded that we don't want to introduce a versioning-related change just before a release. We concluded there's two separate issues that got mixed:

  • dagger-dev:generated failing: we configured an engine from main for our organization to validate Theseus. This caused the generated check to be out of sync compared to what was being tested on clients themselves. While the change we added here would fix it, bumping our org to a stable engine would have also fixed it for us
  • Non-pinned module codegen: because we don't version gate every change it might be that APIs introduced in newer engines break older module even when the API is considered "backwards compatible". The example we recently faced is reserved keywords. If a user using an older version has a type whose name gets used in a future one, loading that module with the newer engine will fail. As its happening right now for one dagger cloud organization.

Eventually we want a mechanism that guarantees that any change made to the API is version gated such that codegen never breaks, but we agreed that prior to 1.0 its not that big of a deal that we continue on in the current state. The only a user can hit this issue is if they are using an newer engine for an older module OR if they are using generatedContextDirectory for codegen instead of dagger develop.

We talked about introducing a mechanism similar to what Go does to keep track of what gets added when, but did not polish the idea either.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@sipsma sipsma removed this from the v0.21.1 milestone May 28, 2026
@sipsma sipsma added this to the v0.21.2 milestone May 28, 2026
@tiborvass tiborvass mentioned this pull request May 29, 2026
core: bump legacy ID view to < v0.22.0 #13260
Merged
@marcosnils marcosnils modified the milestones: v0.21.2, v1.0.0, v0.21.3, v0.21.4, v0.21.5 May 30, 2026
@marcosnils marcosnils modified the milestones: v0.21.5, v0.21.6 Jun 9, 2026
This was referenced Jun 11, 2026
Regenerate Dagger clients for CI infra #13416
Closed
engine: finish API version gates #13418
Merged
@tiborvass tiborvass closed this in #13418 Jun 13, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

@tiborvass tiborvass Awaiting requested review from tiborvass
@marcosnils marcosnils Awaiting requested review from marcosnils
@sipsma sipsma Awaiting requested review from sipsma

Uh oh!

There was an error while loading. Please reload this page.

Assignees

No one assigned

Labels

None yet

Projects

None yet

Milestone

v0.21.6

Development

Successfully merging this pull request may close these issues.

dagger generate should generate bindings for the module's engine version

Uh oh!

There was an error while loading. Please reload this page.

4 participants

@matipan @tiborvass @marcosnils @sipsma
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
You are visitor 01402775 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.