From 353bc7ec5e16ab49dae58e30a5618b442446bf58 Mon Sep 17 00:00:00 2001 From: ebembi-crdb Date: Thu, 21 May 2026 20:56:56 +0530 Subject: [PATCH 1/2] chore: make GENERATED_DIAGRAMS_REPO configurable via env var Allows the generated-diagrams repo reference in validate_branch_existence.py to be overridden via the GENERATED_DIAGRAMS_REPO environment variable. Defaults to `cockroachdb/generated-diagrams` (unchanged behavior since that repo is not moving). Part of Project Stanley (EDUENG-720, Ticket 5). Co-Authored-By: Claude Opus 4.6 --- .github/scripts/validate_branch_existence.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/scripts/validate_branch_existence.py b/.github/scripts/validate_branch_existence.py index 15a9e46a590..5ba5924f63a 100644 --- a/.github/scripts/validate_branch_existence.py +++ b/.github/scripts/validate_branch_existence.py @@ -37,7 +37,7 @@ import urllib.request from pathlib import Path -GENERATED_DIAGRAMS_REPO = "cockroachdb/generated-diagrams" +GENERATED_DIAGRAMS_REPO = os.environ.get("GENERATED_DIAGRAMS_REPO", "cockroachdb/generated-diagrams") GITHUB_API_BASE = "https://api.github.com" VERSIONS_CSV = Path("src/current/_data/versions.csv") From 09775e2133605c5a0eaee47bdc80c4ba63e237d1 Mon Sep 17 00:00:00 2001 From: ebembi-crdb Date: Mon, 25 May 2026 19:52:59 +0530 Subject: [PATCH 2/2] chore: update defaults to cockroachlabs org Co-Authored-By: Claude Opus 4.6 --- .github/scripts/validate_branch_existence.py | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/.github/scripts/validate_branch_existence.py b/.github/scripts/validate_branch_existence.py index 5ba5924f63a..2597e7b06dd 100644 --- a/.github/scripts/validate_branch_existence.py +++ b/.github/scripts/validate_branch_existence.py @@ -3,7 +3,8 @@ validate_branch_existence.py (EDUENG-614) For every row in src/current/_data/versions.csv, verifies that the listed -crdb_branch_name exists as a branch in cockroachdb/generated-diagrams. +crdb_branch_name exists as a branch in the generated-diagrams repo +(configurable via GENERATED_DIAGRAMS_REPO env var, default: cockroachdb/generated-diagrams). Also flags entries where versions.csv still points to an older branch even though the "natural" release-X.Y branch for that version now exists @@ -119,7 +120,7 @@ def run_checks(rows: list[dict], _exists_fn=None) -> list[dict]: "branch": branch, "message": ( f"{version}: crdb_branch_name={branch!r} does not exist " - f"in cockroachdb/generated-diagrams." + f"in {GENERATED_DIAGRAMS_REPO}." ), }) continue @@ -137,7 +138,7 @@ def run_checks(rows: list[dict], _exists_fn=None) -> list[dict]: "expected": expected, "message": ( f"{version}: crdb_branch_name={branch!r} but {expected!r} " - f"now exists in cockroachdb/generated-diagrams. " + f"now exists in {GENERATED_DIAGRAMS_REPO}. " f"Update versions.csv to use {expected!r}." ), }) @@ -154,7 +155,7 @@ def format_comment(failures: list[dict]) -> str: return ( "## Branch Existence Check: Passed\n\n" "All `crdb_branch_name` entries in `versions.csv` exist in " - "`cockroachdb/generated-diagrams`." + f"`{GENERATED_DIAGRAMS_REPO}`." ) lines = [ @@ -225,7 +226,7 @@ def main() -> None: _run_self_tests() rows = load_versions_csv() - print(f"Checking {len(rows)} versions.csv entries against cockroachdb/generated-diagrams...\n") + print(f"Checking {len(rows)} versions.csv entries against {GENERATED_DIAGRAMS_REPO}...\n") failures = run_checks(rows) comment = format_comment(failures)