You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Moves ardupilot_manager from the primary workspace to the venv2 workspace, bumps its dependencies (notably pydantic 1.10 → 2.12, fastapi 0.105 → 0.125) and applies the corresponding pydantic v1 → v2 migration (.dict() → .model_dump(), root_validator → model_validator(mode="before"), @validator → @field_validator, constr → Annotated[str, StringConstraints(...)], ClassVar on non-field class attributes, explicit = None on Optional fields). Adjacent tweaks: renames core/services/ping/exceptions.py → ping_exceptions.py to avoid a collision with ardupilot_manager/exceptions.py inside the shared venv, points start-blueos-core at $BLUEOS_PYTHON_BIN_SECONDARY for the autopilot service, and enables bootstrap-runtime-deps for the secondary environment in .hooks/pre-push so the mavlink-server / ardupilot_tools install runs there too.
1. Correctness & Implementation Bugs
1.1 [minor] core/services/ardupilot_manager/mavlink_proxy/Endpoint.py:36-42 — the model_validator(mode="before") only handles ArgsKwargs.kwargs; if an Endpoint is ever constructed positionally, values.args is silently dropped, which then produces a misleading Invalid connection_type: None error rather than a proper validation message. All current call sites use kwargs (autopilot_manager.py:57, :66, Endpoint(**endpoint) at :691, :777), so this doesn't manifest today — worth either unwrapping values.args onto the field order too or asserting the invariant with a short comment so a future positional caller isn't debugging a red-herring error.
6. Code Quality & Style
6.1 [nit] core/services/ardupilot_manager/mavlink_proxy/Endpoint.py:39-40 — the if isinstance(values, ArgsKwargs): values = dict(values.kwargs or {}) shim is the kind of pydantic-v2 quirk that will read as noise to anyone who didn't do this migration. A one-line "why" comment (pydantic v2 dataclass validators receive ArgsKwargs for kwarg construction) would age well.
6.2 [nit] core/services/ardupilot_manager/mavlink_proxy/test_all.py:135 — _bad_endpoint(**kwargs: object) is unusual; **kwargs: Any (or a TypedDict/Mapping[str, Any] param) is closer to the surrounding style and avoids the # type: ignore[arg-type] further down.
9. Nitpicks / Optional
9.1 [nit] .hooks/pre-push:128 — primary run_environment_phase still passes true for run_bootstrap, but with ardupilot_manager gone from the primary workspace the only members left are bridges, commonwealth, cable_guy, none of which need mavlink-server/ardupilot_tools. Not blocking (keeping it true is safe and defensive), but you may be able to flip it to false to shave install time off the primary phase.
9.2 [nit] core/services/ardupilot_manager/pyproject.toml — a lot of bundled version bumps ride along here (aiocache 0.12.2→0.12.3, packaging 20.4→25.0, psutil 5.7.2→7.1.3, etc.). Only pydantic + fastapi are strictly required to align with the rest of venv2; a follow-up commit message explaining why the others were touched at the same time would help git blame later.
Generated by PR Review Bot. This is advisory, a human reviewer must still approve.
The reason will be displayed to describe this comment to others. Learn more.
Nice, this one needs a rebase :)
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
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.
Renamed ping exceptions file because it clashes with ardupilot exceptions file