fix: keep unread trees in the source paths record

A sitesources run that GitLab rate-limited dropped about twenty trees it
never read from website/src/data/source-paths.json. A tree key names a
pinned sha, so the last record's entry for an unread tree still holds and
is carried over, in sitesources and in profile_sync's refresh.
This commit is contained in:
Abdessamad Derraz committed 2026-10-26 22:52:23 +01:00
1 parent 02fb76b850
commit f3a161b60e
3 files changed
+40

No files matched your search

+3
View File
@@ -4783,6 +4783,9 @@ def _refresh_source_paths(args: argparse.Namespace) -> None:
held, unread = sitesources.build_source_paths(
profiles, [sitesources.TREE_CACHE], fetch=True
)
held = sitesources.keep_unread(
held, unread, sitesources.read_record(sitesources.SOURCE_PATHS)
)
sitesources.SOURCE_PATHS.parent.mkdir(parents=True, exist_ok=True)
write_if_changed(
str(sitesources.SOURCE_PATHS), json.dumps(held, indent=1, sort_keys=True) + "\n"