From cf21af080b866ff1e2674a6839367d71b77f3a14 Mon Sep 17 00:00:00 2001 From: Kevin Veen-Birkenbach Date: Sat, 28 Nov 2026 18:56:20 +0000 Subject: [PATCH] fix(svc-bkp-nfs-2-local): deploy the NFS server with the backup guide MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The published Production guide of svc-bkp-nfs-2-local deployed only that role, so the web-app-docs CLI replay (PR 3103 Backup·NFS#0) ran no svc-storage-nfs-server task, nothing created /srv/nfs and the backup unit stopped with 'ERROR: /srv/nfs missing'. guide_companions adds the NFS server to the guide and its replay. 🎯 Fix: 85 % 💥 Break: 5 % 💸 Tokens: – ⏱️ Velocity: – 🛡️ Security: 100 % 🏆 Score: 81 🚦 Gate: ⛔ fix 85 % < 90 Created-with: https://s.veen.world/skills Co-Authored-By: Claude Opus 5.5 --- roles/svc-bkp-nfs-2-local/meta/services.yml | 2 ++ .../python/cli/build/docs/readme/test_generate.py | 12 ++++++++++++ 2 files changed, 14 insertions(+) diff --git a/roles/svc-bkp-nfs-2-local/meta/services.yml b/roles/svc-bkp-nfs-2-local/meta/services.yml index b4d44e48e6..9430f1adfe 100644 --- a/roles/svc-bkp-nfs-2-local/meta/services.yml +++ b/roles/svc-bkp-nfs-2-local/meta/services.yml @@ -18,6 +18,8 @@ nfs-2-local: provides: nfs_backup run_after: - svc-storage-nfs-server + guide_companions: + - svc-storage-nfs-server lifecycle: beta min_storage: 0GB cpus: "0.5" diff --git a/tests/unit/python/cli/build/docs/readme/test_generate.py b/tests/unit/python/cli/build/docs/readme/test_generate.py index 6723499b97..07c2dffbfe 100644 --- a/tests/unit/python/cli/build/docs/readme/test_generate.py +++ b/tests/unit/python/cli/build/docs/readme/test_generate.py @@ -7,6 +7,7 @@ import unittest from pathlib import Path from cli.build.docs.readme.generate import generate_readme +from utils.cache.files import PROJECT_ROOT from utils.roles.mapping import ( ROLE_FILE_TASKS_MAIN, ROLE_FILE_TEMPL_COMPOSE, @@ -89,5 +90,16 @@ class TestServiceProviderCountry(unittest.TestCase): self.assertNotIn("service_provider", block) +class TestGuideCompanions(unittest.TestCase): + def test_backup_nfs_guide_deploys_the_export_it_backs_up(self) -> None: + role = "svc-bkp-nfs-2-local" + text, _ = generate_readme(PROJECT_ROOT / "roles" / role, role) + block = text.split("### Production", 1)[1].split("## Credits", 1)[0] + apps = re.search(r"^APP=(\S+)$", block, re.MULTILINE) + + self.assertIsNotNone(apps) + self.assertEqual(apps.group(1).split(","), [role, "svc-storage-nfs-server"]) + + if __name__ == "__main__": unittest.main()