Skip to content

feat(mcp): include job duration and end time in sync job results - #1425

Merged
Caleb Evans (calebevans-ab) merged 1 commit into
release-candidate/v1from
devin/1793042876-mcp-job-duration
Oct 26, 2026
Merged

Caleb Evans (calebevans-ab) merged 1 commit into
release-candidate/v1from
devin/1793042876-mcp-job-duration

Conversation

@calebevans-ab

Copy link
Copy Markdown
Contributor

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 the get_cloud_sync_status result gain duration (ISO 8601, e.g. PT1M9S) and last_updated_at, carried through CloudJobInfo and SyncResult from the Cloud API JobResponse.

Fixes AGENTIC-2380.

Why

The Cloud API already returns duration and lastUpdatedAt on every job, but CloudJobInfo.from_api_response dropped them. Agents asked about sync durations had no field to read, so they called get_cloud_sync_logs once 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 optional duration and last_updated_at fields, copied in from_api_response.
  • SyncResult: new duration and last_updated_at properties returning the raw API strings.
  • SyncJobResult and get_cloud_sync_status: include both fields. They are null when Cloud has not reported them (e.g. a running job).
  • No new API calls; the values come from the job info these tools already fetch.

Review Spotlight

Reviewers with limited time, please review first:

Test plan

  • New unit tests in tests/unit_tests/test_cloud_api_util.py (API response values kept; missing values become None) and tests/unit_tests/test_mcp_cloud.py (list_cloud_sync_jobs for 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).
  • Read the raw JobResponse for 155 jobs in the Devin sandbox Cloud workspace: all 146 succeeded and 9 failed jobs had both duration and lastUpdatedAt. No running job was present, so the null case 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)

Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
@devin-ai-integration

Copy link
Copy Markdown
Contributor

I'll fix CI failures and address comments from users with write access. I'll skip comments containing "(aside)".

  • Disable automatic comment, CI, and merge conflict monitoring

@linear-code

linear-code Bot commented Oct 26, 2026

Copy link
Copy Markdown

AGENTIC-2380

@github-actions

Copy link
Copy Markdown

👋 Greetings, Airbyte Team Member!

Here are some helpful tips and reminders for your convenience.

💡 Show Tips and Tricks

Testing This PyAirbyte Version

You 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 Commands

Airbyte Maintainers can execute the following slash commands on your PR:

  • /fix-pr - Fixes most formatting and linting issues
  • /uv-lock - Updates uv.lock file
  • /test-pr - Runs tests with the updated PyAirbyte
  • /prerelease - Builds and publishes a prerelease version to PyPI
  • /evals - Runs the Cloud MCP evals that use the MCP tools this PR changed (/evals full=true runs the full suite)
📚 Show Repo Guidance

Helpful Resources

Community Support

Questions? Join the #pyairbyte channel in our Slack workspace.

📝 Edit this welcome message.

@github-code-quality

github-code-quality Bot commented Oct 26, 2026 •

Copy link
Copy Markdown
Contributor

Code coverage overview

Languages: Python

Python / code-coverage/pytest-no-creds

release-candidate/v1 d9f652f devin/1793042876-mcp... f71eee2 +/-
65% 80% +15%
View coverage of the 10 most impacted files.
File release-candidate/v1 d9f652f devin/1793042876-mcp... f71eee2 +/-
airbyte/_util/api_util.py 36% 67% +31%
airbyte/mcp/cloud.py 52% 86% +34%
airbyte/cloud/connectors.py 34% 79% +45%
airbyte/mcp/_datadog.py 0% 50% +50%
airbyte/mcp/_telemetry.py 0% 94% +94%
airbyte/cloud/c...lder/project.py 0% 94% +94%
airbyte/_direct...ctors/models.py 0% 95% +95%
airbyte/mcp/_sso_auth.py 0% 96% +96%
airbyte/cloud/models.py 0% 97% +97%
airbyte/mcp/int...nc_status_ui.py 0% 97% +97%

Python / code-coverage/pytest

release-candidate/v1 d9f652f devin/1793042876-mcp... f71eee2 +/-
71% 82% +11%
View coverage of the 10 most impacted files.
File release-candidate/v1 d9f652f devin/1793042876-mcp... f71eee2 +/-
airbyte/cloud/connectors.py 51% 82% +31%
airbyte/mcp/cloud.py 52% 86% +34%
airbyte/mcp/_datadog.py 0% 50% +50%
airbyte/mcp/_user_identity.py 0% 93% +93%
airbyte/mcp/_telemetry.py 0% 94% +94%
airbyte/cloud/c...lder/project.py 0% 94% +94%
airbyte/_direct...ctors/models.py 0% 95% +95%
airbyte/mcp/_sso_auth.py 0% 96% +96%
airbyte/cloud/models.py 0% 97% +97%
airbyte/mcp/int...nc_status_ui.py 0% 97% +97%

Python / code-coverage/pytest-unit

release-candidate/v1 devin/1793042876-mcp... f71eee2 +/-
— 77% —

Line coverage data for the release-candidate/v1 branch is not yet available.

View coverage of the 10 most covered files.
File release-candidate/v1 devin/1793042876-mcp... f71eee2 +/-
airbyte/cloud/models.py — 97% —
airbyte/mcp/_sso_auth.py — 96% —
airbyte/_direct...ctors/models.py — 95% —
airbyte/cloud/client.py — 90% —
airbyte/exceptions.py — 90% —
airbyte/mcp/cloud.py — 86% —
airbyte/progress.py — 80% —
airbyte/cloud/connectors.py — 79% —
airbyte/shared/...ql_processor.py — 68% —
airbyte/_util/api_util.py — 67% —

ℹ️ Calculations represent line coverage. Results may change as calculations are updated.


Updated October 26, 2026 19:44 UTC

@calebevans-ab
Caleb Evans (calebevans-ab) marked this pull request as ready for review October 26, 2026 19:36
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 26, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-26T19:38:17.275356Z f71eee2 Manual request
ℹ️ About Codex in GitHub

Your 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.

@calebevans-ab

Copy link
Copy Markdown
Contributor Author

Codex (@codex) review

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. 👍

Reviewed commit: f71eee2933

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "Codex (@codex) review".

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".

@calebevans-ab
Caleb Evans (calebevans-ab) merged commit 9e93e77 into release-candidate/v1 Oct 26, 2026
33 checks passed
@calebevans-ab
Caleb Evans (calebevans-ab) deleted the devin/1793042876-mcp-job-duration branch October 26, 2026 19:53
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