Skip to content

build: generic Docker image published by CI; MOLARS types from molars_lcmtypes - #20

Merged
kevinsbarnard merged 5 commits into
developfrom
feat/docker-publishing
Nov 19, 2026
Merged

kevinsbarnard merged 5 commits into
developfrom
feat/docker-publishing

Conversation

@kevinsbarnard

Copy link
Copy Markdown
Member

Summary

Replaces the manual, MOLARS-coupled Docker build with one generic image built, smoke-tested and published by CI after each release. Also fixes the missing GitHub release assets.

The MOLARS LCM types now live in the new public repo CoMPASLab/molars_lcmtypes:

  • It was split from MOLARS main (40170cb) with history preserved, and is released as v0.1.0.
  • It mirrors compas_lcmtypes: the types install under molars_lcmtypes.* and reference compas_lcmtypes.*.
  • Fingerprints are pinned in its tests and match MOLARS's own unprefixed build.

This repo now depends on the types instead of copying a MOLARS wheel into the build context.

Changes

  • Dial proxy decoupled from MOLARS:
    • It finds the image type by LCM name (--image-type, default senlcm.image_t) among the discovered packages, so it works with prefixed and unprefixed types.
    • Both proxies take --lcm-packages; the Dial proxy defaults to compas_lcmtypes,molars_lcmtypes.
    • Configuration errors now exit non-zero.
  • lcmtypes extra: installs compas-lcmtypes (PyPI) and molars-lcmtypes (GitHub release wheel), locked in uv.lock. Tests use compas-lcmtypes instead of vendored copies, and benchmarks no longer need PYTHONPATH.
  • One image, mbari/lcm-websocket-server:
    • PROXY=json|dial selects the proxy, configured via HOST, PORT, CHANNEL, LCM_PACKAGES and ARGS.
    • It is built from uv.lock (uv sync --locked) and includes all extras and types.
    • libglib now comes from the distro package instead of a copied x86_64 .so.
    • docker-bake.hcl is the shared build definition and docker/smoke_test.sh checks both proxies become healthy.
    • Dockerfile.dial, the -dial tags and the five scripts/docker_*.sh are removed.
  • CI:
    • The release job runs semantic-release publish, so GitHub releases get the wheel and sdist. v0.9.0-rc.1 was missing them.
    • New docker job: on PRs it builds and smoke-tests the image. After a release it builds from the release tag, smoke-tests, and pushes X.Y.Z, X.Y and latest (from main) or X.Y.Z-rc.N and develop (from develop).
    • This is a job in the same workflow because tags pushed with GITHUB_TOKEN don't trigger other workflows.

Behavior changes

  • No more -dial image tags. Use -e PROXY=dial.
  • JPEG_QUALITY/JPEG_SCALE are replaced by ARGS="--quality .. --scale ..".
  • LCM_PACKAGES now defaults to compas_lcmtypes,molars_lcmtypes instead of being required.
  • The Dial proxy's default packages changed from the top-level MOLARS packages (stdlcm, senlcm, ...) to the prefixed packages. Existing installs of the old MOLARS wheel can keep working with --lcm-packages stdlcm,senlcm,....

Before merging

Add the Docker Hub secrets, or the first post-release docker job will fail at login:

gh secret set DOCKERHUB_USERNAME -R mbari-org/lcm-websocket-server
gh secret set DOCKERHUB_TOKEN -R mbari-org/lcm-websocket-server   # access token with Read & Write

Test plan

  • uv run pytest: 179 passed, including Dial and JSON CLI end-to-end tests and exit codes for configuration errors
  • docker buildx bake and docker/smoke_test.sh: both proxies healthy; entrypoint pass-through, flag appending, bad PROXY (exit 2) and bad --image-type (exit 1) checked
  • actionlint and shellcheck clean
  • Benchmarks run from the extra (no PYTHONPATH); results unchanged
  • molars_lcmtypes: CI green, v0.1.0 released with assets
  • CI green on this PR, including the docker smoke test
  • First release from develop pushes 0.9.0-rc.2 and develop to Docker Hub

🤖 Generated with Claude Code

kevinsbarnard and others added 5 commits November 19, 2026 12:29
- The Dial proxy no longer imports senlcm/stdlcm. It resolves the image
  type by LCM name (--image-type, default senlcm.image_t) from the
  discovered packages, so it works with prefixed packages such as
  compas_lcmtypes or with unprefixed lcm-gen output.
- Both proxies accept --lcm-packages. The Dial proxy defaults to
  compas_lcmtypes,molars_lcmtypes; the JSON proxy keeps its positional
  argument for compatibility.
- New 'lcmtypes' extra installs compas-lcmtypes (PyPI) and
  molars-lcmtypes (CoMPASLab/molars_lcmtypes GitHub release).
- Configuration errors (no types found, unknown image type, failed
  workers) now exit non-zero.
- Tests and benchmarks use compas-lcmtypes instead of the vendored
  MOLARS copies, which are removed; benchmarks no longer need
  PYTHONPATH.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- A single image serves both proxies (PROXY=json|dial), replacing
  Dockerfile.dial and the -dial tags. It bundles compas-lcmtypes and
  molars-lcmtypes, so no MOLARS wheel needs to be copied into the repo.
- Installs from uv.lock (uv sync --locked) into a venv copied onto a
  slim Python base; libglib comes from the distro package instead of a
  copied x86_64 .so.
- New entrypoint configures the proxy from HOST, PORT, CHANNEL,
  LCM_PACKAGES and ARGS; extra flags may also be passed as arguments,
  and other commands run as given.
- docker-bake.hcl is the shared build definition for CI and local
  builds; docker/smoke_test.sh checks both proxies become healthy.
- Removes the docker_* shell scripts.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- Run semantic-release publish so GitHub releases get the wheel and
  sdist (version alone does not upload them).
- Expose released/version/prerelease from the release job.
- New docker job: on pull requests the image is built and smoke-tested;
  after a release it is built from the release tag, smoke-tested and
  pushed to Docker Hub as X.Y.Z, X.Y and latest (main) or X.Y.Z-rc.N and
  develop (develop). Requires DOCKERHUB_USERNAME and DOCKERHUB_TOKEN.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@kevinsbarnard
kevinsbarnard merged commit 485bd06 into develop Nov 19, 2026
8 checks passed
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