-
Notifications
You must be signed in to change notification settings - Fork 67
feat: prefer Docker images in MCP server when Docker is available #736
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
- Add is_docker_installed() import to MCP modules - Update all get_source() calls to pass docker_image=is_docker_installed() - Leverages existing cached Docker detection for performance - Maintains backward compatibility with graceful fallback Co-Authored-By: AJ Steers <[email protected]>
Original prompt from AJ Steers
|
🤖 Devin AI EngineerI'll be helping with this pull request! Here's what you should know: ✅ I will automatically:
Note: I can only respond to comments from users who have write access to this repository. ⚙️ Control Options:
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR implements Docker preference functionality in the PyAirbyte MCP server by automatically detecting Docker availability and using Docker images when possible. The change improves performance and reliability by leveraging containerized connectors while maintaining backward compatibility.
- Updates all
get_source()
calls to passdocker_image=is_docker_installed()
parameter - Leverages existing cached Docker detection for performance optimization
- Maintains graceful fallback to other installation methods when Docker images aren't available
Reviewed Changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.
File | Description |
---|---|
airbyte/mcp/_local_ops.py |
Updated 5 get_source() calls to use Docker preference when available |
airbyte/mcp/_connector_registry.py |
Updated 1 get_source() call to use Docker preference when available |
👋 Greetings, Airbyte Team Member!Here are some helpful tips and reminders for your convenience. Testing This PyAirbyte VersionYou can test this version of PyAirbyte using the following: # Run PyAirbyte CLI from this branch:
uvx --from 'git+https://github.com/airbytehq/PyAirbyte.git@devin/1754007779-prefer-docker-images' pyairbyte --help
# Install PyAirbyte from this branch for development:
pip install 'git+https://github.com/airbytehq/PyAirbyte.git@devin/1754007779-prefer-docker-images' Helpful ResourcesPR Slash CommandsAirbyte Maintainers can execute the following slash commands on your PR:
Community SupportQuestions? Join the #pyairbyte channel in our Slack workspace. |
📝 WalkthroughWalkthroughThe changes update the logic in two modules to pass a new Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~7 minutes Would you like me to suggest some inline comments to clarify the purpose of the new 📜 Recent review detailsConfiguration used: CodeRabbit UI 📒 Files selected for processing (1)
✅ Files skipped from review due to trivial changes (1)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (6)
✨ Finishing Touches
🧪 Generate unit tests
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. 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
SupportNeed help? Create a ticket on our support page for assistance with any issues or questions. Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
- Apply consistent pattern across all get_source() calls - Addresses GitHub comment feedback for explicit boolean values - Ensures docker_image parameter is always True or False, never None Co-Authored-By: AJ Steers <[email protected]>
- Convert remaining single-line get_source() calls to multiline format - Addresses GitHub comment feedback for consistent formatting - Improves code readability and maintainability Co-Authored-By: AJ Steers <[email protected]>
feat: prefer Docker images in MCP server when Docker is available
Summary
This PR implements Docker preference functionality in the PyAirbyte MCP server by updating all
get_source()
calls to passdocker_image=is_docker_installed()
when Docker is detected on the system. This change leverages the existing cached Docker detection utility and maintains backward compatibility with graceful fallback to other installation methods.Key Changes:
is_docker_installed()
import to MCP server modulesget_source()
calls across MCP local operations and connector registry@lru_cache
decorator for performance optimizationFiles Modified:
airbyte/mcp/_local_ops.py
- 5 get_source() calls updatedairbyte/mcp/_connector_registry.py
- 1 get_source() call updatedReview & Testing Checklist for Human
Recommended Test Plan:
Diagram
Notes
is_docker_installed()
function which already has proper caching via@lru_cache
get_source()
function already supports thedocker_image
parameter, so this change integrates cleanly with existing architectureSession Info: Requested by AJ Steers (@aaronsteers) in Devin session: https://app.devin.ai/sessions/5aa5c0fa6cd347808bab340f53cc603d
Summary by CodeRabbit
Important
Auto-merge enabled.
This PR is set to merge automatically when all requirements are met.