Skip to content

Update to MADSci v0.8#61

Open
RyanTheRobothead wants to merge 3 commits into
mainfrom
v0.8
Open

Update to MADSci v0.8#61
RyanTheRobothead wants to merge 3 commits into
mainfrom
v0.8

Conversation

@RyanTheRobothead
Copy link
Copy Markdown
Member

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_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 from local working tree)

  • Resource names now in v0.8 convention: {node_name}.deck, {node_name}.deck.nest_{i}, {node_name}.{mount}_mount.
  • slot_countnest_count in the deck container attributes.
  • add_to_database=True dropped from sub-templates (parent 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 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 — OT-2s and Flex are network-only (HTTP to the robot's IP).

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: 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 — software side clean, no container-side errors in logs)
  • 45 deck/slot/mount resources auto-created in postgres with v0.8 {node_name}.deck.nest_N naming
  • ULIDs preserved via .madsci/registry.json for all three nodes (01KA1MHQ0GE9M8HFNQ9WKH7VM7, 01KA1MHQAT21Q6NCY0WDBFT04D, 01KA1MHQ0GNV2XT32X098P7WG8)

RPL and others added 3 commits May 27, 2026 15:59
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>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant