sync: Improve UI and error reporting for interleaved mode
This fixes two issues: 1. the progress bar could show a count greater than the total if new projects were discovered mid-sync. Update the progress bar total dynamically 2. Make "Stall detected" error message more actionable Bug: 432206932 Change-Id: Ie2a4ada5b1770cae0302fb06590641c522cbb7e7
This commit is contained in:
parent
5d95ba8d85
commit
6ac6b90b05
1 changed files with 16 additions and 5 deletions
|
@ -2505,12 +2505,20 @@ later is required to fix a server side protocol bug.
|
|||
|
||||
pending_relpaths = {p.relpath for p in projects_to_sync}
|
||||
if previously_pending_relpaths == pending_relpaths:
|
||||
logger.error(
|
||||
"Stall detected in interleaved sync, not all "
|
||||
"projects could be synced."
|
||||
stalled_projects_str = "\n".join(
|
||||
f" - {path}"
|
||||
for path in sorted(list(pending_relpaths))
|
||||
)
|
||||
logger.error(
|
||||
"The following projects failed and could not "
|
||||
"be synced:\n%s",
|
||||
stalled_projects_str,
|
||||
)
|
||||
# Ensure these are included in the final error report.
|
||||
self._interleaved_err_checkout = True
|
||||
self._interleaved_err_checkout_results.extend(
|
||||
list(pending_relpaths)
|
||||
)
|
||||
err_event.set()
|
||||
break
|
||||
previously_pending_relpaths = pending_relpaths
|
||||
|
||||
self.get_parallel_context()[
|
||||
|
@ -2570,6 +2578,9 @@ later is required to fix a server side protocol bug.
|
|||
manifest=manifest,
|
||||
all_manifests=not opt.this_manifest_only,
|
||||
)
|
||||
new_total = len(project_list)
|
||||
if new_total > pm.total:
|
||||
pm.total = new_total
|
||||
finally:
|
||||
sync_event.set()
|
||||
sync_progress_thread.join()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue