Commit Graph

2282 Commits (ea7a9146a294f210adba4156005ea6716c28ae24)

Author SHA1 Message Date
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
Tõnis Tiigi 4ae4bcd6a0
Merge pull request #1446 from vladaionescu/patch-1
Add Earthly as project using buildkit
2020-04-16 22:09:31 -07:00
Tõnis Tiigi d6d668b030
Merge pull request #1447 from tonistiigi/test-unbreak
hack: unbreak testing
2020-04-16 16:35:43 -07:00
Tonis Tiigi f4cf0d3918 hack: unbreak testing
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2020-04-16 15:26:53 -07:00
Vlad A. Ionescu f928f4f7d7 Add Earthly as project using buildkit
Signed-off-by: Vlad A. Ionescu <vladaionescu@users.noreply.github.com>
2020-04-16 14:33:39 -07:00
Tõnis Tiigi 2848f15146
Merge pull request #1444 from tonistiigi/entitlement-errors
entitlements: separate daemon and client errors
2020-04-15 15:41:26 -07:00
Tibor Vass aed8016c25
Merge pull request #1442 from tonistiigi/dockerfile-tests-refactor
dockerfile: old parser tests refactor
2020-04-15 15:33:22 -07:00
Tonis Tiigi 54c55e6aa9 entitlements: separate daemon and client errors
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2020-04-15 15:28:31 -07:00
Akihiro Suda ed5d44bc1b
Merge pull request #1441 from tonistiigi/directives-parser
dockerfile: fix parsing multiple directives
2020-04-16 03:11:02 +09:00
Akihiro Suda ec5d112053
Merge pull request #1435 from thaJeztah/default_no_trunc
progress: disable truncating by default when using --progress=plain
2020-04-16 02:54:22 +09:00
Tonis Tiigi 4103a7478b vendor: remove unused packages
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2020-04-14 22:05:41 -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
Tõnis Tiigi 462d7ceb41
Merge pull request #1434 from tonistiigi/dockerd-tests
[carry] run integration tests against dockerd
2020-04-14 09:05:36 -07:00
Edgar Lee ae7ff7174f
Merge pull request #1437 from hinshun/defop-mutex
Protect defop map when marshalling concurrently
2020-04-12 09:35:42 -07:00
Edgar Lee 8ff11ce5c0 Protect defop map when marshalling concurrently
Signed-off-by: Edgar Lee <edgarl@netflix.com>
2020-04-10 16:22:08 -07:00
Sebastiaan van Stijn 75ab2b1137
progress: disable truncating by default when using --progress=plain
Currently, `docker build --progress=plain` truncates output, which makes it
difficult to debug problems during build (the step that failed may not be the
cause of the failure).

For example, in the following build, the output of the `RUN echo ...` is truncated:

    DOCKER_BUILDKIT=1 docker build --no-cache --progress=plain -t foo -<<EOF
    FROM busybox
    RUN echo "Lorem ipsum dolor sit amet, consectetur adipiscing elit. Maecenas ut lorem nec leo euismod vestibulum. Donec tortor nisl, iaculis at vehicula vel, interdum eu orci. Integer velit lacus, congue id magna eu, mollis accumsan augue. Aliquam non venenatis risus, eu posuere libero. Vestibulum ante ipsum primis in faucibus orci luctus." > /somewhere
    RUN echo "something went wrong"; exit 1
    EOF

    #5 [2/3] RUN echo "Lorem ipsum dolor sit amet, consectetur adipiscing elit....
    #5 DONE 0.2s

    #6 [3/3] RUN echo "something went wrong"; exit 1
    #6 0.211 something went wrong
    #6 ERROR: executor failed running [/bin/sh -c echo "something went wrong"; exit 1]: runc did not terminate sucessfully
    ------
     > [3/3] RUN echo "something went wrong"; exit 1:
    ------
    failed to solve with frontend dockerfile.v0: failed to build LLB: executor failed running [/bin/sh -c echo "something went wrong"; exit 1]: runc did not terminate sucessfully

While there is an existing `PROGRESS_NO_TRUNC` environment variable, I think that
this should be the default if the user opted to use `--progress=plain` (or in
situations where no TTY is attached, which could be in CI).

This patch changes the default to disable truncating in those situations, but
allowing users to opt-out by setting `PROGRESS_NO_TRUNC=0`

With this change the same build looks like this:

    #5 [2/3] RUN echo "Lorem ipsum dolor sit amet, consectetur adipiscing elit. Maecenas ut lorem nec leo euismod vestibulum. Donec tortor nisl, iaculis at vehicula vel, interdum eu orci. Integer velit lacus, congue id magna eu, mollis accumsan augue. Aliquam non venenatis risus, eu posuere libero. Vestibulum ante ipsum primis in faucibus orci luctus." > /somewhere
    #5 sha256:b2f0f47d63911ee55e7cf17c81007310e28190b5be84aa1a7869ba90786d5cee
    #5 DONE 0.2s

    #6 [3/3] RUN echo "something went wrong"; exit 1
    #6 sha256:c037b34bb998ae7d30572b489286da14df87e1478adf6d0c5c71c79b84b11bcc
    #6 0.293 something went wrong
    #6 ERROR: executor failed running [/bin/sh -c echo "something went wrong"; exit 1]: runc did not terminate sucessfully
    ------
     > [3/3] RUN echo "something went wrong"; exit 1:
    ------
    failed to solve with frontend dockerfile.v0: failed to build LLB: executor failed running [/bin/sh -c echo "something went wrong"; exit 1]: runc did not terminate sucessfully

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2020-04-09 17:52:01 +02:00
Tonis Tiigi d64e417b1c hack: allow testing with dockerd
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2020-04-08 23:27:20 -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
Tõnis Tiigi 226a5db9ad
Merge pull request #1433 from hinshun/session-hijack
Allow sessions to hijack the connection outside of a solve
2020-04-08 20:25:28 -07:00
Edgar Lee d42b8bfc10 Set single export entry outside of session initialization
Signed-off-by: Edgar Lee <edgarl@netflix.com>
2020-04-08 14:07:35 -07:00
Edgar Lee 423f5f8a97 Allow sessions to hijack the connection outside of a solve
Signed-off-by: Edgar Lee <edgarl@netflix.com>
2020-04-08 12:13:42 -07:00
Tõnis Tiigi c44cb42a69
Merge pull request #1428 from tonistiigi/imagemeta-async
llb: update image meta resolver to async callback
2020-04-06 10:00:42 -07:00
Tõnis Tiigi 177703c925
Merge pull request #1429 from tonistiigi/stateoptions
llb: make generic runoptions stateoptions
2020-04-06 09:51:27 -07:00
Akihiro Suda 4201939551
Merge pull request #1420 from fuweid/disable-http2-for-https
resolver: disable http2 for pushing
2020-04-06 20:41:53 +09:00
Tonis Tiigi 0ef961eb87 llb: make generic runoptions stateoptions
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2020-04-05 22:30:58 -07:00
Tonis Tiigi 146ef63e4a llb: update image meta resolver to async callback
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2020-04-05 22:25:02 -07:00
Akihiro Suda 195f9e598c
Merge pull request #1426 from tonistiigi/llb-async
llb: asyncronous llb graph generation support
2020-04-05 07:07:38 +09: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
Akihiro Suda 6f28b0d70b
Merge pull request #1424 from tonistiigi/buildctl-test
travis: make sure buildctl integration tests run
2020-04-02 17:13:07 +09:00
Tonis Tiigi c2dd099570 travis: make sure buildctl integration tests run
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2020-04-01 17:19:54 -07:00
Wei Fu 9f063f6b61 resolver: disable http2 for pushing
The golang net/http package uses http2 client to serve https by default,
if let Transport.TLSNextProto is nil. And net/http package doesn't
provide tunnable value for http2 flow control which will limit push
performance.

Before this commit, use GODEBUG="http2debug=1" buildkitd to pushing
one image from dockerfile like

```
$ about 700MB
FROM scratch
ADD ./golang-1.13.0-stretch.tar.gzip /
```

and use ifstat to monitor network interface and found that

```
$ ifstat -i enp0s3
      enp0s3
 KB/s in  KB/s out
    0.47      0.67
    0.44      0.51
   19.72     11.56
   62.25   2184.41
   96.34   3514.28
   93.89   3508.31
   95.41   3515.53
   91.61   3433.22
   95.82   3579.68
   90.36   3388.89
   93.64   3513.03
   93.32   3478.04
   ...

$ log from buildkitd
2020/03/31 17:40:33 http2: Transport received WINDOW_UPDATE stream=11 len=4 incr=32768
2020/03/31 17:40:33 http2: Transport received WINDOW_UPDATE len=4 (conn) incr=271
2020/03/31 17:40:33 http2: Transport received WINDOW_UPDATE stream=11 len=4 incr=271
2020/03/31 17:40:33 http2: Transport received WINDOW_UPDATE len=4 (conn) incr=32496
2020/03/31 17:40:33 http2: Transport received WINDOW_UPDATE stream=11 len=4 incr=32496
...
```

