Update to MADSci v0.8#61
Open
RyanTheRobothead wants to merge 3 commits into
Open
Conversation
Lifts the module from v0.5 (the previous release on main) through v0.6
to v0.8 in one go for the RAPID 446 grimm rebuild.
The v0.5 -> v0.6 work was carried in the working tree but never landed
upstream; layering v0.8 changes on top here brings everything together.
This branch is preferred over the existing `madsci_0_7` branch, which
had the API rename done but commented out the entire `startup_handler`
resource-creation block (deck / slots / mounts) -- a regression we
explicitly avoided.
v0.5 -> v0.6 (carried forward):
- Resource names now in v0.8 convention: {node_name}.deck,
{node_name}.deck.nest_{i}, {node_name}.{mount}_mount.
- `slot_count` -> `nest_count` in the deck container attributes.
- `add_to_database=True` dropped from sub-templates (parent's
`add_to_database=True` handles them).
- `STOPPED` value added to the RobotStatus enum.
- `rate_limit_requests: int = 500` config option added.
v0.6 -> v0.8 (this round):
- pyproject.toml + pdm.lock: pin madsci.{node_module,client,common}~=0.8.0;
bump requires-python to >=3.10.
- src/ot2_rest_node.py: rename self.node_definition.{node_name,node_id}
-> self.node_info.* (20 sites: 4 in startup_handler for protocols path
+ deck/slot/mount names, 8 in _create_ot2_templates for created_by=,
8 in execute() for log messages).
- Dockerfile rewritten on the v0.8 base:
- Pin to ghcr.io/ad-sdl/madsci:v0.8.0.
- `uv pip install --python ${MADSCI_VENV}/bin/python -e ./ot2_module`
so the editable install lands in the venv the runtime actually uses.
- **No `USER` directive** -- the base entrypoint runs userdel/useradd
as root to remap UID/GID to the host's, then drops to madsci itself.
A trailing `USER madsci` breaks the entrypoint with
"usermod: cannot lock /etc/passwd; try again later."
- No dialout groups baked in -- OT-2s and Flex are network-only.
Verified end-to-end on grimm with all three OT2-family nodes:
ot2_spongebob /status -> ready: true, /state ot2_status_code: idle
ot2_patrick /status -> ready: true, /state ot2_status_code: idle
otflex_sandy /status -> ready: true, /state ot2_status_code: failed
(Flex's hardware state, not a container-side problem)
45 deck/slot/mount resources auto-created in postgres with the v0.8
`{node_name}.deck.nest_N` naming. ULIDs preserved via registry for
all three nodes.
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Lifts the module from v0.5 (the current release on
main) through v0.6 to v0.8 in one go for the RAPID 446 grimm rebuild.The v0.5 → v0.6 work was carried in the working tree but never landed upstream; layering v0.8 on top brings everything together. This branch is preferred over the existing
madsci_0_7branch, which had the API rename done but commented out the entirestartup_handlerresource-creation block (deck / slots / mounts) — a regression we explicitly avoided.v0.5 → v0.6 (carried forward from local working tree)
{node_name}.deck,{node_name}.deck.nest_{i},{node_name}.{mount}_mount.slot_count→nest_countin the deck container attributes.add_to_database=Truedropped from sub-templates (parent handles them).STOPPEDvalue added to theRobotStatusenum.rate_limit_requests: int = 500config option added.v0.6 → v0.8 (this round)
pyproject.toml+pdm.lock: pinmadsci.{node_module,client,common}~=0.8.0; bumprequires-pythonto>=3.10.src/ot2_rest_node.py: renameself.node_definition.{node_name,node_id}→self.node_info.*(20 sites: 4 instartup_handlerfor protocols path + deck/slot/mount names, 8 in_create_ot2_templatesforcreated_by=, 8 inexecute()for log messages).Dockerfilerewritten on the v0.8 base:ghcr.io/ad-sdl/madsci:v0.8.0.uv pip install --python ${MADSCI_VENV}/bin/python -e ./ot2_moduleso the editable install lands in the venv the runtime uses.USERdirective — the base entrypoint runsuserdel/useraddas root to remap UID/GID to the host's, then drops to madsci itself. A trailingUSER madscibreaks the entrypoint withusermod: cannot lock /etc/passwd; try again later.Test plan
Verified end-to-end on grimm with all three OT2-family nodes (single image, three containers):
ot2_spongebob/status →ready: true, /state →ot2_status_code: idleot2_patrick/status →ready: true, /state →ot2_status_code: idleotflex_sandy/status →ready: true, /state →ot2_status_code: failed(Flex's hardware state — software side clean, no container-side errors in logs){node_name}.deck.nest_Nnaming.madsci/registry.jsonfor all three nodes (01KA1MHQ0GE9M8HFNQ9WKH7VM7,01KA1MHQAT21Q6NCY0WDBFT04D,01KA1MHQ0GNV2XT32X098P7WG8)