Commit Graph

628 Commits (bc07b2b81b1c6a62d29981ac564b16a15ce2bfa7)

Author SHA1 Message Date
Tonis Tiigi ba923cd67d hack: fix release script
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2020-10-06 23:42:37 -07:00
Akihiro Suda 0e916c2697
Merge pull request #1717 from tonistiigi/run-mount-stable
dockerfile: update run mounts to stable channel
2020-10-06 08:19:03 +09:00
Tonis Tiigi 906e34510d dockerfile: update run mounts to stable channel
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2020-10-04 22:22:08 -07: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 c810b8ed25 dockerfile: allow multiple values for ARG
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2020-09-22 11:56:51 -07: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
Tonis Tiigi b18c08c4ab fix tests after busybox update
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2020-09-11 23:24:55 -07: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
Wang Yumu 882fc73790 build-arg add support BUILDKIT_SYNTAX
Signed-off-by: Wang Yumu <37442693@qq.com>
2020-08-18 18:05:57 +08:00
Paul "TBBle" Hampson 31195373cf Don't rely on sh being in the PATH on Windows for tests
Signed-off-by: Paul "TBBle" Hampson <Paul.Hampson@Pobox.com>
2020-07-28 18:07:20 +10: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 04233f90b3 replace gometalinter with golangci linter
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2020-07-18 08:13:48 -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 441b76947b update FrontendLLBBridge to be composed of Executor
Signed-off-by: Cory Bennett <cbennett@netflix.com>
2020-07-17 01:05:22 +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
Paul "TBBle" Hampson 25f50eb711 Wrap original error when failing to read download context
Signed-off-by: Paul "TBBle" Hampson <Paul.Hampson@Pobox.com>
2020-07-17 02:35:16 +10:00
Paul "TBBle" Hampson 156d66da02 Revert "Pin containerd runtime to v1"
This reverts commit 9290c15ffc.

This was pinned during the upgrade to containerd 1.3 series, which
changed the default runtime on Linux to io.containerd.runc.v2.

No specific rationale was listed for this pinning, and clearly it's the
wrong thing to do in the presence of Windows, which does not have this
runtime.

Instead, we rely on the containerd-internal defaults, which distinguish
the runtimes for Linux and Windows.

Signed-off-by: Paul "TBBle" Hampson <Paul.Hampson@Pobox.com>
2020-07-16 15:06:20 +10: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
Erik Sipsma 463ec47ba0 client test: Fix check for whether sandbox has containerd
Before this, the check was always returning that containerd wasn't running and
thus skipping the rest of several test cases.

Signed-off-by: Erik Sipsma <erik@sipsma.dev>
2020-06-21 20:42:53 -07:00
Chenbin b7fd382230 add chmod in COPY and ADD command
Signed-off-by: Chenbin <chen.bin11@zte.com.cn>
2020-06-10 21:37:46 +08:00
Tonis Tiigi cc88b8f4f4 increase test context timeouts
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2020-06-06 15:48:55 -07:00
Edgar Lee 7c81e16b8a Fix duplicate source maps and fix issue preventing multiple locations per source map
Signed-off-by: Edgar Lee <edgarl@netflix.com>
2020-05-20 18:48:20 -07:00
Edgar Lee 59fa9fc9a0 Allow multiple source locations to be added as a constraint
Signed-off-by: Edgar Lee <edgarl@netflix.com>
2020-05-20 16:48:44 -07:00
Edgar Lee 7a90a36b46 Support multiple source maps and locations for source-level stacktraces
Signed-off-by: Edgar Lee <edgarl@netflix.com>
2020-05-20 16:17:35 -07:00
Tonis Tiigi 6dee7ee0fc dockerfile: add source mapping tests
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2020-05-19 17:22:21 -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 e536302180 dockerfile: keep mapping on #syntax error
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2020-05-18 15:50:08 -07:00
Tonis Tiigi 6073e6cff3 llb: enable source tracking
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2020-05-18 15:50:03 -07:00
Tonis Tiigi 1f9599aba3 llb: move source mapping to llb metadata
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2020-05-18 15:49:41 -07:00
Jörg Franke 5f23bdf9d0 Expand chown value of ADD command
Signed-off-by: Jörg Franke <359489+NewJorg@users.noreply.github.com>
2020-05-02 19:37:23 +02: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 4b2636acca dockerfile: add more source information to errors
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2020-04-21 23:46:17 -07:00
Tonis Tiigi abbda4e941 errdefs: attach source to an error
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2020-04-21 23:46:17 -07:00
Tonis Tiigi cce301badd solver: attach causing vertex in an error
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2020-04-21 23:46:17 -07:00
Tonis Tiigi ae3b75d56d errdefs: report component version in stack
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2020-04-21 23:46:17 -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
Tonis Tiigi bb484dcce3 dockerfile: remove IsUnknownInstruction
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2020-04-21 10:44:24 -07:00
Tõnis Tiigi 29ade013e1
Merge pull request #1452 from tonistiigi/parse-errors
dockerfile: include parser error location
2020-04-21 10:40:25 -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 e2835e55ad dockerfile: store error location in instructions parser
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2020-04-19 20:56:31 -07:00
Tonis Tiigi ea7a9146a2 dockerfile: include parser error location
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2020-04-19 15:54:58 -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 de5af7d6c2 gateway: add cap to detect metadata support
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2020-04-17 16:18:47 -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 c157d8a3ef dockerfile: remove mix of testing frameworks
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2020-04-14 22:05:41 -07:00
Tonis Tiigi f2307db707 dockerfile: nicer subtest cases in parser tests
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2020-04-14 22:05:41 -07:00
Tonis Tiigi 7c0493de8d dockerfile: fix parsing multiple directives
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2020-04-14 22:04:53 -07:00
Sam Whited c62983bbde all: run integration tests against dockerd
Signed-off-by: Sam Whited <sam@samwhited.com>
2020-04-08 23:27:17 -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
Andrea Luzzardi e7150dcfef dockerfile: forward FrontendInputs to the gateway
Signed-off-by: Andrea Luzzardi <aluzzardi@gmail.com>
2020-03-26 17:38:12 -07:00
Pratik Raj 2910de68b1 optimization debian package manager tweaks
By default, Ubuntu or Debian based "apt" or "apt-get" system installs recommended but not suggested packages .

By passing "--no-install-recommends" option, the user lets apt-get know not to consider recommended packages as a dependency to install.

This results in smaller downloads and installation of packages .

Refer to blog at [Ubuntu Blog](https://ubuntu.com/blog/we-reduced-our-docker-images-by-60-with-no-install-recommends) .

Signed-off-by: Pratik Raj <rajpratik71@gmail.com>
2020-03-11 15:27:54 +05:30
Akihiro Suda 7b579cdb98 vendor: update containerd (and various packages)
Signed-off-by: Akihiro Suda <akihiro.suda.cz@hco.ntt.co.jp>
2020-02-28 10:24:10 +09:00
Tonis Tiigi a60ecfa4ae vendor: restore dependency versions
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2020-02-24 17:31:01 -08:00
Zach Badgett 1efe7b145d Fix docker dependencies
Signed-off-by: Zach Badgett <zach.badgett@gmail.com>
2020-02-24 15:47:32 -08: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
Tibor Vass adde225dcb
Merge pull request #1180 from Code0x58/expand-expansion
Expand shell variable expansion - add mandatory variables
2020-02-20 17:26:06 -08:00
Akihiro Suda 2f5ad30ae5
Merge pull request #1351 from tonistiigi/security-devices
mount whitelist of devices on insecure security mode
2020-02-14 16:52:26 +09:00
wingkwong 37628cd117 Fix typos
Signed-off-by: wingkwong <wingkwong.code@gmail.com>
2020-02-10 20:59:04 +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
Tonis Tiigi 8f52339933 dockerfile: add test for whitelisted devices
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2020-01-30 18:43:04 -08:00
Edgar Lee c83e8bf2a9 Add gateway apicap for CapReferenceOutput and move reference llb.Output to method ToOutput()
Signed-off-by: Edgar Lee <edgarl@netflix.com>
2020-01-23 11:36:30 -08:00
Edgar Lee f937656b1a Verify platform is stored in state directly in defop test
Signed-off-by: Edgar Lee <edgarl@netflix.com>
2020-01-23 11:02:40 -08:00
Edgar Lee 0a76749067 Add platform defop test, force renames in copy tests, and move forwarded solve test to dockerfile package
Signed-off-by: Edgar Lee <edgarl@netflix.com>
2020-01-23 11:02:40 -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
Akihiro Suda 2949a7d442
Merge pull request #1324 from tonistiigi/onbuild-clear
dockerfile: clear onbuild rules after triggering
2020-01-15 12:30:14 +09:00
Akihiro Suda e7d97db9aa
Merge pull request #1329 from hinshun/fix/1327
Detect support for protobuf array ref on server on frontend return call
2020-01-15 12:24:56 +09:00
Edgar Lee d81832cf6c Detect support for protobuf array ref on server on frontend return call
Signed-off-by: Edgar Lee <edgarl@netflix.com>
2020-01-14 17:16:21 -08:00
Tonis Tiigi 393f388ed3 dockerfile: clear onbuild rules after triggering
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2020-01-13 17:09:28 -08:00
Akihiro Suda f7cf4823f7
Merge pull request #1269 from hinshun/ref-array
Change result type to array of refs
2019-12-18 12:32:27 +09: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
Sebastiaan van Stijn 2105de3499
frontend/dockerfile: show original stagename in error-message
Before this change, the error message would show the invalid name in lowercase:

    docker build -<<'EOF'
    FROM busybox AS foo:$BAR
    EOF

    [+] Building 0.2s (2/2) FINISHED
    => [internal] load build definition from Dockerfile                                                                                                                                                                                                                                                                                                             0.0s
    => => transferring dockerfile: 67B                                                                                                                                                                                                                                                                                                                              0.0s
    => [internal] load .dockerignore                                                                                                                                                                                                                                                                                                                                0.1s
    => => transferring context: 2B                                                                                                                                                                                                                                                                                                                                  0.0s
    failed to solve with frontend dockerfile.v0: failed to create LLB definition: Dockerfile parse error line 1: invalid name for build stage: "foo:$bar", name can't start with a number or contain symbols

With this patch, the invalid stagename is shown as-is

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2019-11-26 13:50:40 +01:00