10BC0 toolchains: dynamic checks for go and engine-dev by shykes · Pull Request #11686 · dagger/dagger · GitHub
[go: up one dir, main page]

Skip to content

Conversation

@shykes
Copy link
Contributor
@shykes shykes commented Jan 14, 2026

This PR depends on #11685, please merge that first

POC implementation of dynamic checks in our go and engine-dev toolchains. This is still experimental and unfinsihed.

  • Each top-level test or test suite appears as its own check
  • dagger check can select individual test suites to run with standard check filtering syntax
  • When running all checks, each test suite is run as an individual execution of go test (note: too much overhead?)

Changes

Go toolchain

  • Tests() returns []*TestDirectory grouped by directory
  • Each Test has a +check decorated Run() method
  • Uses Source.Search() for fast regex-based test discovery
  • Pre-builds container and shares across tests via WithWorkdir()

Engine-dev toolchain

  • Tests() returns []*TestDirectory with individual Test objects
  • Each Test has a +check decorated Run() method
  • TestNames() helper for debugging object construction performance
  • Preserved monolithic Test() function for backward compatibility

Known issues

  • Test container rebuilt per test in engine-dev (FIXME: share lazily)
  • Listing tests is slow due to eager object construction

Dependencies

Refactor the checks system to support dynamic checks from toolchains.

Key changes:
- Replace walkObjectChecks with ModTree abstraction for traversing module trees
- Rename FnTreeNode to ModTreeNode with simplified structure
- Add support for walking arrays of objects with +check methods
- Add --all/-a flag to dagger check to enumerate dynamic checks
- Include dynamic checks in aggregate listing even without --all
- Fix TUI display for aggregate check execution
- Add modtree path matching tests

Signed-off-by: Solomon Hykes <solomon@dagger.io>
Add dynamic test enumeration to the Go toolchain using +check decorator.

Changes:
- Tests() returns []*TestDirectory grouped by directory
- Each Test has a +check decorated Run() method
- Use Source.Search() for fast regex-based test discovery
- Pre-build container and share across tests via WithWorkdir()

Signed-off-by: Solomon Hykes <solomon@dagger.io>
Add test splitting to engine-dev toolchain for parallel test execution.

Changes:
- Tests() returns []*TestDirectory with individual Test objects
- Each Test has a +check decorated Run() method
- TestNames() helper for debugging object construction performance
- Preserved monolithic Test() function for backward compatibility

Known issues:
- Test container rebuilt per test (FIXME: share lazily)
- Listing tests is slow due to eager object construction

Signed-off-by: Solomon Hykes <solomon@dagger.io>
@shykes shykes force-pushed the ci-dynamic-checks branch from 67169f8 to 4936758 Compare January 14, 2026 03:41
@shykes shykes force-pushed the check-plumbing branch 3 times, most recently from 0e34028 to 75ff5ff Compare January 21, 2026 17:37
@eunomie eunomie force-pushed the check-plumbing branch 3 times, most recently from cd301a6 to a75aca3 Compare January 28, 2026 10:51
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.

2 participants

0