Commit Graph

1295 Commits (0b97b27a2389392706f6e7f13862818e3238609c)

Author SHA1 Message Date
Akihiro Suda 0b97b27a23
Merge pull request #613 from tonistiigi/data-race
solver: fix data race
2018-09-08 11:30:13 +09:00
Tonis Tiigi a2db26227f solver: fix data race
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2018-09-07 17:17:17 -07:00
Tibor Vass a9fe50acf1
Merge pull request #580 from AntaresS/handle-cgroups
allow customized cgroup-parent for runcexecutor
2018-09-06 11:15:51 -07:00
Tõnis Tiigi 9a6e2a5a91
Merge pull request #607 from kunalkushwaha/fix-typo-1
function name fixed SetMarhalDefaults -> SetMarshalDefaults
2018-09-05 22:01:39 -07:00
Kunal Kushwaha 98c1f44151 function name fixed SetMarhalDefaults -> SetMarshalDefaults
Signed-off-by: Kunal Kushwaha <kushwaha_kunal_v7@lab.ntt.co.jp>
2018-09-06 13:28:39 +09:00
Anda Xu b0677e7ef1 allow customized cgroup-parent for runcexecutor
Signed-off-by: Anda Xu <anda.xu@docker.com>
2018-09-05 12:53:57 -07:00
Akihiro Suda 756ca6cc6d
Merge pull request #602 from tonistiigi/gc
automatic GC
2018-09-05 10:47:21 +09:00
Tonis Tiigi 079c747c4e ontrol: support calling automatic GC
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2018-09-04 18:13:29 -07:00
Tibor Vass 6812dac65e
Merge pull request #596 from tonistiigi/required-secret
dockerfile: add required option for secrets
2018-09-04 08:05:41 -07:00
Tõnis Tiigi da0e32df08
Merge pull request #603 from ijc/worker-labels-panic
Initialise workers' label maps before assigning.
2018-09-03 17:52:15 -07:00
Ian Campbell 7cb70e1c31 Initialise workers' label maps before assigning.
Otherwise:

    panic: assignment to entry in nil map

    goroutine 1 [running]:
    main.applyOCIFlags(0xc4200e71e0, 0xc420400000, 0x0, 0x0)
    	/go/src/github.com/moby/buildkit/cmd/buildkitd/main_oci_worker.go:97 +0x1ac
    main.ociWorkerInitializer(0xc4200e71e0, 0xc4204104e0, 0xc420400000, 0x43409b, 0x12, 0xc42026b0f8, 0x4337fc, 0xc420000180)
    	/go/src/github.com/moby/buildkit/cmd/buildkitd/main_oci_worker.go:118 +0x50
    main.newWorkerController(0xc4200e71e0, 0xc4204104e0, 0xc420400000, 0xc420422000, 0xe5dc54, 0x11)
    	/go/src/github.com/moby/buildkit/cmd/buildkitd/main.go:520 +0x324
    main.newController(0xc4200e71e0, 0xc420400000, 0x1c0, 0x0, 0x0)
    	/go/src/github.com/moby/buildkit/cmd/buildkitd/main.go:489 +0xdc
    main.main.func3(0xc4200e71e0, 0x0, 0x0)
    	/go/src/github.com/moby/buildkit/cmd/buildkitd/main.go:203 +0x3dd
    github.com/moby/buildkit/vendor/github.com/urfave/cli.HandleAction(0xcdd420, 0xe93e98, 0xc4200e71e0, 0xc4200e71e0, 0xc42026b888)
    	/go/src/github.com/moby/buildkit/vendor/github.com/urfave/cli/app.go:502 +0xc8
    github.com/moby/buildkit/vendor/github.com/urfave/cli.(*App).Run(0xc4201b6540, 0xc4200300a0, 0xa, 0xa, 0x0, 0x0)
    	/go/src/github.com/moby/buildkit/vendor/github.com/urfave/cli/app.go:268 +0x60c
    main.main()
    	/go/src/github.com/moby/buildkit/cmd/buildkitd/main.go:238 +0xc64

Also add some random labels to the integration sandbox (which I have confirmed
is enough to trigger this issue before the fix).

Signed-off-by: Ian Campbell <ijc@docker.com>
2018-09-03 11:35:36 +01:00
Tonis Tiigi 8fea3f25e1 util: add a nonblocking throttle variant
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2018-08-31 16:36:58 -07:00
Tibor Vass a9cfc67208
Merge pull request #598 from tonistiigi/buildkitd-config
buildkitd: add config file support
2018-08-31 16:36:25 -07:00
Tibor Vass 49c29176fe
Merge pull request #601 from tonistiigi/update-dockerfile
dockerfile: update copy helper to v0.1.4
2018-08-31 15:58:15 -07:00
Tonis Tiigi 372528a565 dockerfile: update copy helper to v0.1.4
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2018-08-31 14:44:08 -07:00
Tibor Vass 94b009b27e
Merge pull request #594 from tonistiigi/override-copy
dockerfile: allow overriding copy image
2018-08-31 14:35:06 -07:00
Tõnis Tiigi 2f858a07c7
Merge pull request #600 from tonistiigi/prune-fixes
fixes for cache prune
2018-08-31 13:29:10 -07:00
Tõnis Tiigi 05a468d460
Merge pull request #595 from tonistiigi/uid
client: reset user ID for synced dirs
2018-08-31 12:14:06 -07:00
Tonis Tiigi acab0f6873 cache: correct prune size calculation cache
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2018-08-31 12:00:13 -07:00
Tonis Tiigi 28fec2b9cb cache: fix possible prune deadlock
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2018-08-31 11:59:53 -07:00
Tõnis Tiigi 2759005f6a
Merge pull request #575 from ijc/frontend-set-export-name
exporters: allow frontend control of the exported image name
2018-08-31 10:27:09 -07:00
Ian Campbell 03a9cb89af exporter: Use "*" to signify that client allows frontend to set image name
Signed-off-by: Ian Campbell <ijc@docker.com>
2018-08-31 17:34:49 +01:00
Tõnis Tiigi e3bc522f7c
Merge pull request #582 from ijc/gateway-client-snapshot-leak
clientside-frontend: release non-result refs after completion
2018-08-31 09:22:28 -07:00
Ian Campbell 0b20bcc8f3 The OCI image exporter does not support naming, so reject such attempts.
Adjust the test case to not name in the OCI case.

Signed-off-by: Ian Campbell <ijc@docker.com>
2018-08-31 14:23:34 +01:00
Ian Campbell aa51b40649 Include exported image name in ExporterResponse metadata
Signed-off-by: Ian Campbell <ijc@docker.com>
2018-08-31 11:07:32 +01:00
Tonis Tiigi cf614adb7f vendor: add toml parser
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2018-08-30 16:12:01 -07:00
Tonis Tiigi c524709f4a buildkitd: add config file support
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2018-08-30 16:11:55 -07:00
Tonis Tiigi 3eda0516da dockerfile: allow overriding copy image
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2018-08-30 13:21:52 -07:00
Tibor Vass 9d1b0e6b31
Merge pull request #597 from tonistiigi/graceful-scheduler-errors
solver: gracefully handle scheduler bugs
2018-08-30 10:56:39 -07:00
Tibor Vass 7e971435a4
Merge pull request #590 from tonistiigi/fix-panic
solver: fix panic on creating input requests
2018-08-30 10:54:41 -07:00
Tõnis Tiigi 45aedff363
Merge pull request #571 from ijc/solver-def-and-frontend-mutually-exclusive
solver: Don't solve both the provided Defininiton & frontend
2018-08-30 10:10:52 -07:00
Tõnis Tiigi c9711fcc26
Merge pull request #574 from ijc/return-frontend-metadata
Allow some Metadata to be return from frontend to the control client
2018-08-30 10:08:51 -07:00
Ian Campbell 755bf5387e Moved some subtests into `t.Run` blocks.
Signed-off-by: Ian Campbell <ijc@docker.com>
2018-08-30 16:28:19 +01:00
Ian Campbell 3db7441e06 clarify naming in testFrontendImageNaming
Signed-off-by: Ian Campbell <ijc@docker.com>
2018-08-30 15:59:12 +01:00
Ian Campbell 8d114533c2 exports: require caller to request frontend-based naming, by passing name of `%s`.
Signed-off-by: Ian Campbell <ijc@docker.com>
2018-08-30 15:59:06 +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
Ian Campbell 59391d1647 clientside-frontend: release non-result refs after completion
Tests such as TestNoSnapshotLeak were failing in client mode (e.g. using #522)
because we weren't releasing the intermediate refs.

Resolve this by refactoring the existing code which frees the intermediate refs
from `gatewayFrontend.Solve` into a method on `llbBridgeForwarder` and as well
as the original site also call from the solver when the top-level solve (in
clientside frontend mode) completes. The original call (which is via a defer)
could likely sensibly be moved either earlier or later if desired but leave it
here it is to minimise the scope of the change.

The previous code used the `retErr` named return but the code between that
point and the end of the function already ensured that `lbf.err` is the same as
`retErr`, thus the only change in the code which has moved is
`s/retErr/lbf.err/`. Note that the `res` named return was previously unused by
name.

Fixes #581.

Signed-off-by: Ian Campbell <ijc@docker.com>
2018-08-30 14:54:50 +01:00
Ian Campbell cc83b34572 solver: remove redundant conditional
There is now no way to reach this point with the test being false.

Signed-off-by: Ian Campbell <ijc@docker.com>
2018-08-30 14:01:27 +01:00
Ian Campbell ab7928edff solver: error if both Definition and Frontend are given.
Signed-off-by: Ian Campbell <ijc@docker.com>
2018-08-30 13:59:26 +01:00
Tibor Vass 153ed12eb9
Merge pull request #591 from dmcgowan/update-containerd-1.2
Update containerd vendor
2018-08-29 13:45:29 -07:00
Tibor Vass 17e6416706
Merge pull request #504 from kunalkushwaha/no-console
--no-progress replaced with --progress
2018-08-29 13:44:51 -07:00
Tonis Tiigi 0d68543b1e solver: mark build failed instead of panicking on scheduler error
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2018-08-29 11:10:05 -07:00
Tonis Tiigi c77b6d4759 solver: gracefully handle bugs leaving incoming requests open
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2018-08-28 17:07:50 -07:00
Tonis Tiigi a384bccbbf solver: add test for input request deadlock
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2018-08-28 16:47:31 -07:00
Tonis Tiigi 6daf696f04 dockerfile: add required option for secrets
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2018-08-28 16:18:08 -07:00
Derek McGowan 279a144686 Update containerd vendor
Picks up platform changes

Signed-off-by: Derek McGowan <derek@mcgstyle.net>
2018-08-28 14:26:14 -07:00
Tonis Tiigi 64ff38f163 client: reset user ID for synced dirs
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2018-08-28 14:22:22 -07:00
Akihiro Suda 94cc96a0ed
Merge pull request #592 from tonistiigi/run-entrypoint
dockerfile: never use entrypoint for run commands
2018-08-28 06:52:23 -07:00
Tonis Tiigi 38569b9b9a dockerfile: never use entrypoint for run commands
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2018-08-27 17:48:18 -07:00