Commit Graph

2601 Commits (03987d2a7536ba58c7654b9d416f9364bfc2437f)

Author SHA1 Message Date
Akihiro Suda 251f40343f
Merge pull request #1611 from tonistiigi/update-containerd-0728
update containerd vendor and add 1.4-beta2 testing
2020-07-29 12:39:50 +09:00
Tonis Tiigi 5571a1e605 buildctl: improve secret parsing
type=env,env=foo would not work before

Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2020-07-28 20:06:00 -07:00
Tonis Tiigi 70c2ab7f4d hack: use caching for master deploy
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2020-07-28 19:59:17 -07:00
Tonis Tiigi 942c39adfd add testing for containerd 1.4-beta2
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2020-07-28 18:13:15 -07:00
Tonis Tiigi 53b2f321e8 vendor: update containerd to eb6354a11
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2020-07-28 17:48:03 -07:00
Tõnis Tiigi 995ae310c7
Merge pull request #1607 from TBBle/fix_integration_test_build_on_windows
Fix test failures in unit tests on Windows
2020-07-28 12:00:55 -07:00
Paul "TBBle" Hampson 6c824d68f1 Use filesystem-supplied modes for checksumming content
The existing code was spuriously failing unit tests, because it was
stripping non-permission bits off the file mode.

On examination, the behaviour was inherited from similar code in
moby/moby, which was intended to affect the resulting filemodes inside
a Linux-based container built from Windows. However, this code path does
have that effect in BuildKit as we are only calculating checksums here.

Signed-off-by: Paul "TBBle" Hampson <Paul.Hampson@Pobox.com>
2020-07-29 02:50:24 +10:00
Paul "TBBle" Hampson 46995ec794 Don't silently ignore failed wildcard expansion
This was letting mount-related errors slip by, and instead returning
an empty hash.

Signed-off-by: Paul "TBBle" Hampson <Paul.Hampson@Pobox.com>
2020-07-29 02:50:20 +10:00
Paul "TBBle" Hampson b126501d78 Provide the known default PATH to the llbtest test
The existing test fails because the Windows default PATH (as far as LLB
knows) is empty. See the system.DefaultPathEnv comments.

Signed-off-by: Paul "TBBle" Hampson <Paul.Hampson@Pobox.com>
2020-07-28 18:07:20 +10:00
Paul "TBBle" Hampson 9fd4d731d6 Fix oci.hasPrefix to operate correctly on Windows
Due to use of filepath.Clean(), on Windows we end up operating on the
paths in Windows-slashed form, even if the inputs were Unix-slashed.

Signed-off-by: Paul "TBBle" Hampson <Paul.Hampson@Pobox.com>
2020-07-28 18:07:20 +10:00
Paul "TBBle" Hampson 13bf35d640 Run all the hasPrefix test-cases, even if one fails
This makes it easier to see what's gone wrong if they start failing.

Signed-off-by: Paul "TBBle" Hampson <Paul.Hampson@Pobox.com>
2020-07-28 18:07:20 +10:00
Paul "TBBle" Hampson 32a080f0f3 Skip source tests on Windows that depend on read-write bind-mounts
These were previously failing due to use of sh.exe on Windows, and with
that fixed, have been revealed to depend on bind-mounts.

Signed-off-by: Paul "TBBle" Hampson <Paul.Hampson@Pobox.com>
2020-07-28 18:07:20 +10: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
Paul "TBBle" Hampson b2d3473cba Skip tests on Windows that attempt to bind-mount read-only
Containerd's mounter doesn't yet support bind-mounts on Windows.
BuildKit short-cuts this for read-write mounts, but not read-only
mounts.

Signed-off-by: Paul "TBBle" Hampson <Paul.Hampson@Pobox.com>
2020-07-28 18:07:20 +10:00
Paul "TBBle" Hampson e48eaf9619 Log HostComputeNamespace name instead of the whole object
Signed-off-by: Paul "TBBle" Hampson <Paul.Hampson@Pobox.com>
2020-07-28 18:07:20 +10:00
Paul "TBBle" Hampson 0c9d862645 Fix undefined variable in Windows-specific test
Signed-off-by: Paul "TBBle" Hampson <Paul.Hampson@Pobox.com>
2020-07-28 18:07:20 +10:00
Paul "TBBle" Hampson b5e6d54910 Add errors-on-non-Linux ToRootless implementation
`go test` complains about this tree because the package ends up with no
symbols on non-Linux platforms, e.g., Windows, even though this API is
never be called on non-Linux platforms, according to the compiler.

Signed-off-by: Paul "TBBle" Hampson <Paul.Hampson@Pobox.com>
2020-07-28 18:07:20 +10:00
Paul "TBBle" Hampson 5e3e18a72d Use OS-agnostic os.SameFile instead of inode comparision
This fixes the build of this test under Windows.

Signed-off-by: Paul "TBBle" Hampson <Paul.Hampson@Pobox.com>
2020-07-28 13:50:48 +10:00
Paul "TBBle" Hampson f617b0828a Fix testutil/integration build on Windows
Although we don't run any integration tests on Windows at this time,
this does mean that the SKIP_INTEGRATION_TESTS env-var works, so we can
run a wider range of non-integration tests without spurious failures.

Signed-off-by: Paul "TBBle" Hampson <Paul.Hampson@Pobox.com>
2020-07-28 13:50:48 +10:00
Tõnis Tiigi 3ac3a61321
Merge pull request #1604 from AkihiroSuda/update-doc-20200717
update docs
2020-07-27 15:15:50 -07:00
Tõnis Tiigi fe59e20f40
Merge pull request #1606 from TBBle/windows-CI-on-GitHub_Actions
Add initial GitHub Actions-based Windows CI
2020-07-27 08:58:38 -07:00
Paul "TBBle" Hampson 81595fe320 Add initial GitHub Actions-based Windows CI
Only a few tests are able to be run, because the integration test
support code fails to compile on Windows, taking effect before the
SKIP_INTEGRATION_TESTS env-var is handled.

Signed-off-by: Paul "TBBle" Hampson <Paul.Hampson@Pobox.com>
2020-07-28 00:27:13 +10:00
Akihiro Suda d73640f7a1
Merge pull request #1595 from tonistiigi/shfmt
hack: add shfmt
2020-07-27 18:28:06 +09:00
Akihiro Suda 3691733e70
Merge pull request #1605 from tonistiigi/update-fsutil
vendor: update fsutil to c3ed55f3b4
2020-07-27 16:11:25 +09:00
Tonis Tiigi 846142df61 push: reenable setting insecure exporter opt
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2020-07-26 23:27:19 -07:00
Tonis Tiigi dc95525191 vendor: update fsutil to c3ed55f3b4
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2020-07-26 23:25:00 -07:00
Akihiro Suda 1957461428
README.md: add HLB, Earthfile, and Cargo Wharf
Signed-off-by: Akihiro Suda <akihiro.suda.cz@hco.ntt.co.jp>
2020-07-27 15:04:11 +09:00
Akihiro Suda 444d506251
docs/rootless.md: drop support for Debian 9 and Fedora 30
Debian 9 has reached EOL on 2020-07-06: https://wiki.debian.org/DebianReleases
Fedora 30 has reached EOL on 2020-05-26: https://fedoraproject.org/wiki/End_of_life

Signed-off-by: Akihiro Suda <akihiro.suda.cz@hco.ntt.co.jp>
2020-07-27 14:34:56 +09:00
Akihiro Suda f22f2fc103
README.md: drop cgroup v2 notes
cgroup v2 is supported since runc v1.0.0-rc91 (will be included in
BuildKit since v0.7.2)

Signed-off-by: Akihiro Suda <akihiro.suda.cz@hco.ntt.co.jp>
2020-07-27 14:31:42 +09:00
Tonis Tiigi 67044875c4 resolver: allow setting both insecure tls and http
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2020-07-26 18:29:45 -07:00
Akihiro Suda e2260891a3
Merge pull request #1565 from AkihiroSuda/daemonless-show-log
buildctl-daemonless.sh: show log on "could not connect to ..."
2020-07-25 18:30:33 +09:00
Tonis Tiigi 8c55320f45 hack: add shfmt
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2020-07-24 21:17:54 -07:00
Tõnis Tiigi 866c12f9d2
Merge pull request #1593 from TBBle/locally_shortcut_ro_bind_mounts_on_windows
Locally shortcut read-only bind mounts on Windows
2020-07-24 20:05:39 -07:00
Paul "TBBle" Hampson f9b8fc64b1 Give a name to the only mount we care about
Signed-off-by: Paul "TBBle" Hampson <Paul.Hampson@Pobox.com>
2020-07-24 20:40:46 +10:00
Paul "TBBle" Hampson 4e69b50469 Shortcut read-only bind-mounts in Windows, like non-Windows
Signed-off-by: Paul "TBBle" Hampson <Paul.Hampson@Pobox.com>
2020-07-24 20:36:39 +10:00
Akihiro Suda 11a8e7216a
Merge pull request #1590 from tonistiigi/buffer-write
integration: lock buffer for concurrent writes
2020-07-24 16:17:47 +09:00
Akihiro Suda d376a39357
buildctl-daemonless.sh: show log on "could not connect to ..."
Signed-off-by: Akihiro Suda <akihiro.suda.cz@hco.ntt.co.jp>
2020-07-24 16:14:59 +09:00
Tõnis Tiigi a67af5b10c
Merge pull request #1581 from alexcb/tar-exporter-with-socket-copy-reproduce-error
fix socket handling during copy
2020-07-23 12:07:15 -07:00
Tonis Tiigi 9cb0654ce4 integration: lock buffer for concurrent writes
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2020-07-23 12:04:14 -07:00
Alex Couture-Beil 5382a2056e Treat unix sockets as regular files
This fix is similar to the fix in #1144; but was hit in a different code
path.

Signed-off-by: Alex Couture-Beil <alex@earthly.dev>
2020-07-23 11:25:48 -07:00
Tõnis Tiigi 754bcfbe51
Merge pull request #1589 from thaJeztah/update_fsutil
vendor: update tonistiigi/fsutil v0.0.0-20200720184806-8f851f9d2045
2020-07-23 09:25:57 -07:00
Sebastiaan van Stijn 3890bbe6f7
vendor: update tonistiigi/fsutil v0.0.0-20200720184806-8f851f9d2045
full diff: ae3a8d7530...8f851f9d20

notable changes:

- walker: fix notadir error
- improving error returns
    - more typed errors
    - remove extra verbosity (eg. PathError already contains action and path)
    - ensure stack traces are added to errors

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2020-07-23 17:05:59 +02:00
Tõnis Tiigi b3cf4e508c
Merge pull request #1588 from TBBle/no_chopt_works_everywhere
Support not chowning files on all platforms
2020-07-22 10:39:02 -07:00
Paul "TBBle" Hampson 3c96d0b863 Support not chowning files on all platforms
Signed-off-by: Paul "TBBle" Hampson <Paul.Hampson@Pobox.com>
2020-07-23 03:18:30 +10:00
Tõnis Tiigi 5de894a607
Merge pull request #1585 from TBBle/windows_cni_support
CNI support for Windows
2020-07-20 23:57:38 -07:00
Paul "TBBle" Hampson 50c5d4ce51 Don't add loopback CNI configuration on Windows
There's no Loopback CNI plugin for Windows as far as I can see, so I'm
assuming it's not needed.

Signed-off-by: Paul "TBBle" Hampson <Paul.Hampson@Pobox.com>
2020-07-21 16:31:32 +10:00
Paul "TBBle" Hampson 1fedff0e4b Reorder CNI config to set options before consumers
The `WithLoNetwork` and `WithConfFile` options consume the
`WithPluginDir` and `WithInterfacePrefix` settings, so they must come
first.

This fixes the issue that the provided plugin directory was not used for
the provided configuration file. This would have been more visible, but
the default `InterfacePrefix` is already "eth".

Signed-off-by: Paul "TBBle" Hampson <Paul.Hampson@Pobox.com>
2020-07-21 16:31:31 +10:00
Paul "TBBle" Hampson dc2574ceae Implement separate handling for Windows Network namespaces
The Windows API is completely different, so the common code cannot
create the unique identifier, but must accept what the OS-specific code
does.

For Linux, it's a pathname. In Windows, it's a GUID string.

This pulls in direct usage of Microsoft/hcsshim, which previously was
only an indirect usage via containerd calls from, e.g., localMounter on
Windows.

Signed-off-by: Paul "TBBle" Hampson <Paul.Hampson@Pobox.com>
2020-07-21 16:31:31 +10:00
Paul "TBBle" Hampson 1645a1e2ca Provide separate NetProviders map for Windows
This enforces the lack of host networking support on Windows.

Signed-off-by: Paul "TBBle" Hampson <Paul.Hampson@Pobox.com>
2020-07-21 16:31:31 +10:00
Akihiro Suda 40b0d17fc5
Merge pull request #1582 from tonistiigi/new-lint
replace gometalinter with golangci linter
2020-07-21 14:33:15 +09:00