fix(chv-muse-r11fix): authd 层 1 叶子树补 errors.py + stub __init__、层 2 seed 补三键
层 1:真实的 cloud/chv/__init__.py import executor/orphans,拷进 authd 最小叶子树(/usr/local/lib/chv-authd)会让 chv-authd 在 import 时 ModuleNotFoundError 而 crash loop——先是 errors.py 缺失,补上后又在 executor 上失败(探针 fixprobe3)。新增 chv-guest/authd_init_stub.py(仅导出 ChvFailure),build.sh 拷 errors.py + stub 作叶子树的 __init__.py,不再拷真实包 __init__; P3_LIBS_PRESENT 条件加 errors.py;EXTRA_CONTENTS 加 errors.py 与 __init__.py;两 lockfile 脚本的 DECLARED_SOURCES 同款登记。 层 2:_seed_env_entries 把 guest-env 里的 GITEA_URL/GITEA_USER/SYNC_REPO 抄进 authd-seed(build_server 要求四键齐全,只 GITEA_TOKEN 即 ValueError);没有不补、不编 默认值。测试:seed 三键落盘/缺键不补、干跑夹具含新文件、lockfile 合成清单含新两项。
This commit is contained in:
1 parent
b41fb67026
commit
2d12179b9a
8 files changed
+110
-13
No files matched your search
@@ -575,13 +575,14 @@ class BuildDryRunTest(unittest.TestCase):
|
||||
"generate_lockfile.py", "chv-sync.sh",
|
||||
"chv-cell.py", "chv-broker.py", "chv-browser.py",
|
||||
"authd.py", "git-credential-chv-authd",
|
||||
"chv-authd.service"):
|
||||
"chv-authd.service", "authd_init_stub.py"):
|
||||
shutil.copy2(ROOT / "chv-guest" / name,
|
||||
os.path.join(guest, name))
|
||||
shutil.copy2(ROOT / "host.py", os.path.join(repo, "host.py"))
|
||||
# round-11:build.sh 要求 P3 云端叶子模块在仓里(fail-fast),
|
||||
# 夹具须一并拷入,否则干跑在 P3 预检就失败。
|
||||
for rel in ("cloud/chv/authd.py", "cloud/chv/sentinel.py",
|
||||
"cloud/chv/errors.py",
|
||||
"cloud/__init__.py", "cloud/chv/__init__.py"):
|
||||
dest = os.path.join(repo, rel)
|
||||
os.makedirs(os.path.dirname(dest), exist_ok=True)
|
||||
@@ -623,7 +624,11 @@ class BuildDryRunTest(unittest.TestCase):
|
||||
"systemctl enable chv-broker chv-browser",
|
||||
"chv-authd", "git-credential-chv-authd",
|
||||
"systemctl enable chv-authd",
|
||||
"systemctl start chv-authd"):
|
||||
"systemctl start chv-authd",
|
||||
# round-11 真机修复(层 1):叶子树含
|
||||
# errors.py + stub __init__,不拷真实的
|
||||
# cloud/chv/__init__.py。
|
||||
"errors.py", "authd_init_stub.py"):
|
||||
self.assertIn(needle, out, needle)
|
||||
# P1 文件不在本分支:干跑只警告、不失败。
|
||||
self.assertIn("vsock_notify.py 不在仓库里", out)
|
||||
|
||||
Reference in new issue
Block a user