Commit Graph

23 Commits

Author SHA1 Message Date
Andrea Luzzardi
81ec746d2c core: component -> task
Signed-off-by: Andrea Luzzardi <aluzzardi@gmail.com>
2021-11-24 16:58:24 -08:00
Andrea Luzzardi
608f254449 runtime: support legacy Pipelines in new execution engine
Signed-off-by: Andrea Luzzardi <aluzzardi@gmail.com>
2021-11-24 16:51:52 -08:00
Andrea Luzzardi
b5e2ba63c6 runner: fix empty CUE value check
Signed-off-by: Andrea Luzzardi <aluzzardi@gmail.com>
2021-11-24 16:08:40 -08:00
Andrea Luzzardi
a61e8dcb62 prepare the transition to #Plan.context
This change helps the transition between `dagger input` and `#Plan.context`.

In summary, the codebase now relies on a *context* for execution with mapping to *IDs*.
In the future, *context* will come from a `#Plan.context`.
In the meantime, a bridge converts `dagger input` to a plan context. This allows both *old* and *new* style configurations to co-exist with the same underlying engine.

- Implement `plancontext`. Context holds the execution context for a plan. Currently this includes the platform, local directories, secrets and services (e.g. unix/npipe).
- Contextual data can be registered at any point. In the future, this will be done by `#Plan.context`
- Migrated the `dagger input` codebase to register inputs in a `plancontext`
- Migrated low-level types/operations to the *Context ID* pattern.
  - `dagger.#Stream` now only includes an `id` (instead of `unix` path)
  - `dagger.#Secret` still includes only an ID, but now it's based off `plancontext`
  - `op.#Local` now only includes an `id` (instead of `path`, `include`, `exclude`.

Signed-off-by: Andrea Luzzardi <aluzzardi@gmail.com>
2021-11-19 11:29:38 -08:00
Andrea Luzzardi
53b588029b remove forgotten debug printf
Signed-off-by: Andrea Luzzardi <aluzzardi@gmail.com>
2021-11-12 17:27:26 -08:00
Tom Chauveau
a63c4e989a
Change "arch" into "platform" because it's more accurate.
Signed-off-by: Tom Chauveau <tom.chauveau@epitech.eu>
2021-11-05 16:21:21 +01:00
Tom Chauveau
4a461a0021
Fix engine to don't write architecture in values.yaml if no one provided.
Signed-off-by: Tom Chauveau <tom.chauveau@epitech.eu>
2021-10-30 12:07:33 +02:00
Tom Chauveau
caa03a37cc
Update dagger engine to uses a given architecture instead of default one.
Check #1071 for more details

Signed-off-by: Tom Chauveau <tom.chauveau@epitech.eu>
2021-10-22 21:02:12 +02:00
Andrea Luzzardi
e37f8c5e53 pipeline: analysis: ignore CUE errors
Signed-off-by: Andrea Luzzardi <aluzzardi@gmail.com>
2021-10-20 14:37:31 -07:00
Andrea Luzzardi
c08f619b02 Fix local directory error handling
Signed-off-by: Andrea Luzzardi <aluzzardi@gmail.com>
2021-10-20 11:38:42 -07:00
Andrea Luzzardi
dd1bf18ec2 logger: TTY logs support (live update)
Signed-off-by: Andrea Luzzardi <aluzzardi@gmail.com>
2021-10-05 15:38:34 -07:00
Andrea Luzzardi
b8dcc02bb8 performance: compile CUE client side
Restructured the compile logic to happen on the CLI instead of the
BuildKit frontend.

- Avoid uploading the entire workspace to BuildKit on every compilation
- Let the CUE loader scan the files instead of going through the
  BuildKit filesystem gRPC APIs.

Signed-off-by: Andrea Luzzardi <aluzzardi@gmail.com>
2021-08-20 16:34:49 +02:00
Alvise
99d2514aaa Move to OpenTelemetry
Signed-off-by: Alvise <vitalvise@gmail.com>
2021-07-09 09:47:36 +02:00
Andrea Luzzardi
f58ee5811b universe vendoring
Rather than injecting universe at runtime, this change will vendor
alpha.dagger.io in `cue.mod` directly.

Fixes #700

Signed-off-by: Andrea Luzzardi <aluzzardi@gmail.com>
2021-07-08 17:52:21 +02:00
Andrea Luzzardi
6e215b194e use the workspace as the plan module
Signed-off-by: Andrea Luzzardi <aluzzardi@gmail.com>
2021-07-07 13:12:10 +02:00
Andrea Luzzardi
f39a88e644 cue native: environments can reference a module instead of embedding
one.

Fixes #631

Signed-off-by: Andrea Luzzardi <aluzzardi@gmail.com>
2021-06-16 18:58:56 +02:00
Sam Alba
7b4421b9a0 cmd/doc: boiler plate and for inputs / outputs scanning
Signed-off-by: Sam Alba <sam.alba@gmail.com>
2021-06-04 09:01:32 +02:00
Sam Alba
06a515f496 environments only ignore the compute layer if it is empty instead of logging a fatal error
Signed-off-by: Sam Alba <sam.alba@gmail.com>
2021-06-01 14:14:45 +02:00
Sam Alba
efb4ee209e cmd/up: disable output list when not a tty + better error handling
Signed-off-by: Sam Alba <sam.alba@gmail.com>
2021-05-31 18:25:58 +02:00
Sam Alba
6e3ec02ceb added support for output scanning
Signed-off-by: Sam Alba <sam.alba@gmail.com>
2021-05-31 15:24:42 +02:00
Andrea Luzzardi
9c0e2d1d95 buildkit secrets support
- Secrets are never exposed in plaintext in the Cue tree. `dagger query`
  won't dump secrets anymore, Cue errors won't contain them either.
- BuildKit-native secrets support through a new `mount` type. This
  ensures secrets will never be part of containerd layers, buildkit
  cache and generally speaking will never be saved to disk in plaintext.
- Updated netlify as an example
- Added tests
- Changed the Cue definition of a secret to:

```
	@dagger(secret)

	id: string
}
```

This is to ensure both that setting the wrong input type on a secret
(e.g. `dagger input text`) will fail, and attempting to misuse the
secret (e.g. interpolating, passing as an env variable, etc) will also
fail properly.

Signed-off-by: Andrea Luzzardi <aluzzardi@gmail.com>
2021-05-27 19:14:08 -07:00
Sam Alba
eba35e285b environment inputs scanning can now scan including the user inputs with the plan
Signed-off-by: Sam Alba <sam.alba@gmail.com>
2021-05-27 18:45:24 +02:00
Andrea Luzzardi
af776b8abe cleanup: move packages to top level, change vanity URL
Signed-off-by: Andrea Luzzardi <aluzzardi@gmail.com>
2021-05-25 16:54:00 -07:00