raw_io/api.py throws on read-only files on Windows |
||
Issue descriptionhttps://cs.chromium.org/chromium/infra/recipes-py/recipe_modules/raw_io/api.py?l=191 This is due to the use of shutil.rmtree() which doesn't handle read-only bit on Windows. swarming client code has a quite intense rmtree() implementation that works around all kind of known issues. https://cs.chromium.org/chromium/infra/luci/client/utils/file_path.py?l=1157 In practice we do not the recipe to run code as misbehaved as Swarming can expect (e.g. tests creating files as root). As such, we should just tweak the function to handle read-only files and this would be sufficient. This is currently happening while trying to roll recent swarming client code into chromium src, which creates read-only files where it used to not do.
,
May 24 2018
The following revision refers to this bug: https://chromium.googlesource.com/infra/luci/recipes-py/+/611cfbdc328b50144e2790ed1e4b9db24adb9eea commit 611cfbdc328b50144e2790ed1e4b9db24adb9eea Author: Marc-Antoine Ruel <maruel@chromium.org> Date: Thu May 24 19:50:05 2018 [raw_io] Make it succeed even with read only files. Use a simplified algorithm compared to swarming's client file_path.py, as we don't expect the steps here to be as egregious in the file ACL than what Swarming tasks can do. Tested manually on Windows by copy pasting the code, creating a directory and a file in it, running 'attrib +r' on the file. Testing with and without the onerror handler. Bug: 846383 Change-Id: I13181eb381edb360cbbe69d95c36a266ffb8bb03 Reviewed-on: https://chromium-review.googlesource.com/1072068 Reviewed-by: Stephen Martinis <martiniss@chromium.org> Commit-Queue: Marc-Antoine Ruel <maruel@chromium.org> [modify] https://crrev.com/611cfbdc328b50144e2790ed1e4b9db24adb9eea/recipe_modules/raw_io/api.py
,
Aug 10
Should we mark this fixed? I was searching for an unrelated bug, and noticed this looks like it could be closed.
,
Aug 10
Yeah looks fixed to me |
||
►
Sign in to add a comment |
||
Comment 1 by mar...@chromium.org
, May 24 2018