Commit Graph

138 Commits (072078a403ae4106f87f7225c7188f31ec8b6419)

Author SHA1 Message Date
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 1240dd7795 Return committed readonly inputs and actives in exec error in MountIDs
Signed-off-by: Edgar Lee <edgarl@netflix.com>
2020-11-16 13:21:23 -08: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 4c0ca1719f Fix container release not capturing closure of loop variable
Signed-off-by: Edgar Lee <edgarl@netflix.com>
2020-11-13 22:58:49 -08:00
Edgar Lee dfaf613996 Parallelize unlazying ref proxy in the gateway forwarder
Signed-off-by: Edgar Lee <edgarl@netflix.com>
2020-11-13 22:14:05 -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 2d23d0cc43 Fix lint and unit tests for fileopsolver
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 bdcee17437 executor: change mount to struct
Allows readonly passed cleanly.

Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2020-11-02 22:20:51 -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 ecf070a027 exec: use platform specific default path
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2020-10-23 15:30:23 -07:00
Cory Bennett cb12a5642f shutdown container process when context is done
Signed-off-by: Cory Bennett <cbennett@netflix.com>
2020-10-17 06:53:25 +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
Akihiro Suda 78f3e86dc1
Merge pull request #1627 from coryb/gateway-exec-proto
update gateway to add ability to run and exec into containers
2020-10-04 20:11:45 +09:00
Ximo Guanter da8ebc8a39 Make HTTP/2 authority pseudo-header spec-compliant
Signed-off-by: Ximo Guanter <ximo.guanter@gmail.com>
2020-10-03 22:58:21 +02:00
Cory Bennett 398593b61d Simplify rpc exec exit error handling
Signed-off-by: Cory Bennett <cbennett@netflix.com>
2020-10-02 21:35:51 +00:00
Cory Bennett 2f0738c47a Default Cwd to "/"
Signed-off-by: Cory Bennett <cbennett@netflix.com>
2020-10-02 20:54:00 +00: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 e824c5e916 fix linting error
Signed-off-by: Cory Bennett <cbennett@netflix.com>
2020-10-02 07:17:47 +00:00
Cory Bennett 095a919c95 remove unnecessary MountManager interface
Signed-off-by: Cory Bennett <cbennett@netflix.com>
2020-10-02 06:24:34 +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
Tonis Tiigi ebf0194d51 client: allow build callback to return nil result
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2020-09-16 19:36:16 -07:00
Cory Bennett 5fcf6dd426 update gateway exec mount tests to verity ssh and secret mounts
Signed-off-by: Cory Bennett <cbennett@netflix.com>
2020-09-17 00:13:06 +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 dc3d45de87 make GrpcClient implement gateway.client.Client
Signed-off-by: Cory Bennett <cbennett@netflix.com>
2020-09-13 20:41:18 +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 b97b1a58f7 add capability entry for gateway exec
Signed-off-by: Cory Bennett <cbennett@netflix.com>
2020-09-03 05:59:00 +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 bd3354fea3 session: avoid deprecated grpc.Stream type
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 e4aaec2fea package name fixes
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
Tonis Tiigi 8247b7b50b integration: increase timeouts
Set the limit high enough to ensure failure in CI
signals a bug

Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2020-07-17 19:30:40 -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 cc88b8f4f4 increase test context timeouts
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2020-06-06 15:48:55 -07:00
Tonis Tiigi 75d64ffb4a fix proto indentions
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2020-05-18 15:50:08 -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