Skip to content

Conversation

@Sayan-
Copy link
Contributor

@Sayan- Sayan- commented Nov 4, 2025

TODO


Note

Refactors CI to locally build/run multi-arch Chromium images with Docker layer caching and concurrency, updates server tests to use these images, and adds cache-aware build/run scripts with optional detachment.

  • CI Workflows:
    • Chromium images (.github/workflows/chromium-headful-image.yaml, chromium-headless-image.yaml):
      • Trigger on push/pull_request; add concurrency.
      • Add multi-arch matrix (amd64, arm64) with runner selection.
      • Restore Docker layer cache via ${CACHE_DIR}; build images via build-docker.sh.
      • Run containers and wait for supervisor services (allow pulseaudio exception).
      • Remove Docker Hub login/build-push; rely on local builds.
    • Server tests (.github/workflows/server-test.yaml):
      • Add concurrency, timeout-minutes, Docker layer cache restore.
      • Build headless/headful images locally via scripts; set E2E_*_IMAGE env to test tags.
      • Drop reusable workflow dependencies.
  • Scripts:
    • shared/start-buildkit.sh: export CACHE_ARGS when CACHE_DIR is set (local cache-from/to).
    • images/chromium-*/build-docker.sh: pass "${CACHE_ARGS[@]}" to docker build.
    • images/chromium-*/run-docker.sh: support DETACH=true to run containers in background.
  • Repo:
    • .gitignore: ignore .buildx-cache-*.
    • Remove root package.json.

Written by Cursor Bugbot for commit 38ffdfe. This will update automatically on new commits. Configure here.

@mesa-dot-dev
Copy link

mesa-dot-dev bot commented Nov 4, 2025

Mesa Description

This PR overhauls the CI workflows for the Chromium images to improve reliability and add multi-platform support.

Key changes include:

  • Multi-Architecture Builds: The chromium-headful-image and chromium-headless-image workflows now build and test for both amd64 and arm64 architectures using a matrix strategy.
  • Improved CI Reliability: A new step has been added to the workflows to wait for all supervisor services within the container to be healthy before proceeding with tests, making the CI process more robust.
  • Flexible Run Scripts: The run-docker.sh scripts for both images now support a DETACH environment variable, allowing containers to be run in the background, which is essential for the updated CI jobs.

Note

Refactors CI to build and run headful/headless Chromium images on amd64/arm64 with concurrency and service readiness checks, builds images inline in server tests, and adds DETACH support to run scripts.

  • CI Workflows:
    • Chromium Images (.github/workflows/chromium-head{ful,less}-image.yaml):
      • Trigger on push/pull_request; add workflow concurrency.
      • Add matrix builds for amd64 and arm64 runners.
      • Build images via images/*/build-docker.sh, run containers, and wait for supervisor services (with SERVICE_EXCEPTIONS).
      • Set env vars (UKC_TOKEN, UKC_METRO, NAME, DETACH, etc.); enable WebRTC for headful.
      • Remove Docker Hub login and buildx push steps.
    • Server Tests (.github/workflows/server-test.yaml):
      • Add workflow concurrency and test timeout.
      • Inline-build headless/headful images before running make test.
      • Use explicit test image env vars (E2E_CHROMIUM_*_IMAGE).
  • Scripts:
    • images/chromium-head{ful,less}/run-docker.sh: add DETACH-controlled run mode and minor run arg tweaks; keep cleanup and optional entrypoint handling.

Written by Cursor Bugbot for commit 5185d51. This will update automatically on new commits. Configure here.

Description generated by Mesa. Update settings

Copy link

@mesa-dot-dev mesa-dot-dev bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Performed full review of b51da91...da55596

Analysis

  1. Container name hardcoding in trap cleanup creates brittle coupling rather than using the defined NAME environment variable, making future naming changes difficult.

  2. Using docker run with --rm flag in detached mode auto-removes failed containers, making CI failure debugging nearly impossible since logs are lost.

  3. Complex shell-based health checking logic (using awk, grep, sed, tr) is difficult to maintain and error-prone compared to more robust alternatives like a Python script or supervisorctl's XML-RPC API.

  4. While container startup is tested, there's no functional testing to verify Chromium can actually launch and render pages, making this merely a smoke test.

  5. The PR represents a significant architectural shift from build-and-push to build-and-test locally, but lacks documentation explaining this strategic change and its implications.

Tip

Help

Slash Commands:

  • /review - Request a full code review
  • /review latest - Review only changes since the last review
  • /describe - Generate PR description. This will update the PR body or issue comment depending on your configuration
  • /help - Get help with Mesa commands and configuration options

4 files reviewed | 0 comments | Edit Agent SettingsRead Docs

cursor[bot]

This comment was marked as outdated.

if [[ "${DETACH:-false}" == "true" ]]; then
docker run -d --rm "${RUN_ARGS[@]}" "$IMAGE"
else
docker run -it "${RUN_ARGS[@]}" "$IMAGE"
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Bug: Bug

Inconsistent container cleanup behavior: interactive mode (line 88) is missing the --rm flag while detached mode (line 86) has it. This causes containers to persist after exit when run interactively but be auto-removed when run detached. The chromium-headless script consistently uses --rm in both modes (lines 31 and 33), which is the correct pattern. This inconsistency will lead to container accumulation when running in interactive mode.

Fix in Cursor Fix in Web

@Sayan- Sayan- closed this Nov 4, 2025
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.

2 participants