The registry will update window size of flow control when receives each
frame data. The sender need wait for receiver update the window size if
the sender runs out of buffer of flow control. But the increase value
for buffer by WINDOW_UPDATE frame is too small and slow which impacts
push performance.

Before net/http package provides tunnable value for flow control, we
should disable http2 for https request.

And with this commit, the performance will be better like:

```
$ ifstat -i enp0s3
      enp0s3
 KB/s in  KB/s out
    0.56      0.61
   16.13      5.55
   18.89      9.23
  218.84   7832.80
  338.56  13074.04
  302.39  11713.83
  231.62   8964.60
  356.50  13504.02
  298.14  11401.81
  311.24  11783.26
  333.01  12710.17
  329.64  12630.40
  305.87  11662.04
  292.53  11118.04
```

Signed-off-by: Wei Fu <fuweid89@gmail.com>
2020-03-31 17:59:13 +08:00
Tõnis Tiigi 6e725bdbb6
Merge pull request #1418 from XiaofanZhang/xiaofan/update-vendor
vendor: update fsutil to c2c7d7b0e144 and symlink test
2020-03-30 21:15:15 -07:00
Xiaofan Zhang 0947ed31ea vendor: update fsutil to c2c7d7b0e144 and symlink test
Signed-off-by: Xiaofan Zhang <xiaofan.zhang@clinc.com>
2020-03-31 02:59:34 +00:00
Tõnis Tiigi d13c5afeda
Merge pull request #1416 from vladaionescu/master
Add --force flag in git fetch command
2020-03-30 00:07:38 -07:00
Tõnis Tiigi ba043f338f
Merge pull request #1415 from aluzzardi/dockerfile-frontendinputs-forward
dockerfile: forward FrontendInputs to the gateway
2020-03-30 00:06:57 -07:00
Vlad A. Ionescu cd4a80c086 Add comment about the use of --force
Signed-off-by: Vlad A. Ionescu <vladaionescu@users.noreply.github.com>
2020-03-27 18:35:18 -07:00
Vlad A. Ionescu 4ce2075095 Add --force flag in git fetch command
Signed-off-by: Vlad A. Ionescu <vladaionescu@users.noreply.github.com>
2020-03-27 18:06:49 -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
Tibor Vass c60a1eb215
Merge pull request #1413 from tonistiigi/fix-loadwithparents
solver: avoid looping over same keys in loadwithparents
2020-03-25 13:43:00 -07:00
Tonis Tiigi cfabf3009b solver: avoid looping over same keys in loadwithparents
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2020-03-18 17:07:57 -07:00
Tõnis Tiigi 60f7453734
Merge pull request #1405 from AkihiroSuda/dockerfile-cross
Dockerfile: cross-compile fuse-overlayfs and idmap
2020-03-18 12:22:26 -07:00
Akihiro Suda 7190882c81
Merge pull request #1410 from tonistiigi/self-signed-tls
resolver: support self signed certificates
2020-03-19 02:41:39 +09:00
Akihiro Suda 60c56c2a35 Dockerfile: cross-compile fuse-overlayfs and idmap
Signed-off-by: Akihiro Suda <akihiro.suda.cz@hco.ntt.co.jp>
2020-03-18 02:15:53 +09:00
Tonis Tiigi 56f76a5621 resolver: support self signed certificates
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2020-03-16 22:09:27 -07:00
Akihiro Suda 430c5256d5
Merge pull request #1408 from dweomer/typo-in-buildkitd-cli-arg-handling
buildkitd: fix containerd-cni-config-path typo
2020-03-14 02:37:18 +09:00
Darren Shepherd 6cc8a72665 fix containerd-cni-config-path typo
Signed-off-by: Jacob Blain Christen <jacob@rancher.com>
2020-03-13 09:39:55 -07:00
Akihiro Suda a1bf12f806
Merge pull request #1303 from jingxiaolu/README_inline_cache
README.md: update description of inline cache use for output
2020-03-13 04:45:08 +09:00