SHARED.md points to the dredd-core pin instead of quoting it
Every repin from v0.17.0 to v0.21.0 left SHARED.md's quoted version behind and failed "Deploy pre-flight". The quote existed so the page would not mislead; checking that it matched only moved the failure to CI. requirements.txt is now the one place the version is written. deploy_check.py fails if SHARED.md quotes one again, and if it stops saying where the pin lives. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Opus 5.5
parent
47b0ed44a4
commit
e0bce880a6
@@ -6,11 +6,9 @@ failed if they drifted. This document was the list, and the rule was "change bot
|
||||
the same commit".
|
||||
|
||||
That is over. The substrate is **[`dredd-core`](https://github.com/Alpaq92/dredd-core)** — a
|
||||
private package, Apache-2.0, pinned in `backend/requirements.txt`:
|
||||
|
||||
```
|
||||
dredd-core @ git+https://github.com/Alpaq92/dredd-core@v0.21.0
|
||||
```
|
||||
private package, Apache-2.0, pinned to a git tag in `backend/requirements.txt`. That line is the
|
||||
one place the version is written, so this page does not repeat it: a quoted copy fell behind the
|
||||
real pin on four repins in a row, and `deploy_check.py` failed CI every time.
|
||||
|
||||
Both applications import it. There is nothing left to keep diff-clean, because there is only one
|
||||
copy, and "which version" is a line in a requirements file rather than a property of two working
|
||||
|
||||
@@ -179,14 +179,18 @@ check("DREDD_CORE_TOKEN" in read(".github/workflows/ci.yml"),
|
||||
"CI cannot install dredd-core: the private repo needs DREDD_CORE_TOKEN",
|
||||
"CI authenticates to the private dredd-core repo")
|
||||
|
||||
# SHARED.md quotes the pin. A quoted version that has fallen behind the real one is worse than no
|
||||
# quote — it is documentation that reads as current and is wrong, which is how somebody ends up
|
||||
# debugging against the wrong core. Found exactly that way: SHARED.md said v0.6.0 for a while
|
||||
# after requirements.txt moved to v0.7.0.
|
||||
_pin = requirements.split("dredd-core @ git+")[1].splitlines()[0].strip()
|
||||
check(_pin in read("SHARED.md"),
|
||||
f"SHARED.md quotes a different dredd-core pin than requirements.txt ({_pin})",
|
||||
"SHARED.md quotes the pin that is actually installed")
|
||||
# SHARED.md names where the pin lives and does not quote it. A quoted version that has fallen
|
||||
# behind the real one is worse than no quote: it reads as current and is wrong, which is how
|
||||
# somebody ends up debugging against the wrong core (SHARED.md said v0.6.0 after requirements.txt
|
||||
# moved to v0.7.0). Checking that the quote matched only moved the failure: every repin from
|
||||
# v0.17.0 to v0.21.0 broke CI here. One place for the version leaves nothing to keep in step.
|
||||
_shared = read("SHARED.md")
|
||||
check(not re.search(r"dredd-core\s*@\s*git\+\S*@v\d", _shared),
|
||||
"SHARED.md quotes a dredd-core version: it goes stale on the next repin, "
|
||||
"point to backend/requirements.txt instead",
|
||||
"SHARED.md points to requirements.txt for the dredd-core pin instead of quoting it")
|
||||
check("backend/requirements.txt" in _shared,
|
||||
"SHARED.md no longer says where the dredd-core pin lives (backend/requirements.txt)")
|
||||
|
||||
# ── the Netlify front door stays honest ──────────────────────────────────────
|
||||
# It publishes the console alone. The demo mock is what makes a backend-less deploy worth having,
|
||||
|
||||
Reference in New Issue
Block a user