Skip to content

Commit ca8e3a6

Browse files
committed
fix(dump): skip unchanged pages and open the refresh PR on develop
The 2026-09-11 dump-refresh finished generating after 5h02m, then was cancelled at the job timeout while create-pull-request staged the tree: every one of the ~1M pages had been rewritten, so git rehashed them all. Identical pages are now left untouched. The PR also targeted main, which only moves through release PRs. Refs #1
1 parent 57d449f commit ca8e3a6

2 files changed

Lines changed: 11 additions & 4 deletions

File tree

‎.github/workflows/dump-refresh.yml‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ jobs:
2727
runs-on: ubuntu-latest
2828
# Well under GitHub's 6h ceiling, which reports an over-run as
2929
# "cancelled" rather than failed and so hides the breakage.
30-
timeout-minutes: 330
30+
timeout-minutes: 355
3131
env:
3232
TECHAPI_WRITE_TOKEN: ${{ secrets.TECHENGINEBOT_TOKEN || secrets.TECHAPI_TOKEN }}
3333
# seed/validate/dump read the data tree from here.
@@ -91,7 +91,7 @@ jobs:
9191
path: ./techapi
9292
token: ${{ env.TECHAPI_WRITE_TOKEN }}
9393
branch: dump-refresh/${{ steps.meta.outputs.date }}
94-
base: main
94+
base: develop
9595
add-paths: |
9696
site/public/v1
9797
site/public/openapi.json

‎app/dump.py‎

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -57,8 +57,15 @@ def resolve_collections(exclude: list[str] | None = None) -> list[str]:
5757

5858

5959
def _write_json(path: Path, data: object) -> None:
60-
path.parent.mkdir(parents=True, exist_ok=True)
61-
path.write_text(json.dumps(data, indent=2, ensure_ascii=False) + "\n", encoding="utf-8")
60+
text = json.dumps(data, indent=2, ensure_ascii=False) + "\n"
61+
# Leave identical pages untouched: rewriting ~1M unchanged files resets
62+
# their mtimes, and git then rehashes the whole tree when committing.
63+
try:
64+
if path.read_text(encoding="utf-8") == text:
65+
return
66+
except FileNotFoundError:
67+
path.parent.mkdir(parents=True, exist_ok=True)
68+
path.write_text(text, encoding="utf-8")
6269

6370

6471
def _fetch_all(client: TestClient, resource: str) -> tuple[int, list[dict[str, Any]]]:

0 commit comments

Comments
 (0)