Repository navigation
fix(mcp): Say "no sync jobs yet" in get_cloud_sync_logs for connections with no jobs - #1378
Conversation
get_cloud_sync_logs raised a generic 'resource does not exist' error when no job_id was given and the connection had never synced. It now tells the caller the connection has no sync jobs and points them at run_cloud_sync. Co-Authored-By: AJ Steers <[email protected]>
|
I'll fix CI failures and address comments from users with write access. I'll skip comments containing "(aside)".
|
👋 Greetings, Airbyte Team Member!Here are some helpful tips and reminders for your convenience. 💡 Show Tips and TricksTesting 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/1792013985-sync-logs-no-jobs-message' pyairbyte --help
# Install PyAirbyte from this branch for development:
pip install 'git+https://github.com/airbytehq/PyAirbyte.git@devin/1792013985-sync-logs-no-jobs-message'PR Slash CommandsAirbyte Maintainers can execute the following slash commands on your PR:
📚 Show Repo GuidanceHelpful ResourcesCommunity SupportQuestions? Join the #pyairbyte channel in our Slack workspace. |
There was a problem hiding this comment.
🟢 Approval recommended
The focused change preserves explicit-job behavior and includes regression coverage, with no blocking issues identified.
0 open findings
What changed in this PR
Improves MCP sync-log errors for connections with no sync history.
Changes:
- Adds a “no sync jobs yet” message with guidance to use
run_cloud_sync. - Adds regression coverage for the new message and unchanged explicit-job lookup behavior.
| File | Description |
|---|---|
tests/unit_tests/test_mcp_cloud.py |
Tests both missing-job error cases. |
airbyte/mcp/cloud.py |
Adds actionable guidance when no sync jobs exist. |
🧠 Review effort: Balanced
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
Code coverage overviewLanguages: Python Python / code-coverage/pytest-no-creds
View coverage of the 10 most impacted files.
Python / code-coverage/pytest
View coverage of the 10 most impacted files.
Python / code-coverage/pytest-unit
Line coverage data for the release-candidate/v1 branch is not yet available. View coverage of the 10 most covered files.
ℹ️ Calculations represent line coverage. Results may change as calculations are updated. Updated |
95d2e1a
into
release-candidate/v1
Overview
👉 TL;DR: Asking for sync logs on a connection that has never run a sync used to say the resource does not exist. It now says the connection has no sync jobs yet and suggests running a sync first.
Specifically,
get_cloud_sync_logswithjob_id=Noneand no sync history now raisesAirbyteMissingResourceErrorwith"Connection '<id>' has no sync jobs yet."and guidance pointing torun_cloud_sync.Changes
job_idisn't found, the behavior is unchanged.Test plan
Link to Devin session: https://app.devin.ai/sessions/a51d808f26c9402fafc93e7640648187
Open in Devin Desktop: https://app.devin.ai/desktop/session/a51d808f26c9402fafc93e7640648187?variant=devin
Requested by: Aaron ("AJ") Steers (@aaronsteers)