waterwheel icon indicating copy to clipboard operation
waterwheel copied to clipboard

generalization of whaterwheel - food for thoughts

Open blaggacao opened this issue 2 years ago • 3 comments

I see very clearly how we can make a decent competitor to https://dagger.io based on this.

@gtrunsec

It could be a combination of:

  • a nix based DSL that improves the ergonomics of writing the against the job json schema - real black magic dependencies based on so called stringContext (local prototype in stock)
  • removal of the hard coded docker driver. a job is just that. a job. It looks for a runtime environment, suitable schedulers are:
    • nsjail for linux -- waaay faster than docker
    • for mac: https://www.karltarvas.com/2020/10/25/macos-app-sandboxing-via-sandbox-exec.html waay waaay faster
    • nomad for efficient massive job scheduling
    • kubernetes
    • docker if all the above (better) options don't work
  • in the vain of the above, it can be considered a bug if a job does not spec it's resource requirements. fallbacks and defaults are ok. ideally a TUI / GUI would be able to run a probe on a pipeline to sample the resource requirements and then spec accordingly. scheduling with out asking for resources is a non-solvable challange for any scheduler under resource / budget constraints
  • to make whaterwheel embeddable into e.g. a local running CLI / TUI, we need a state-less mode, that doesn't depend on a db repository, but well, forgets everything upon exit, for the dagger.io imitation, that's actually pretty great already. Without UI.

blaggacao avatar Apr 20 '22 22:04 blaggacao

removal of the hard coded docker driver.

nix is a perfect tool to transform any job definition and adapt it to any scheduler interface with very little code.

one job - run everywhere (reproducibly & jailed).

blaggacao avatar Apr 20 '22 22:04 blaggacao

A well typed (jsonschema) pipeline spec would make the generation of a DSL a lot more robust. People just love DSLs if they are real QoL improvements.

blaggacao avatar Apr 20 '22 22:04 blaggacao

job jailing

if used for running CI, locally (the dagger tag line), then we also need a way for it to be effectful on the repo root. so namespaced, but with a well defined possiblitiy of effect scoped to the repo root. e.g. code generation, linters, formatters

blaggacao avatar Apr 20 '22 22:04 blaggacao