CIPD client should reject package creation attempts which include a .cipd directory |
||||||
Issue descriptionThis can currently happen if you do: cipd install <package> -version <something> # update files in-place cipd create ... The `cipd install` command creates the internal .cipd directory when installing the package the first time, and the `cipd create` then foolishly vaccums' up the client's internal state into the new pacakge. When a cipd attempts to install this package later, it gets confused and believes that it's racing a concurrently-operating cipd client, even though it's not. We could prevent this by having the create command do something like: * reject the package creation attempt; OR * warn + ignore the .cipd folder
,
Feb 7 2017
Oops wrong field.
,
Feb 7 2017
(the .cipd directory would also get created by a cipd `ensure` command as well)
,
Feb 7 2017
While we're fixing this, we should add a regression test for the 'install' logic so we can track the client's behavior if this DOES happen.
,
Feb 7 2017
> warn + ignore the .cipd folder We can't just ignore it if cipd-installed package uses symlink install method: the new package will contains all the symlinks, but not their targets (since targets are in .cipd/pkgs/*). I was considering to recognize such symlinks and put targets into the package. It'll allow to "repackage" stuff safely.
,
Feb 7 2017
we have a tool to release goma client that does 1. cipd install to get canary package. 2. write "no_auto_update" and "MANIFEST" 3. upload compiler_proxy.sym to crash server 4. cipd pkg-build --install-mode copy .. 5. cipd pkg-register .. -ref release --tag .. should it remove .cipd before step 4?
,
Feb 7 2017
Yes, in your case it will be sufficient, since the package is using "--install-mode copy", and thus has no symlinks into .cipd/* guts.
,
Feb 7 2017
that would happen to work, but it also would ONLY work because you're building the packages with --install-mode copy. If you ever switched to symlink, you'd end up building a package with a bunch of broken links :(. It might be better to explicitly do a `cipd pkg-fetch` and explicitly unzip it somewhere rather than doing `cipd install`. Vadim, WDYT?
,
Feb 7 2017
Yes, cipd-fetch and unzipping would also work (even if using symlinks). Though in this case the script should remove .cipdpkg/* directory (that contains the package manifest).
,
Feb 7 2017
To be clear: this is clearly cipd client issue. It should have warned or rejected packages with ".cipd/*" in it. The users of cipd client aren't supposed to know or care about ".cipd" directory.
,
Feb 7 2017
,
Feb 7 2017
taking this
,
Feb 8 2017
actually am working on this, should have patch shortly.
,
Feb 8 2017
The following revision refers to this bug: https://chromium.googlesource.com/external/github.com/luci/luci-go.git/+/9713e46074c62af9469ada39da61164274c3295f commit 9713e46074c62af9469ada39da61164274c3295f Author: iannucci <iannucci@chromium.org> Date: Wed Feb 08 08:19:17 2017 [cipd] make creating instances from cipd installations work. R=vadimsh@chromium.org BUG= 689359 Review-Url: https://codereview.chromium.org/2681803003 [modify] https://crrev.com/9713e46074c62af9469ada39da61164274c3295f/cipd/client/cipd/local/builder.go [modify] https://crrev.com/9713e46074c62af9469ada39da61164274c3295f/cipd/client/cipd/local/files.go [modify] https://crrev.com/9713e46074c62af9469ada39da61164274c3295f/cipd/client/cipd/local/files_test.go
,
Feb 9 2017
The following revision refers to this bug: https://chromium.googlesource.com/external/github.com/luci/luci-go.git/+/27fda207cc185f378079bfa12f7a6c15f8f84cd4 commit 27fda207cc185f378079bfa12f7a6c15f8f84cd4 Author: iannucci <iannucci@chromium.org> Date: Thu Feb 09 00:14:26 2017 [cipd] ignore .cipd/* while extracting. R=vadimsh@chromium.org BUG= 689359 Review-Url: https://codereview.chromium.org/2684133002 [modify] https://crrev.com/27fda207cc185f378079bfa12f7a6c15f8f84cd4/cipd/client/cipd/local/deployer.go [modify] https://crrev.com/27fda207cc185f378079bfa12f7a6c15f8f84cd4/cipd/client/cipd/local/reader.go [modify] https://crrev.com/27fda207cc185f378079bfa12f7a6c15f8f84cd4/cipd/client/cipd/local/reader_test.go
,
Feb 9 2017
The following revision refers to this bug: https://chromium.googlesource.com/external/github.com/luci/luci-go.git/+/c571b954b15cdf9132da0f08c355fdf2a600c2f2 commit c571b954b15cdf9132da0f08c355fdf2a600c2f2 Author: iannucci <iannucci@chromium.org> Date: Thu Feb 09 02:58:55 2017 [cipd] ignore package folders missing current link. For bad packages which include .cipd/pkgs guts, it's possible for empty folders to pollute the pkgs space with description.json files such that multiple pkg folders contain 'valid' contents for the same package. R=vadimsh@chromium.org BUG= 689359 Review-Url: https://codereview.chromium.org/2681693004 [modify] https://crrev.com/c571b954b15cdf9132da0f08c355fdf2a600c2f2/cipd/client/cipd/local/deployer.go [modify] https://crrev.com/c571b954b15cdf9132da0f08c355fdf2a600c2f2/cipd/client/cipd/local/deployer_test.go
,
Feb 9 2017
The following revision refers to this bug: https://chromium.googlesource.com/infra/infra/+/f1bc821ce6d1a223c2c3671c9be1cf69a13d717e commit f1bc821ce6d1a223c2c3671c9be1cf69a13d717e Author: Robert Iannucci <iannucci@chromium.org> Date: Thu Feb 09 03:18:29 2017 Roll luci-go infra/go/src/github.com/luci/luci-go: c571b954 [cipd] ignore package folders missing current link. 27fda207 [cipd] ignore .cipd/* while extracting. a3a9a22f Add a deadline for delegation token minting process. 845fd811 Add GetAccessToken function that performs JWT-based oauth flow. 41d1ef71 Rewrite LUCI RPC client in TypeScript. 9713e460 [cipd] make creating instances from cipd installations work. 48cb64fb Rewrite "luci-sleep-promise" in TypeScript. a915f631 Add clang format to TypeScript presubmit. 0ba94003 Build TypeScript modules, use "--outFile". 0ab29a10 [cipd] Fix root read-only-ness of pkg directory. 64c2ca4b milo: Add a build info Swarming implementation. BUG= 689359 Change-Id: I0c1a489ee7ba9f07bea71c2b0f5453a082f39ca8 Reviewed-on: https://chromium-review.googlesource.com/439876 Reviewed-by: Vadim Shtayura <vadimsh@chromium.org> Commit-Queue: Robbie Iannucci <iannucci@chromium.org> [modify] https://crrev.com/f1bc821ce6d1a223c2c3671c9be1cf69a13d717e/DEPS
,
Feb 9 2017
The following revision refers to this bug: https://chromium.googlesource.com/infra/infra/+/508f70d14492573c37760381060bbb5fc7904bfd commit 508f70d14492573c37760381060bbb5fc7904bfd Author: Robert Iannucci <iannucci@chromium.org> Date: Thu Feb 09 03:43:57 2017 Roll luci-go infra/go/src/github.com/luci/luci-go: 20d2f231 [cipd] Bump user agent version BUG= 689359 Change-Id: Ia804ebd4bd301ed7369047cbd69b01bd6d393a89 Reviewed-on: https://chromium-review.googlesource.com/439788 Commit-Queue: Robbie Iannucci <iannucci@chromium.org> Reviewed-by: Robbie Iannucci <iannucci@chromium.org> Reviewed-by: Vadim Shtayura <vadimsh@chromium.org> [modify] https://crrev.com/508f70d14492573c37760381060bbb5fc7904bfd/DEPS
,
Feb 9 2017
The following revision refers to this bug: https://chromium.googlesource.com/infra/infra/+/e10af929c39de4ad37a29c035948799a390dc6d7 commit e10af929c39de4ad37a29c035948799a390dc6d7 Author: Robert Iannucci <iannucci@chromium.org> Date: Thu Feb 09 08:02:11 2017 [cipd] roll cipd client version BUG= 689359 Change-Id: I65fcc43e458c1c67ed40dac0f10d12d94522f2df Reviewed-on: https://chromium-review.googlesource.com/439775 Commit-Queue: Robbie Iannucci <iannucci@chromium.org> Reviewed-by: Vadim Shtayura <vadimsh@chromium.org> [modify] https://crrev.com/e10af929c39de4ad37a29c035948799a390dc6d7/bootstrap/install_cipd_packages.py [modify] https://crrev.com/e10af929c39de4ad37a29c035948799a390dc6d7/go/deps.py [modify] https://crrev.com/e10af929c39de4ad37a29c035948799a390dc6d7/bootstrap/get_appengine.py
,
Feb 9 2017
The following revision refers to this bug: https://chromium.googlesource.com/chromium/tools/depot_tools/+/284af3255659442777e08898add8db24b13cd73e commit 284af3255659442777e08898add8db24b13cd73e Author: Robert Iannucci <iannucci@chromium.org> Date: Thu Feb 09 20:06:25 2017 [cipd] bump cipd client version. BUG= 689359 Change-Id: I6d76a5ac1c51db903bcfd00d91215981e9608bc8 Reviewed-on: https://chromium-review.googlesource.com/439783 Reviewed-by: Vadim Shtayura <vadimsh@chromium.org> Commit-Queue: Robbie Iannucci <iannucci@chromium.org> [modify] https://crrev.com/284af3255659442777e08898add8db24b13cd73e/cipd_client_version [modify] https://crrev.com/284af3255659442777e08898add8db24b13cd73e/recipe_modules/cipd/resources/bootstrap.py
,
Feb 9 2017
The following revision refers to this bug: https://chromium.googlesource.com/chromium/tools/depot_tools/+/284af3255659442777e08898add8db24b13cd73e commit 284af3255659442777e08898add8db24b13cd73e Author: Robert Iannucci <iannucci@chromium.org> Date: Thu Feb 09 20:06:25 2017 [cipd] bump cipd client version. BUG= 689359 Change-Id: I6d76a5ac1c51db903bcfd00d91215981e9608bc8 Reviewed-on: https://chromium-review.googlesource.com/439783 Reviewed-by: Vadim Shtayura <vadimsh@chromium.org> Commit-Queue: Robbie Iannucci <iannucci@chromium.org> [modify] https://crrev.com/284af3255659442777e08898add8db24b13cd73e/cipd_client_version [modify] https://crrev.com/284af3255659442777e08898add8db24b13cd73e/recipe_modules/cipd/resources/bootstrap.py
,
Feb 13 2017
This is fixed and deployed :) |
||||||
►
Sign in to add a comment |
||||||
Comment 1 by dsansome@chromium.org
, Feb 7 2017