Repository navigation
feat(mcp): include job duration and end time in sync job results - #1425
Caleb Evans (calebevans-ab) merged 1 commit into
Conversation
Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
|
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/1793042876-mcp-job-duration' pyairbyte --help
# Install PyAirbyte from this branch for development:
pip install 'git+https://github.com/airbytehq/PyAirbyte.git@devin/1793042876-mcp-job-duration'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. |
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 |
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
|
Codex (@codex) review |
|
Codex Review: Didn't find any major issues. 👍 Reviewed commit: ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. Codex can also answer questions or update the PR. Try commenting "Codex (@codex) address that feedback". |
9e93e77
into
release-candidate/v1
Overview
👉 TL;DR: The Cloud MCP job tools now report how long each sync job took and when it ended, so agents no longer have to read every job's logs to work that out.
Specifically,
SyncJobResult(list_cloud_sync_jobs) and theget_cloud_sync_statusresult gainduration(ISO 8601, e.g.PT1M9S) andlast_updated_at, carried throughCloudJobInfoandSyncResultfrom the Cloud APIJobResponse.Fixes AGENTIC-2380.
Why
The Cloud API already returns
durationandlastUpdatedAton every job, butCloudJobInfo.from_api_responsedropped them. Agents asked about sync durations had no field to read, so they calledget_cloud_sync_logsonce per job to find end timestamps (one prod session made 422 log reads). The eval in airbytehq/cloud-mcp-evals#103 (no-log-scrape-for-job-durations) already counts an answer taken straight from the job list as a pass.Changes
CloudJobInfo: new optionaldurationandlast_updated_atfields, copied infrom_api_response.SyncResult: newdurationandlast_updated_atproperties returning the raw API strings.SyncJobResultandget_cloud_sync_status: include both fields. They arenullwhen Cloud has not reported them (e.g. a running job).Review Spotlight
Reviewers with limited time, please review first:
airbyte/mcp/cloud.py#L538-L542: the new field descriptions agents will see in the tool output schemaTest plan
tests/unit_tests/test_cloud_api_util.py(API response values kept; missing values becomeNone) andtests/unit_tests/test_mcp_cloud.py(list_cloud_sync_jobsfor finished and running jobs,get_cloud_sync_status).uv run pytest tests/unit_tests/test_mcp_cloud.py tests/unit_tests/test_cloud_api_util.py tests/unit_tests/test_cloud_connections.py(504 passed),uv run ruff check airbyte tests,uv run ruff format --check .,uv run pyrefly check(0 errors).JobResponsefor 155 jobs in the Devin sandbox Cloud workspace: all 146 succeeded and 9 failed jobs had bothdurationandlastUpdatedAt. No running job was present, so thenullcase is covered only by unit tests.Link to Devin session: https://app.devin.ai/sessions/34b01cd4649e44e4b6261794fea80429
Open in Devin Desktop: https://app.devin.ai/desktop/session/34b01cd4649e44e4b6261794fea80429?variant=devin
Requested by: Caleb Evans (@calebevans-ab)