Compatibility watch: check the patch's assumptions against every TrueNAS release line
CI / shell (shellcheck + syntax) (push) Failing after 5s
TrueNAS compatibility / compat (push) Failing after 1m6s
CI / python 3.13 (push) Failing after 1m11s
CI / python 3.11 (push) Successful in 1m28s
CI / python 3.12 (push) Successful in 1m29s

TrueNAS 26 rewrites cloud_backup from async to sync. Every block the nested
module injects is an async wrapper around an awaited original, so on 26 it hands
sync.py a coroutine where it unpacks a tuple.

tools/compat.py records what each module assumes and checks it two ways: CI runs
it against iX's source at every release line (including master and the current
BETA) and files a bug report when an unreleased line breaks; apply.sh runs it
against the middlewared actually installed and refuses to apply a module whose
assumptions no longer hold. Stock TrueNAS without a feature beats TrueNAS with a
broken one.

Workflows run on both forges; only the release/issue API calls differ.
This commit is contained in:
2026-07-13 17:25:37 +00:00
parent 4ced730d65
commit 5cbb7def6f
3 changed files with 256 additions and 34 deletions
+7 -2
View File
@@ -108,9 +108,14 @@ class TestAgainstTheRealRepo:
f"scripts say v{version} but the newest CHANGELOG entry is v{newest}"
)
def test_check_passes_for_the_current_version(self):
def test_the_repo_is_always_releasable_as_a_candidate(self):
# Deliberately checked as an rc, not as a stable release. `main` carries
# work under `## Unreleased` most of the time, and the stable gate refuses
# that on purpose -- shipping with work stranded mid-section is how you get
# a release that needs another release. So the invariant main must uphold is
# the candidate one: versions agree, and the CHANGELOG section exists.
version = next(iter({normalise(v) for v in script_versions(REPO).values()}))
assert check(version, REPO) == []
assert check(f"v{version}-rc1", REPO) == []
class TestCheckCatchesMistakes: