Commit Graph

12 Commits

Author SHA1 Message Date
Tom Chauveau
39ec4a0a2f
Fix waiting group in client runner
Signed-off-by: Tom Chauveau <tom.chauveau@epitech.eu>
2021-08-20 18:39:12 +02: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
Tom Chauveau
9adeecd005
Fix data race issue by synchronizing events channel through waiting group
Previously, there was a data race condition error when `op
.#PushContainer` was called. It was because of the `Export` func
in `solver.go` that create a sub build pipeline and forward his
events to the main events channel (that catch all events that we log).
To fix it, channel are now split between build pipeline and
centralize into the old output channel (`ch`).

Signed-off-by: Tom Chauveau <tom.chauveau@epitech.eu>
2021-08-20 15:33:15 +02:00
Tom Chauveau
22a9445455
Track data race error
Signed-off-by: Tom Chauveau <tom.chauveau@epitech.eu>
2021-08-20 14:09:32 +02:00
Andrea Luzzardi
67d5609aee support buildkit cache export/import
- Add support for buildkit cache export/import
- Enable GHA cache for universe test (using buildkit v0.9 GHA support)

Signed-off-by: Andrea Luzzardi <aluzzardi@gmail.com>
2021-07-28 14:28:20 +02:00
Sam Alba
ac32d6f57b buildkit client does not return environment to force the caller to implement its logic in the build callback
Signed-off-by: Sam Alba <sam.alba@gmail.com>
2021-07-13 16:15:34 +02:00
Alvise
99d2514aaa Move to OpenTelemetry
Signed-off-by: Alvise <vitalvise@gmail.com>
2021-07-09 09:47:36 +02:00
Andrea Luzzardi
4d9ef37b48 log stderr output as INFO
Fixes #241

Signed-off-by: Andrea Luzzardi <aluzzardi@gmail.com>
2021-06-22 12:48:42 +02:00
Andrea Luzzardi
ac34df319a docker socket forwarding support
- This PR adds a new mount type: `docker.sock` (in addition to `cache`
  and `tmp`)
- It's then able to mount the LOCAL (as in, from the machine running
  dagger) docker socket inside the container by pretending to be an SSH
  Agent (hijacking the SSH agent forwarding support of buildkit)

Signed-off-by: Andrea Luzzardi <aluzzardi@gmail.com>
2021-06-04 16:14:25 -07:00
Andrea Luzzardi
ebbc9707ec automatically redact secrets from logs
Signed-off-by: Andrea Luzzardi <aluzzardi@gmail.com>
2021-05-29 02:18:01 -07: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
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