From 16fac4b06a268210429cfa69d545ba1816d0cdf5 Mon Sep 17 00:00:00 2001 From: Takuto Ikuta Date: Mon, 9 Dec 2019 04:57:18 +0000 Subject: [PATCH] run_isolated: remove --use-symlink flag This was introduced in https://github.com/luci/luci-py/issues/270 But I will use go isolated by default, and the client does not support symlink. So let me remove this flag first from run_isolated. Bug: 932396 Change-Id: I2acacb94288b356059632fa602f382b2f96ccd99 Reviewed-on: https://chromium-review.googlesource.com/c/infra/luci/luci-py/+/1954838 Auto-Submit: Takuto Ikuta Reviewed-by: Marc-Antoine Ruel Reviewed-by: Junji Watanabe Commit-Queue: Junji Watanabe Cr-Mirrored-From: https://chromium.googlesource.com/infra/luci/luci-py Cr-Mirrored-Commit: d71e1ee21c94f954652529d301e51aef0903f936 --- run_isolated.py | 13 +++---------- tests/run_isolated_test.py | 4 ---- 2 files changed, 3 insertions(+), 14 deletions(-) diff --git a/run_isolated.py b/run_isolated.py index 791c2b1..4d21a81 100755 --- a/run_isolated.py +++ b/run_isolated.py @@ -205,8 +205,6 @@ 'switch_to_account', # Context manager dir => CipdInfo, see install_client_and_packages. 'install_packages_fn', - # Create tree with symlinks instead of hardlinks. - 'use_symlinks', # Use go isolated client. 'use_go_isolated', # Cache directory for go isolated client. @@ -573,7 +571,7 @@ def _fetch_and_map_with_go(isolated_hash, storage, cache, outdir, go_cache_dir, # TODO(crbug.com/932396): remove this function. -def fetch_and_map(isolated_hash, storage, cache, outdir, use_symlinks): +def fetch_and_map(isolated_hash, storage, cache, outdir): """Fetches an isolated tree, create the tree and returns (bundle, stats).""" start = time.time() bundle = isolateserver.fetch_isolated( @@ -581,7 +579,7 @@ def fetch_and_map(isolated_hash, storage, cache, outdir, use_symlinks): storage=storage, cache=cache, outdir=outdir, - use_symlinks=use_symlinks) + use_symlinks=False) hot = (collections.Counter(cache.used) - collections.Counter(cache.added)).elements() return bundle, { @@ -795,8 +793,7 @@ def map_and_run(data, constant_run_path): isolated_hash=data.isolated_hash, storage=data.storage, cache=data.isolate_cache, - outdir=run_dir, - use_symlinks=data.use_symlinks) + outdir=run_dir) isolated_stats['download'].update(stats) change_tree_read_only(run_dir, bundle.read_only) # Inject the command @@ -1128,9 +1125,6 @@ def create_option_parser(): help='Cleans the cache, trimming it necessary and remove corrupted items ' 'and returns without executing anything; use with -v to know what ' 'was done') - parser.add_option( - '--use-symlinks', action='store_true', - help='Use symlinks instead of hardlinks') parser.add_option( '--use-go-isolated', action='store_true', @@ -1505,7 +1499,6 @@ def install_named_caches(run_dir): bot_file=options.bot_file, switch_to_account=options.switch_to_account, install_packages_fn=install_packages_fn, - use_symlinks=bool(options.use_symlinks), use_go_isolated=bool(options.use_go_isolated), go_cache_dir=options.go_cache_dir, env=options.env, diff --git a/tests/run_isolated_test.py b/tests/run_isolated_test.py index 6499e34..1685858 100755 --- a/tests/run_isolated_test.py +++ b/tests/run_isolated_test.py @@ -293,7 +293,6 @@ def get_storage(server_ref): self.mock(isolateserver, 'get_storage', get_storage) cmd = [ - '--use-symlinks', '--no-log', '--isolated', isolated_hash, '--cache', os.path.join(self.tempdir, 'isolated_cache'), @@ -349,7 +348,6 @@ def add(i, _): bot_file=None, switch_to_account=False, install_packages_fn=run_isolated.noop_install_packages, - use_symlinks=False, use_go_isolated=False, go_cache_dir=None, env={}, @@ -1050,7 +1048,6 @@ def test_output(self): bot_file=None, switch_to_account=False, install_packages_fn=run_isolated.noop_install_packages, - use_symlinks=False, use_go_isolated=False, go_cache_dir=None, env={}, @@ -1425,7 +1422,6 @@ def _run_test(self, isolated, command, extra_args): bot_file=None, switch_to_account=False, install_packages_fn=run_isolated.noop_install_packages, - use_symlinks=False, use_go_isolated=False, go_cache_dir=None, env={},