Skip to content

Commit

Permalink
run_isolated: remove --use-symlink flag
Browse files Browse the repository at this point in the history
This was introduced in
luci/luci-py#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 <[email protected]>
Reviewed-by: Marc-Antoine Ruel <[email protected]>
Reviewed-by: Junji Watanabe <[email protected]>
Commit-Queue: Junji Watanabe <[email protected]>
Cr-Mirrored-From: https://chromium.googlesource.com/infra/luci/luci-py
Cr-Mirrored-Commit: d71e1ee21c94f954652529d301e51aef0903f936
  • Loading branch information
Takuto Ikuta authored and Commit Bot committed Dec 9, 2019
1 parent 86c6f69 commit 16fac4b
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 14 deletions.
13 changes: 3 additions & 10 deletions run_isolated.py
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down Expand Up @@ -573,15 +571,15 @@ 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(
isolated_hash=isolated_hash,
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, {
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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',
Expand Down Expand Up @@ -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,
Expand Down
4 changes: 0 additions & 4 deletions tests/run_isolated_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -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'),
Expand Down Expand Up @@ -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={},
Expand Down Expand Up @@ -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={},
Expand Down Expand Up @@ -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={},
Expand Down

0 comments on commit 16fac4b

Please sign in to comment.