feat(deploy,xceadmin): standalone xceadmin packaging + deploy-ha usability (bug-1566)
Three related enhancements to make /xce-deploy-ha's output a self-contained, directly-usable cluster for manual testing: - xceadmin now builds an installable wheel (meson-build.sh) with correct dependencies (click/pycapnp/PyYAML/jsonschema, verified against actual imports -- pyproject.toml was missing several). - deploy-ha.sh resolves the deploy environment's own bash ($BASH_BIN, baked into every generated script's shebang -- this environment's deploy-ha.sh had drifted to #!/bin/sh while still using bash-only syntax) and generates scripts/start-worker.sh / scripts/start-scheduler.sh sharing the controllers' --peers, plus a standalone xceadmin install (wheel extracted directly, resolved $PYTHONPATH baked into a wrapper script -- nix devShell packages are $PYTHONPATH entries, not merged into python3's own site-packages, so a --system-site-packages venv can't see them). - bug-1566: xceadmin's --controller option had no relationship to a deployment's actual peers (hardcoded localhost:9991 default) -- every command required an explicit --controller or silently tried the wrong port. Fixed via a $XCEADMIN_CONTROLLER envvar fallback (click precedence: explicit flag > envvar > bare default), exported by deploy-ha.sh's generated scripts/xceadmin wrapper. Fixed/validated via TDD + live reproduction against a real deployed cluster in a fully stripped environment. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
This commit is contained in:
parent
1c943e98fe
commit
0f1df4998e
5 changed files with 266 additions and 12 deletions
|
|
@ -9,7 +9,22 @@ description = "XCE cluster configuration admin CLI (config build / config push)"
|
|||
requires-python = ">=3.10"
|
||||
dependencies = [
|
||||
"click>=8.0",
|
||||
"pycapnp>=1.3",
|
||||
"PyYAML>=6.0",
|
||||
"jsonschema>=4.0",
|
||||
]
|
||||
# All four are real runtime imports (capnp/click/jsonschema/yaml — grep
|
||||
# src/xceadmin src/xcecommon for `^import |^from `), not just dev/test
|
||||
# tooling: an installed-but-undeclared dependency here would let `pip
|
||||
# install` "succeed" while leaving the CLI broken at first real use
|
||||
# (`ModuleNotFoundError` the moment `config build` touches capnp/jsonschema/
|
||||
# yaml) — exactly the class of gap a wheel built for install-outside-this-
|
||||
# repo needs to not have. pycapnp specifically: the nix dev shell's
|
||||
# python3Packages.pycapnp (src/nixSupport/xce.nix) is preferred when
|
||||
# available because it links against the same capnproto C++ runtime this
|
||||
# repo's C code uses; PyPI's prebuilt pycapnp wheels are usually fine too
|
||||
# for a plain `pip install` outside the nix shell, but that's a "usually,"
|
||||
# not the guaranteed-consistent link this repo's own build gets.
|
||||
|
||||
# Wired into meson (src/xceadmin/meson.build custom_target, pulled in by
|
||||
# src/meson.build's subdir('xceadmin')) so `nix build .#xcecore[_debug]`
|
||||
|
|
@ -31,10 +46,13 @@ include = ["xceadmin*", "xcecommon*"]
|
|||
"" = "src"
|
||||
|
||||
# Bundled copies of controller.capnp/c.capnp and the 7 JSON validation
|
||||
# schemas (synced from src/schema/ and src/configs/schema/ by
|
||||
# src/tools/xce-build.sh's `xceadmin)` case, see Requirement 5.5). Without
|
||||
# this, a non-editable `pip install .` builds a wheel containing only *.py
|
||||
# files and silently drops schema_files/ — an editable install would never
|
||||
# catch this since it resolves straight into the checked-out source tree.
|
||||
# schemas (synced from src/schema/ and src/configs/schema/ into
|
||||
# xcecommon/schema_files/ by src/xceadmin/meson-build.sh, the meson
|
||||
# custom_target xce-build.sh's `xceadmin)` case now delegates to, before
|
||||
# either the pinned test-install or the wheel build run against that same
|
||||
# tree — see Requirement 5.5). Without this, a non-editable `pip install .`
|
||||
# (or a wheel build) produces a package containing only *.py files and
|
||||
# silently drops schema_files/ — an editable install would never catch this
|
||||
# since it resolves straight into the checked-out source tree.
|
||||
[tool.setuptools.package-data]
|
||||
xcecommon = ["schema_files/*.capnp", "schema_files/json/*.schema.json"]
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue