Skip to content

test: port polyfill e2e checks from sdk-sdk - #3

Merged
TomChv merged 1 commit into
mainfrom
feat/add-old-polyfill-e2e-test
Jul 21, 2026
Merged

TomChv merged 1 commit into
mainfrom
feat/add-old-polyfill-e2e-test

Conversation

@TomChv

@TomChv TomChv commented Jul 21, 2026

Copy link
Copy Markdown
Member

The polyfill module moved here from dagger/sdk-sdk, but its e2e coverage stayed behind in sdk-sdk's polyfill-e2e module. This brings those checks over and merges them with the findConfigDirs checks already here.

Layout

Checks are grouped by the polyfill type they cover, one type per file, hanging off E2E as nested objects so they surface as e-2-e:<group>:<check>:

.dagger/modules/e2e/
  main.dang              type E2E — wires the groups
  utils.dang             type Asserts, type Fixtures
  find-config-dirs.dang  type FindConfigDirsChecks   (5 checks, already here)
  workspace.dang         type WorkspaceChecks        (projection, fork-edit)
  module-config.dang     type ModuleConfigChecks     (5 checks)
  module-source.dang     type ModuleSourceChecks     (generate)

Notes

  • Two workspace styles, on purpose. The ported checks keep the injected ws: Workspace! — forks, changesets, and generation address fixtures from the workspace root. The findConfigDirs checks keep their synthetic asWorkspace(cwd:) workspace, since discovery is anchored at the caller cwd and each case needs a different one.
  • .dagger-dang-sdk-skip-generate at the fixture root is required. The Dang SDK's generateAll scans the whole workspace for dagger.json files declaring sdk.source: "dang", so without the marker the new fixtures are treated as real modules and codegen fails on update/dep-local, which has no .dang files. One marker at the fixture root covers every group via findUp — same convention dang-sdk uses for its own fixtures.
  • Assertions moved onto Asserts and are called statically, like PolyfillWorkspaceSnapshot in the polyfill source. assertContains/assertNotContains became stringContains/stringNotContains to avoid reading as the assertion form of Asserts.contains (list membership).

Test

dagger --x-release=v1.0.0-beta.7 check → 14 passed, clean working tree.

✔ e-2-e:find-config-dirs:ancestor-check        ✔ e-2-e:module-config:remote-update-check
✔ e-2-e:find-config-dirs:exclude-check         ✔ e-2-e:module-config:update-check
✔ e-2-e:find-config-dirs:multi-filename-check  ✔ e-2-e:module-source:generate-check
✔ e-2-e:find-config-dirs:root-check            ✔ e-2-e:workspace:fork-edit-check
✔ e-2-e:find-config-dirs:subdir-check          ✔ e-2-e:workspace:projection-check
✔ e-2-e:module-config:dependency-check         ✔ dagger-dang-sdk:generate-all
✔ e-2-e:module-config:engine-check
✔ e-2-e:module-config:fork-chaining-check

The polyfill module moved here from dagger/sdk-sdk, but its e2e coverage
stayed behind. Bring over the checks from sdk-sdk's polyfill-e2e module
and merge them into this repo's e2e module.

Checks are grouped by the polyfill type they cover, one type per file,
and hang off E2E as nested objects so they surface as
e-2-e:<group>:<check>. Shared assertions and fixture paths live in
utils.dang.

The ported checks keep the injected Workspace argument: forks,
changesets, and generation address fixtures from the workspace root. The
findConfigDirs checks keep their synthetic workspace, since discovery is
anchored at the caller cwd and each case needs a different one.

Add a .dagger-dang-sdk-skip-generate marker at the fixture root. The Dang
SDK's generateAll scans the whole workspace for dagger.json files
declaring sdk.source "dang", so without it the new fixtures are treated
as real modules and codegen fails on update/dep-local, which has no .dang
files.

Signed-off-by: Tom Chauveau <[email protected]>
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.

1 participant