kaniko/pkg/commands
Gilbert Gilb's a42adb9bb4
Fix composite cache key for multi-stage copy command (#1735)
* chore: add workflows for pr tests

* fix unit tests

* fix formatting

* chore: fix gobuild

* change minikube script

* chore: fix lint install script

* chore: ignore and fix tests

* fix lint and run gofmt

* lint fixes

* k8s executor image only

* fix Makefile

* fix travis env variables

* more info on k8s tests

* fix travis run

* fix

* fix

* fix

* fix log

* some more changes

* increase timeout

* delete travis.yml and fix multiple copy tests

* fix registry mirror

* fix lint

* add concurency

* last attemot to fix k8 integrations

* diff id for diff workflows

* Fix composite cache key for multi-stage copy command (#1706)

PR #1518 reintroduced COPY layers caching using the `--cache-copy-layers`
flag. Unfortunately, this PR also introduced a bug by not including the
stage digest into the caching key of the COPY command when the
`--cache-copy-layers` flag was not set. As a result, kaniko would use
any previous (possibly stalled) layer from the cache because the digest
of the "COPY --from" command would never change.

PR author probably expected Go to fallthrough in the switch just like C
does. However, this is not the case. Go does not fallthrough in
switch-statements by default and requires the fallthrough keyword to be
used. Note that this keyword is not available in type-switches though,
because it wouldn't work properly with typings.

* refactor: add an abstract copy command interface to avoid code duplication

* fix typo in error message

Co-authored-by: Tejal Desai <tejal29@gmail.com>
2021-10-18 23:31:01 -07:00
..
add.go Fix .dockerignore for build context copies in later stages (#1447) 2020-10-08 12:47:14 -07:00
arg.go Fixing lint issues. Adding tests for COPY command. Fixing issue with copying files out of snapshots 2019-09-16 10:48:31 -07:00
base_command.go better shdTakeSnapshot 2020-06-06 19:49:34 -07:00
cache.go fmt 2020-04-30 17:07:18 -07:00
cache_test.go remove read succesS 2020-04-30 15:18:39 -07:00
cmd.go Fix bug with docker compatibility 2020-01-13 21:18:54 -08:00
cmd_test.go Fixing lint issues. Adding tests for COPY command. Fixing issue with copying files out of snapshots 2019-09-16 10:48:31 -07:00
commands.go add caching copy layers back (#1518) 2020-12-11 00:25:03 -08:00
copy.go Fix composite cache key for multi-stage copy command (#1735) 2021-10-18 23:31:01 -07:00
copy_test.go add caching copy layers back (#1518) 2020-12-11 00:25:03 -08:00
entrypoint.go Fixing lint issues. Adding tests for COPY command. Fixing issue with copying files out of snapshots 2019-09-16 10:48:31 -07:00
entrypoint_test.go Fixing lint issues. Adding tests for COPY command. Fixing issue with copying files out of snapshots 2019-09-16 10:48:31 -07:00
env.go Fixing lint issues. Adding tests for COPY command. Fixing issue with copying files out of snapshots 2019-09-16 10:48:31 -07:00
env_test.go Fixing lint issues. Adding tests for COPY command. Fixing issue with copying files out of snapshots 2019-09-16 10:48:31 -07:00
expose.go Fixing lint issues. Adding tests for COPY command. Fixing issue with copying files out of snapshots 2019-09-16 10:48:31 -07:00
expose_test.go Fixing lint issues. Adding tests for COPY command. Fixing issue with copying files out of snapshots 2019-09-16 10:48:31 -07:00
fake_commands.go add unit tests for caching run and copy 2019-12-10 09:29:10 -08:00
healthcheck.go Fixing lint issues. Adding tests for COPY command. Fixing issue with copying files out of snapshots 2019-09-16 10:48:31 -07:00
label.go Fixing lint issues. Adding tests for COPY command. Fixing issue with copying files out of snapshots 2019-09-16 10:48:31 -07:00
label_test.go Fixing lint issues. Adding tests for COPY command. Fixing issue with copying files out of snapshots 2019-09-16 10:48:31 -07:00
onbuild.go Fixing lint issues. Adding tests for COPY command. Fixing issue with copying files out of snapshots 2019-09-16 10:48:31 -07:00
onbuild_test.go Fixing lint issues. Adding tests for COPY command. Fixing issue with copying files out of snapshots 2019-09-16 10:48:31 -07:00
run.go fix gofmt 2020-08-13 13:59:58 -07:00
run_marker.go new implementation for run 2020-08-13 13:43:07 -07:00
run_test.go fix switching to non existent workdir 2020-05-07 18:59:01 -07:00
shell.go Update linter and fix errors 2019-12-21 12:27:14 -08:00
shell_test.go Update linter and fix errors 2019-12-21 12:27:14 -08:00
stopsignal.go Update linter and fix errors 2019-12-21 12:27:14 -08:00
stopsignal_test.go Update linter and fix errors 2019-12-21 12:27:14 -08:00
user.go Rebase over 1105 2020-03-04 14:16:24 -08:00
user_test.go fixup! run: user LookupId 2020-03-05 16:49:13 +01:00
volume.go rename whitelist to ignorelist 2020-06-02 15:56:27 -07:00
volume_test.go Update linter and fix errors 2019-12-21 12:27:14 -08:00
workdir.go feat: ensure relative WorkingDir work 2020-05-04 15:48:39 +02:00
workdir_test.go feat: ensure relative WorkingDir work 2020-05-04 15:48:39 +02:00