ci: add cross-platform validation to ci.yaml#89
ci: add cross-platform validation to ci.yaml#89kartikloops wants to merge 8 commits intoluarss:mainfrom
Conversation
|
Note Reviews pausedIt looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the Use the following commands to manage reviews:
Use the checkboxes below for quick actions:
📝 WalkthroughWalkthroughAdded a new async method Changes
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~25 minutes Poem
🚥 Pre-merge checks | ✅ 3✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Pull request overview
Adds a new cross-platform CI job to validate that the project’s core test suite runs cleanly across multiple GitHub-hosted runner OS images and to sanity-check Docker image buildability.
Changes:
- Introduce a
cross-platformmatrix job running onubuntu-22.04,ubuntu-24.04, andmacos-latest. - Run
make sync+make teston each OS. - Add a macOS-gated
docker build --platform linux/amd64verification step.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In @.github/workflows/ci.yaml:
- Around line 65-67: The GitHub Actions job "Verify Docker image builds
(linux/amd64)" is running on macos-latest which lacks a Docker daemon and cannot
use docker/setup-qemu-action@v3 or docker/setup-buildx-action@v3; change the job
to run on an Ubuntu runner (runs-on: ubuntu-latest) or gate it so the Docker
build step only executes on ubuntu hosts (e.g., update the job or its if
condition referencing matrix.os) so QEMU/buildx setup actions and the docker
build --platform linux/amd64 step execute on a Linux runner; if you still need
macOS ARM builds, create a separate job for macos-latest that skips
multi-platform Docker steps.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
There was a problem hiding this comment.
🧹 Nitpick comments (1)
src/openroad_mcp/interactive/pty_handler.py (1)
200-224: Usebytearrayindrain_output()to avoid repeatedbytesreallocations.
collected += chunkin a loop can become expensive for large PTY output.bytearray.extend()keeps this linear and is a drop-in behavioral equivalent here.♻️ Proposed refactor
- collected = b"" + collected = bytearray() @@ chunk = await self.read_output() if chunk: - collected += chunk + collected.extend(chunk) last_data_at = loop.time() @@ - return collected + return bytes(collected)🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@src/openroad_mcp/interactive/pty_handler.py` around lines 200 - 224, The loop in drain_output currently accumulates bytes with repeated concatenation (collected += chunk), which reallocates; change collected to a bytearray (e.g., collected = bytearray()), call collected.extend(chunk) when chunk is truthy, and return bytes(collected) at the end to preserve the function's bytes return type; update references in async def drain_output to use extend instead of += and ensure chunk is handled as bytes before extending.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Nitpick comments:
In `@src/openroad_mcp/interactive/pty_handler.py`:
- Around line 200-224: The loop in drain_output currently accumulates bytes with
repeated concatenation (collected += chunk), which reallocates; change collected
to a bytearray (e.g., collected = bytearray()), call collected.extend(chunk)
when chunk is truthy, and return bytes(collected) at the end to preserve the
function's bytes return type; update references in async def drain_output to use
extend instead of += and ensure chunk is handled as bytes before extending.
ℹ️ Review info
⚙️ Run configuration
Configuration used: defaults
Review profile: CHILL
Plan: Pro
Run ID: e05499b7-210b-4b1c-b879-2829679032e6
📒 Files selected for processing (2)
src/openroad_mcp/interactive/pty_handler.pytests/integration/test_pty_integration.py
4027e50 to
1f3cd4d
Compare
|
@luarss @kartikloops Two options to fix it:
|
|
How about an conditional pre setup Docker step for macos? |
…g pytest-timeout flag
|
@luarss Fixed two CI failures on the macos-14 jobs:
|
|
@luarss could you please run the CI tests? I want to check whether anything is failing so I can debug. |
Summary
testjob as requestedhost-ptytest type onmacos-14to run PTY integration tests nativelydrain_output()toPTYHandlerto handle macOS's async PTY buffer flushing, fixing 5 flaky tests--platform linux/amd64on macOSFixes #90