Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add Dagger runtime #259

Merged
merged 25 commits into from
Nov 27, 2022
Merged

add Dagger runtime #259

merged 25 commits into from
Nov 27, 2022

Conversation

vito
Copy link
Owner

@vito vito commented Nov 23, 2022

Adds a new Dagger runtime alongside the existing Buildkit runtime.

Note that this isn't yet feature complete, but I'd like to merge what's done so far. Dagger has proven to be a perfect for this, aside from the missing functionality. The runtime implementation is tiny!

To use the Dagger runtime, add this to ~/.config/bass/config.json:

{
  "runtimes": [
    {
      "platform": {"os": "linux"},
      "runtime": "dagger"
    }
  ]
}

All the basics are implemented and tested, but there are substantial things missing:

  • Services support (container-to-container DNS)
  • TLS support
  • Secrets support
  • Showing progress (so the UX sucks atm)
  • Stable timestamps in thunk outputs
  • Cache access isn't synchronized; allows multiple concurrent readers/writers
  • Subpaths of caches cannot be mounted; only the toplevel
  • Running a thunk from an OCI image archive

Each of these has a corresponding failing runtime test. The tests are skipped for now in CI.

The Buildkit runtime will stick around, and will remain tested with the same rigor - the shared runtime suite is very handy for that! Someday though it might make sense for the Dagger runtime to become the default, since Dagger will receive a lot of investment in out-of-the-box ease-of-use that Buildkit is unlikely to receive. We'll see how it goes.

@vito vito force-pushed the dagger branch 2 times, most recently from 6c12d2a to c805b2d Compare November 23, 2022 03:45
simpler this way, keeps in sync with dagger which needs stable version
* fix exec'ing before mounts are added
* support thunk dir
* support thunk env
* support mounting thunk files
* support mounting fspaths
this was a temporary measure, will just use config now
repl had no pool, flag-only commands wouldn't run
knew this would backfire immediately
totally not worth trying to do the old engine stuff anymore now that
the engine runs in a separate image with special OCI runtimes and etc.
can probably do this by running a dagger session in bass once we figure
that out
this was caused by the need to hook up a progress sink as soon as
creating the Dagger runtime, rather than on each call.
@vito vito added the enhancement New feature or request label Nov 27, 2022
@vito vito merged commit 836efe1 into main Nov 27, 2022
@vito vito deleted the dagger branch November 27, 2022 18:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant