Commit Graph

3724 Commits (6e82a4a89bded14acf08068e222cf31ee41afd7b)

Author SHA1 Message Date
Tonis Tiigi 9301b5f2e0 llbsolver: avoid embedded emulators for higher amd64 variants
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2022-01-31 11:28:08 -08:00
Tonis Tiigi 2f455f894c vendor: update containerd to a43703fcba
Needed for amd64 variants support

Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2022-01-31 11:28:08 -08:00
Tonis Tiigi 9598fa243b archutil: amd64 variants support
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2022-01-31 11:28:02 -08:00
Tonis Tiigi e38f34c7d4 archutil: refactor to return structs
Working with strings is error-prone because a platform
can be in multiple string forms and less flexible.

Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2022-01-31 11:28:02 -08:00
Tonis Tiigi 30a0b02479 exec: allow mounting secret environment variables
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2022-01-31 11:22:57 -08:00
Tõnis Tiigi 2633c96bac
Merge pull request #2442 from jedevc/heredoc-copy-symbols
Fix #2439 (`COPY` with Heredocs eats quotes)
2022-01-31 10:37:41 -08:00
Justin Chadwell 90ddf87a22 Fix combinations of quotes and heredocs
This adds a couple more integration tests to more fully define the
behavior of these interactions. Additionally, through this, a minor
difference to POSIX was discovered where quotes are supposed to be
properly preserved in a heredoc (since a heredoc is treated as a
double-quoted word).

To handle this, a new property, SkipProcessQuotes is added to the shell
lexer which simply treats quotes as ordinary characters. This is the
only behavioral change needed to actually get the new tests working.

Signed-off-by: Justin Chadwell <me@jedevc.com>
2022-01-31 10:53:58 +00:00
Justin Chadwell 8005660443 Fix heredoc COPY/ADD expansion to preserve quotes
In the contents of COPY/ADD, we perform expansion on variables using a
lexer. However, this lexer, by default, removes quotes as well as
expanding variables - this isn't really the kind of behavior we're
after, as it feels quite unintuitive.

To fix this, we introduce a new ExpandRaw function, which commands can
implement that implement an alternative expansion that preserves quotes
(and possibly other characters/features in the future).

Additionally, we introduce new tests to more clearly define the desired
behavior. One major note is that backslashes are not passed directly,
and are processed, following normal escape rules (so that we can use `$`
symbols directly).

Signed-off-by: Justin Chadwell <me@jedevc.com>
2022-01-31 10:53:58 +00:00
Justin Chadwell dcf62b1f3f Cleanup rawEscapes in lexer to be internally consistent
Previously, we'd only write raw escapes out as words, and not out to the
result. We weren't using or relying on this behaviour, but it could
easily have caused a bug if we were. This patch just cleans rawEscapes
to behave like rawQuotes.

Signed-off-by: Justin Chadwell <me@jedevc.com>
2022-01-31 10:53:58 +00:00
Tõnis Tiigi 6b8cea792b
Merge pull request #2584 from crazy-max/update-containerd
Bump github.com/containerd/containerd from v1.6.0-beta.3 to v1.6.0-rc.1
2022-01-29 10:15:02 -08:00
Tõnis Tiigi 93cddb5fd5
Merge pull request #2585 from hinshun/local-sm-get
Local should use session ID in op and only fallback to session group
2022-01-29 10:14:40 -08:00
Tõnis Tiigi edfc3f0d89
Merge pull request #2570 from alexcb/fix-git-clone-tag
Add support for annotated git tags
2022-01-29 10:14:23 -08:00
CrazyMax e0e1c3d2ab
dockerfile: update stargz bin
Signed-off-by: CrazyMax <crazy-max@users.noreply.github.com>
2022-01-29 09:08:22 +01:00
Edgar Lee b3e8c63a48 Local should use session ID in op and only fallback to session group if failed before transfer started
Signed-off-by: Edgar Lee <edgarl@netflix.com>
2022-01-28 15:18:43 -08:00
Alex Couture-Beil 9e1a9d24e8
Add support for git tags
This fixes errors such as:

    error: cannot update ref 'refs/heads/v2.30.0': trying to write non-commit object 2d9685d47a7e516281aa093bf0cddc8aafa72448 to branch 'refs/heads/v2.30.0'

which occur when cloning a tag rather than branch.

Signed-off-by: Alex Couture-Beil <alex@earthly.dev>
2022-01-28 11:51:19 -08:00
CrazyMax 07dea88ee0
otel: update semconv
Signed-off-by: CrazyMax <crazy-max@users.noreply.github.com>
2022-01-28 10:19:00 +01:00
CrazyMax fd84771d6c
Bump github.com/containerd/stargz-snapshotter to v0.11.0
Signed-off-by: CrazyMax <crazy-max@users.noreply.github.com>
2022-01-28 10:18:59 +01:00
CrazyMax 39f6b4e739
Bump github.com/containerd/containerd to v1.6.0-rc.1
Signed-off-by: CrazyMax <crazy-max@users.noreply.github.com>
2022-01-28 10:18:59 +01:00
Akihiro Suda 8bc2977ced
Merge pull request #2583 from moby/dependabot/go_modules/github.com/opencontainers/runc-1.0.3
build(deps): bump github.com/opencontainers/runc from 1.0.2 to 1.0.3
2022-01-27 13:26:51 +09:00
Tõnis Tiigi 40c0091bd0
Merge pull request #2582 from AkihiroSuda/alpine315
Dockerfile: update Alpine to 3.15 (install shadow-uidmap from APK)
2022-01-26 09:57:18 -08:00
dependabot[bot] cc9fefe9cd
build(deps): bump github.com/opencontainers/runc from 1.0.2 to 1.0.3
Bumps [github.com/opencontainers/runc](https://github.com/opencontainers/runc) from 1.0.2 to 1.0.3.
- [Release notes](https://github.com/opencontainers/runc/releases)
- [Changelog](https://github.com/opencontainers/runc/blob/master/CHANGELOG.md)
- [Commits](https://github.com/opencontainers/runc/compare/v1.0.2...v1.0.3)

---
updated-dependencies:
- dependency-name: github.com/opencontainers/runc
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-01-26 17:18:52 +00:00
Tõnis Tiigi 08497dafaf
Merge pull request #2577 from tonistiigi/log-clip-buffer
keep buffer of logs to show on failure when regular logs are clipped
2022-01-26 09:17:20 -08:00
Tõnis Tiigi 77662095d8
Merge pull request #2576 from tonistiigi/cross-compile-name
dockerfile: show target platform on cross compiling
2022-01-26 09:17:00 -08:00
Akihiro Suda 323542d625
Dockerfile: update Alpine to 3.15 (install shadow-uidmap from APK)
Alpine 3.15 contains https://gitlab.alpinelinux.org/alpine/aports/-/merge_requests/25365 ,
so we can now install shadow-uidmap frok APK.

Close issue 2038
Close issue 2580

Signed-off-by: Akihiro Suda <akihiro.suda.cz@hco.ntt.co.jp>
2022-01-26 19:54:29 +09:00
Tonis Tiigi ffce8218e3 keep buffer of logs to show on failure when regular logs are clipped
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2022-01-24 21:30:46 -08:00
Tonis Tiigi 45d02301c2 dockerfile: show target platform on cross compiling
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2022-01-23 21:55:19 -08:00
Tõnis Tiigi c18af390ef
Merge pull request #2572 from tonistiigi/tracing-env-update
tracing: move to newer env names
2022-01-20 12:58:05 -08:00
CrazyMax 3df7865fbb
Merge pull request #2571 from tonistiigi/lint-update
hack: update linter to v1.43
2022-01-20 17:23:10 +01:00
Tonis Tiigi f5dbcf6e99 tracing: move to newer env names
open-telemetry/opentelemetry-specification#740 has decided to
promote different set of env for CLI propagation.

Switch to use them so we are more consistent with other
tools. Old ones should be removed in a future release.

Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2022-01-19 21:46:10 -08:00
Erik Sipsma eb473d0a62
Merge pull request #2563 from sipsma/diffref-fix
cache: improve diff ref release logic.
2022-01-19 14:28:14 -08:00
Erik Sipsma 417ba9e0ed cache: improve diff ref release logic.
Before this change, the lower and upper parents provided to the cache
manager Diff method were not cloned, which resulted in some code paths
incorrectly providing them directly as the parents of the returned ref.
This meant that if they were released after the call to Diff, the diff
ref could become incorrectly invalidated.

Now, the lower and upper are cloned and unit test coverage has been
added to test that ref release is handled correctly.

Signed-off-by: Erik Sipsma <erik@sipsma.dev>
2022-01-19 14:03:49 -08:00
Tonis Tiigi dc21885891 hack: enable more linters
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2022-01-19 12:20:30 -08:00
Tonis Tiigi 01e935cff5 hack: update linter to v1.43
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2022-01-19 11:48:57 -08:00
Akihiro Suda 9f2d744354
Merge pull request #2569 from tonistiigi/platforms-compare-fix
exec: check full platform vector when checking for emulator
2022-01-19 19:10:06 +09:00
Tõnis Tiigi e47e047569
Merge pull request #2564 from sipsma/fix-2557
cache: handle crash after snapshot commit
2022-01-19 00:41:04 -08:00
Tonis Tiigi 082c666bdb exec: check full platform vector when checking for emulator
Instead of doing a direct string comparison we should
use `platforms.Only` so that we can also detect the
variants that are compatible but don’t match directly.

Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2022-01-18 23:54:24 -08:00
Erik Sipsma eb935e525f cache: handle crash after snapshot commit
Before this, there could be crash during a call to finalize a ref that
occured after the snapshot was committed but before committing the
metadata that indicates the immutable ref no longer had an
equalMutable. This resulted in a situation where any future calls to
finalize that ref would fail.

Now, if that situation happens, the cache will notice when it's
initially loaded that the ref has an equalMutable that's missing its
snapshot and that its own snapshot exists. It will then just use the
correctly committed snapshot and clear the equalMutable field.

Signed-off-by: Erik Sipsma <erik@sipsma.dev>
2022-01-18 12:22:52 -08:00
Tõnis Tiigi 17c237d69a
Merge pull request #2565 from sipsma/test-mount-ro
cache: add coverage for Mount readonly parameter.
2022-01-17 22:37:13 -08:00
Erik Sipsma 0eca53360b cache: add coverage for Mount readonly parameter.
This adds test coverage for ensuring the readonly parameter is honored
as expected in the ref Mount methods. There was a regression introduced
during #2335 that went unnoticed until identified and fixed in #2562.
This test coverage should help prevent similar regressions in the
future.

Signed-off-by: Erik Sipsma <erik@sipsma.dev>
2022-01-17 16:47:44 -08:00
Erik Sipsma 6471f316d3
Merge pull request #2562 from ktock/refmountcachero
cache: do not ignore readonly option
2022-01-16 16:37:34 -08:00
Tõnis Tiigi cfdaaa42d2
Merge pull request #2501 from sipsma/mergeop-inline-cache
remote cache: support arbitrary layers as results
2022-01-15 21:07:41 -08:00
Kohei Tokunaga f8c9a756e3 cache: do not ignore readonly option
Signed-off-by: Kohei Tokunaga <ktokunaga.mail@gmail.com>
2022-01-16 13:20:17 +09:00
Tõnis Tiigi 2dc3e743fd
Merge pull request #2553 from shizhMSFT/fix_auth
Refine FetchToken Logic
2022-01-13 18:45:54 -08:00
Tõnis Tiigi 7b27cb62cb
Merge pull request #2550 from tonistiigi/context-dockerignore
dockerfile: apply dockerignore on loading local contexts
2022-01-13 18:45:42 -08:00
Shiwei Zhang 9ae05d8e1d refine auth logic
Signed-off-by: Shiwei Zhang <shizh@microsoft.com>
2022-01-14 10:07:37 +08:00
Tõnis Tiigi e5e39c3319
Merge pull request #2556 from hinshun/scheduler-inf-loop
Remove goto statements causing failed edges to never unpark
2022-01-12 16:53:36 -08:00
Edgar Lee 465a30a31d Remove goto statements causing failed edges to never unpark
Signed-off-by: Edgar Lee <edgarhinshunlee@gmail.com>
2022-01-12 15:59:20 -08:00
Erik Sipsma ce012ab70c remote cache: support arbitrary layers as results
This change enables inline cache to work as expected with MergeOp by
supporting a new type of result, DiffResult, which enables results to be
specified as a specific ordered set of layers inside an image.
Previously, results could only be specified with a singe layer index,
which meant that they had to start at the image's base layer and end at
that index. That meant that merge inputs couldn't be specified as they
are often a subset of the image layers that don't begin at the base.

Signed-off-by: Erik Sipsma <erik@sipsma.dev>
2022-01-11 13:27:05 -08:00
Tonis Tiigi 507d18188c dockerfile: apply dockerignore on loading local contexts
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2022-01-07 18:16:45 -08:00
Tõnis Tiigi ffe2301031
Merge pull request #2549 from tonistiigi/img-name-fix
dockerfile: fix image name when loaded named context
2022-01-07 12:17:44 -08:00