mirror of
https://chromium.googlesource.com/chromium/tools/depot_tools.git
synced 2026-01-11 18:51:29 +00:00
Revert "Changing location of temp racing directory."
This reverts commit 566c3772a0.
Reason for revert: Seems to be causing flaky failures in win-trace angle try builder, see b/323830218 for details.
Original change's description:
> Changing location of temp racing directory.
>
> Put temporary racing artifacts into
> .reproxy_tmp/racing/<timestamp>-<hash> in prep for permitting
> simultaneous builds against the same output directory.
>
> Bug: b/321554715
> Change-Id: Iae9af9aed03197184e6d11da010d0bb10779ed23
> Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/5273209
> Reviewed-by: Takuto Ikuta <tikuta@chromium.org>
> Commit-Queue: Michael Savigny <msavigny@google.com>
> Reviewed-by: Junji Watanabe <jwata@google.com>
> Reviewed-by: Ben Segall <bentekkie@google.com>
Bug: b/321554715
Change-Id: Ib6fa285bb435d7c0d82960633364669e6575d73b
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/5286354
Commit-Queue: Michael Savigny <msavigny@google.com>
Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
Commit-Queue: Ben Segall <bentekkie@google.com>
Reviewed-by: Ben Segall <bentekkie@google.com>
Auto-Submit: Michael Savigny <msavigny@google.com>
This commit is contained in:
@@ -6,7 +6,6 @@ the reclient lifecycle safely. It will automatically start
|
||||
reproxy before running ninja and stop reproxy when build stops
|
||||
for any reason e.g. build completion, keyboard interrupt etc."""
|
||||
|
||||
import atexit
|
||||
import contextlib
|
||||
import datetime
|
||||
import hashlib
|
||||
@@ -195,23 +194,14 @@ def set_reproxy_path_flags(out_dir, make_dirs=True):
|
||||
Windows Only:
|
||||
RBE_server_address=pipe://md5(out_dir/.reproxy_tmp)/reproxy.pipe
|
||||
"""
|
||||
|
||||
os.environ.setdefault("AUTONINJA_BUILD_ID", str(uuid.uuid4()))
|
||||
run_sub_dir = datetime_now().strftime(
|
||||
'%Y%m%dT%H%M%S.%f') + "_" + os.environ["AUTONINJA_BUILD_ID"]
|
||||
tmp_dir = os.path.abspath(os.path.join(out_dir, '.reproxy_tmp'))
|
||||
log_dir = os.path.join(tmp_dir, 'logs')
|
||||
run_log_dir = os.path.join(log_dir, run_sub_dir)
|
||||
run_log_dir = os.path.join(
|
||||
log_dir,
|
||||
datetime_now().strftime('%Y%m%dT%H%M%S.%f') + "_" +
|
||||
os.environ["AUTONINJA_BUILD_ID"])
|
||||
racing_dir = os.path.join(tmp_dir, 'racing')
|
||||
run_racing_dir = os.path.join(racing_dir, run_sub_dir)
|
||||
|
||||
# Clear out old racing directories, if there are any. They are kept
|
||||
# for a single build in the event the contents are needed for debugging.
|
||||
if os.path.exists(racing_dir):
|
||||
for rcd in os.listdir(racing_dir):
|
||||
if os.path.isdir(os.path.join(racing_dir, rcd)):
|
||||
shutil.rmtree(os.path.join(racing_dir, rcd))
|
||||
|
||||
cache_dir = find_cache_dir(tmp_dir)
|
||||
if make_dirs:
|
||||
if os.path.isfile(os.path.join(log_dir, "rbe_metrics.txt")):
|
||||
@@ -229,8 +219,6 @@ def set_reproxy_path_flags(out_dir, make_dirs=True):
|
||||
os.makedirs(run_log_dir, exist_ok=True)
|
||||
os.makedirs(cache_dir, exist_ok=True)
|
||||
os.makedirs(racing_dir, exist_ok=True)
|
||||
os.makedirs(run_racing_dir, exist_ok=True)
|
||||
|
||||
old_log_dirs = [
|
||||
d for d in os.listdir(log_dir)
|
||||
if os.path.isdir(os.path.join(log_dir, d))
|
||||
@@ -245,7 +233,7 @@ def set_reproxy_path_flags(out_dir, make_dirs=True):
|
||||
os.environ.setdefault("RBE_proxy_log_dir", run_log_dir)
|
||||
os.environ.setdefault("RBE_log_dir", run_log_dir)
|
||||
os.environ.setdefault("RBE_cache_dir", cache_dir)
|
||||
os.environ.setdefault("RBE_racing_tmp_dir", run_racing_dir)
|
||||
os.environ.setdefault("RBE_racing_tmp_dir", racing_dir)
|
||||
if sys.platform.startswith('win'):
|
||||
pipe_dir = hashlib.md5(tmp_dir.encode()).hexdigest()
|
||||
os.environ.setdefault("RBE_server_address",
|
||||
@@ -306,9 +294,7 @@ def build_context(argv, tool):
|
||||
try:
|
||||
set_reproxy_path_flags(ninja_out)
|
||||
except OSError as e:
|
||||
print(
|
||||
f"Error creating reproxy temporary directories in output dir: {e}",
|
||||
file=sys.stderr)
|
||||
print(f"Error creating reproxy_tmp in output dir: {e}", file=sys.stderr)
|
||||
yield 1
|
||||
return
|
||||
|
||||
|
||||
Reference in New Issue
Block a user