Sebastiaan van Stijn
67bcfe699a
copy containerd.UnknownExitStatus to local const
...
Copy this const to a local constant to prevent importing the containerd
client in the front-end.
For consistency, I also updated the executor code to use the same const,
although not strictly needed.
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2020-11-18 00:11:09 +01:00
Edgar Lee
3ba6cd7bc2
Fix ExecError.EachRef invoking callback with possibly nil solver.Results
...
Signed-off-by: Edgar Lee <edgarl@netflix.com>
2020-11-13 23:20:41 -08:00
Edgar Lee
c33bcd61a2
Rename OutputIDs to MountIDs
...
Signed-off-by: Edgar Lee <edgarl@netflix.com>
2020-11-13 22:05:13 -08:00
Edgar Lee
bcff7baf60
Allow scratch mounts with gateway.RunContainer
...
- Plumb default worker by adding GetDefault() to frontend.WorkerInfos
- To avoid cyclic dependency, refactor frontend.WorkerInfos to worker.Infos
- Refactor gateway.NewContainer to share code with llbsolver/ops/exec.go
Signed-off-by: Edgar Lee <edgarl@netflix.com>
2020-11-13 22:05:13 -08:00
Edgar Lee
7e1dc9bec1
Refactor to file action indexed outputs
...
Signed-off-by: Edgar Lee <edgarl@netflix.com>
2020-11-13 22:05:13 -08:00
Edgar Lee
7ce58c31ba
Plumb op metadata to recreate failed ops with gateway exec
...
Signed-off-by: Edgar Lee <edgarl@netflix.com>
2020-11-13 22:05:13 -08:00
Tonis Tiigi
e3b05289d8
add session injection to remote loading
...
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2020-11-02 22:20:44 -08:00
Cory Bennett
ffd4ab232e
gateway exec: add platform and worker constraints to NewContainer api
...
Signed-off-by: Cory Bennett <cbennett@netflix.com>
2020-10-28 03:54:49 +00:00
Tonis Tiigi
44f27708b3
frontend: make sure inputs support for frontends is detectable from client
...
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2020-10-04 10:44:16 -07:00
Cory Bennett
d1a14ae768
use grpc typed error for ExitMessage error
...
Signed-off-by: Cory Bennett <cbennett@netflix.com>
2020-10-02 07:36:45 +00:00
Cory Bennett
ea3bc24b7c
Move SecurityMode to InitMessage from NewContainer message so it can be per process
...
Signed-off-by: Cory Bennett <cbennett@netflix.com>
2020-10-02 05:36:33 +00:00
Cory Bennett
03e1c199a3
remove SessonManager from FrontendLLBBridge, adding as arg to Frontend.Solve
...
Signed-off-by: Cory Bennett <cbennett@netflix.com>
2020-10-02 01:59:05 +00:00
Cory Bennett
3cc8aa0649
move ExecOps mounting logic into new package so logic can be reused from gateway exec
...
Signed-off-by: Cory Bennett <cbennett@netflix.com>
2020-09-15 07:01:42 +00:00
Cory Bennett
2a409e2140
fix case on error messages
...
Signed-off-by: Cory Bennett <cbennett@netflix.com>
2020-09-11 20:31:37 +00:00
Cory Bennett
7b4414f72d
remove unnecessary gateway container interface
...
Signed-off-by: Cory Bennett <cbennett@netflix.com>
2020-09-11 17:13:01 +00:00
Cory Bennett
8df17c83cc
cleanup release on error logic for gateway NewContainer
...
Signed-off-by: Cory Bennett <cbennett@netflix.com>
2020-09-01 22:45:20 +00:00
Cory Bennett
355e937e15
update gateway to add ability to run and exec into containers
...
Signed-off-by: Cory Bennett <cbennett@netflix.com>
2020-08-31 21:13:59 +00:00
Tonis Tiigi
5da4a40ae8
lint: enable more linters
...
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2020-07-19 09:28:36 -07:00
Tonis Tiigi
3e9c84ff86
avoid returning private type from public function
...
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2020-07-19 09:28:36 -07:00
Tonis Tiigi
c8190b1518
lint: enable golint
...
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2020-07-19 09:28:24 -07:00
Tonis Tiigi
57a88b0afb
lint: add misspell and unused
...
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2020-07-18 08:13:57 -07:00
Cory Bennett
a23754fca1
Release needs context.TODO() so if ctx is cancelled the refs can be cleaned up
...
Signed-off-by: Cory Bennett <cbennett@netflix.com>
2020-07-17 02:08:03 +00:00
Cory Bennett
6a56695d3a
remove `Get` prefix from Executor/CacheManager funcs and update to avoid naming conflicts
...
Signed-off-by: Cory Bennett <cbennett@netflix.com>
2020-07-17 00:54:15 +00:00
Cory Bennett
453c76d29e
add Run/Exec to FrontendLLBBridge interface
...
Signed-off-by: Cory Bennett <cbennett@netflix.com>
2020-07-16 23:20:14 +00:00
Tonis Tiigi
2e9987ad16
session: track sessions with a group construct
...
Avoid hidden session passing and allow one session to drop when
multiple builds share a vertex.
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2020-07-05 00:15:25 -07:00
Tonis Tiigi
90288ab716
errdefs: update to new packages
...
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2020-04-24 11:25:44 -07:00
Tonis Tiigi
725f5e1207
grpc interceptors for errors
...
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2020-04-22 18:31:32 -07:00
Tonis Tiigi
2fc9aee26f
Revert "grpc: add error handling wrappers to client/server"
...
This reverts commit 3f77f0495b
.
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2020-04-22 18:31:27 -07:00
Tonis Tiigi
e4cc0866f5
gateway: fix error details passing through gateway
...
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2020-04-21 23:46:17 -07:00
Tonis Tiigi
3f77f0495b
grpc: add error handling wrappers to client/server
...
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2020-04-21 23:46:11 -07:00
Tõnis Tiigi
bbd14d2852
Merge pull request #1449 from tonistiigi/gateway-metadata
...
gateway: fix metadata getting lost on subsolve
2020-04-21 10:40:10 -07:00
Tonis Tiigi
37b8832d00
upgrade errors checks to Is()
...
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2020-04-18 22:53:38 -07:00
Tonis Tiigi
6436583992
gateway: fix metadata getting lost on subsolve
...
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2020-04-17 16:13:33 -07:00
Tonis Tiigi
1a9d366b49
llb: asyncronous llb graph generation support
...
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2020-04-03 14:55:10 -07:00
Edgar Lee
5ec7bc7713
Change FrontendInputs in backend API definitions to *pb.Definition
...
Signed-off-by: Edgar Lee <edgarl@netflix.com>
2020-02-24 14:38:01 -08:00
Edgar Lee
7e0f923181
Implement CapFrontendInput to pass llb.States to frontends
...
Signed-off-by: Edgar Lee <edgarl@netflix.com>
2020-02-24 14:38:01 -08:00
Edgar Lee
635e7f0ce0
Change wire format from ref arrays to singular refs while maintaining backwards compatibility
...
Signed-off-by: Edgar Lee <edgarl@netflix.com>
2020-02-21 13:58:28 -08:00
Tonis Tiigi
8cfe2de889
solver: evaluate solve results lazily
...
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2020-02-05 15:29:43 -08:00
Edgar Lee
2edb431a0f
Allow previous solve results to be used in new solves
...
Signed-off-by: Edgar Lee <edgarl@netflix.com>
2020-01-23 11:02:40 -08:00
Edgar Lee
359574093b
Add erroring on multi-result arrays
...
Signed-off-by: Edgar Lee <edgarl@netflix.com>
2019-12-16 14:12:30 -08:00
Edgar Lee
7562a6638a
Fix empty string id in result ref
...
Signed-off-by: Edgar Lee <edgarl@netflix.com>
2019-12-05 11:10:05 -08:00
Edgar Lee
b622a87c5d
Change result type to array of refs
...
Signed-off-by: Edgar Lee <edgarl@netflix.com>
2019-11-19 14:00:32 -08:00
Tonis Tiigi
649f68aae2
gateway: handle grpc errors
...
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2019-05-11 22:42:19 -07:00
Tonis Tiigi
03a2f79561
gateway: allow frontends without network
...
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2019-01-21 19:38:07 -08:00
Akihiro Suda
6e7617e889
support local cache exporter and importer
...
Export:
$ buildctl build ... --export-cache type=local,store=/path/to/output-dir
Import:
$ buildctl build ... --import-cache type=local,store=/path/to/input-dir
Impact on CLI:
* Old (deprecated but still effective): `--export-cache localhost:5000/myrepo:buildcache --export-cache-opt mode=max`
* New: `--export-cache type=registry,ref=localhost:5000/myrepo:buildcache,mode=max`
Impact on API:
* New fields are added to control.proto and gateway.proto. The daemon
internally translates old API calls to the new ones.
* While new API can be used for `registry` caches, the client continues
to use the legacy API for `registry` caches to ensure compatibility with
old daemons.
* To import `local` caches with a frontend, the frontend needs to support
a new frontend opt `cache-imports`.
Signed-off-by: Akihiro Suda <suda.akihiro@lab.ntt.co.jp>
2019-01-19 02:38:26 +09:00
Ian Campbell
b4454a169f
implement `gateway.Reference.StatFile` method
...
Signed-off-by: Ian Campbell <ijc@docker.com>
2018-10-03 12:16:45 +01:00
Ian Campbell
df76f6d380
Move cache/fsutil into a separate cache/util subpackage
...
Signed-off-by: Ian Campbell <ijc@docker.com>
2018-10-03 12:16:44 +01:00
Ian Campbell
b30ee91a53
implement `gateway.Reference.ReadDir` method
...
The alternative is a helper container running e.g. find, capturing the output
to a scratch to be read back (with ref.ReadFile) and parsed.
Signed-off-by: Ian Campbell <ijc@docker.com>
2018-10-03 12:16:44 +01:00
Ian Campbell
53921cf110
llbBridfgeForwarder: Drop refs as they are released in `Discard`.
...
This makes it safe(r) for `Discard` to be called more than once.
Signed-off-by: Ian Campbell <ijc@docker.com>
2018-08-30 15:23:49 +01:00
Ian Campbell
b558d75d3a
Consistently protect `llbBridgeForwarder.refs` with mutex
...
Most accesses to this map are protected. Add the missing locks (some of which
are in code paths where we wouldn't normally expect concurrent accesses, but
better to be safe).
Signed-off-by: Ian Campbell <ijc@docker.com>
2018-08-30 15:03:29 +01:00