[client] Fix bug in NamedCache.install()

We weren't hit by this bug before just by chance.

The bug happened on Fuchsia fleet because they started using a two
letter named cache.
The bug is that it looked for the wrong place to delete a stale symlink,
and it hit an random two letters previous named cache and deleted it,
causing internal inconsistency.

Rename variables to help with clarity, 'path' is quite generic.

Improve comments.

Include whitespace change in swarming to ensure its tests run too.

TBR=qyearsley@chromium.org

Change-Id: I96e26205b75043a3505d6aefb4fc697e82e1e07f
Reviewed-on: https://chromium-review.googlesource.com/c/1436115
Reviewed-by: Marc-Antoine Ruel <maruel@chromium.org>
Commit-Queue: Marc-Antoine Ruel <maruel@chromium.org>
Cr-Mirrored-From: https://chromium.googlesource.com/infra/luci/luci-py
Cr-Mirrored-Commit: bd2a81bbd3a1c96392edce9f85604215a77e9d5f
1 file changed
tree: ff7fcd3856b269b8c582e772bc3ffea2b3091220
  1. example/
  2. libs/
  3. proto/
  4. tests/
  5. third_party/
  6. tools/
  7. utils/
  8. .gitignore
  9. auth.py
  10. cipd.py
  11. isolate.py
  12. isolate_format.py
  13. isolate_storage.py
  14. isolated_format.py
  15. isolateserver.py
  16. LICENSE
  17. local_caching.py
  18. LUCI_CONTEXT.md
  19. OWNERS
  20. PRESUBMIT.py
  21. README.md
  22. README.py
  23. run_isolated.py
  24. swarming.py
  25. trace_inputs.py
  26. WATCHLISTS
README.md

LUCI Python Client

This is the Python Client code for LUCI. It's part of the main python repo, and is also mirrored into a standalone client-py repo.

To contribute changes you need to clone the main python repo and then use git cl upload. The client-py repo mirror (which appears in Chromium's third_party directory) cannot be contributed to directly.

License

This project is licensed under Apache v2.0 license. See LICENSE for details.