Repository navigation
fix(cloud): support the queued job status - #1334
Aaron ("AJ") Steers (aaronsteers) merged 4 commits into
Conversation
Co-authored-by: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
Co-authored-by: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
…1304) Co-authored-by: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
The Airbyte API returns `queued` for jobs waiting to start, but `airbyte-api<1.0` doesn't define it, so listing jobs that include a queued job raised `ValueError: 'queued' is not a valid JobStatusEnum`. Register `QUEUED` on the SDK enum at import time (a no-op once the SDK defines it) and add `QUEUED` to PyAirbyte's public `JobStatusEnum`. Co-Authored-By: Claude Opus 5.5 <[email protected]>
|
Note 📝 PR Converted to Draft More info...Thank you for creating this PR. As a policy to protect our engineers' time, Airbyte requires all PRs to be created first in draft status. Your PR has been automatically converted to draft status in respect for this policy. As soon as your PR is ready for formal review, you can proceed to convert the PR to "ready for review" status by clicking the "Ready for review" button at the bottom of the PR page. To skip draft status in future PRs, please include |
👋 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@cameron/fix-queued-job-status' pyairbyte --help
# Install PyAirbyte from this branch for development:
pip install 'git+https://github.com/airbytehq/PyAirbyte.git@cameron/fix-queued-job-status'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-credsThe overall line coverage in commit 5ec956e in the Show a line coverage summary of the most impacted files.
Python / code-coverage/pytestThe overall line coverage in commit 5ec956e in the Show a line coverage summary of the most impacted files.
Python / code-coverage/pytest-unitThe overall line coverage in commit 5ec956e in the Show a line coverage summary of the most covered files.
Updated |
069b839
into
release-candidate/v1
Summary
list_cloud_sync_jobs(and anything else that decodes Cloud job responses) fails withValueError: 'queued' is not a valid JobStatusEnumwhen a connection has a queued job.The error comes from the
airbyte-apiSDK, not PyAirbyte: we pinairbyte-api<1.0, and itsJobStatusEnumhas noqueuedmember, so decoding the jobs page fails before our code sees it.queuedis only defined inairbyte-api1.x, which is a full SDK rewrite (pydantic and httpx instead of dataclasses and requests). Upgrading is too big for a patch, so this PR uses a stopgap.Changes
airbyte/_util/api_util.py:_register_queued_job_status()runs once on import and adds aQUEUEDmember to the SDK'sJobStatusEnum. It does nothing if the SDK already definesqueued, so it can be deleted when we move toairbyte-api1.x.airbyte/cloud/models.py: addsQUEUED = "queued"to PyAirbyte's publicJobStatusEnum. It is not inFINAL_STATUSES, so code waiting on a sync keeps polling through a queued job.airbyte/mcp/cloud.py: adds'queued'to the example statuses in theSyncJobResult.statusdocstring."status": "queued"and checks it maps toJobStatusEnum.QUEUED.Testing
pytest tests/unit_tests/test_cloud_api_util.py tests/unit_tests/test_cloud_models.py tests/unit_tests/test_mcp_cloud.py: 92 passed.ruff check,ruff format --checkandpyrefly checkall pass.Follow-up
Upgrading to
airbyte-api1.x should go in its own PR againstrelease-candidate/v1, and that PR can remove_register_queued_job_status(). Note that 1.x still uses a closed enum, so a future new status would fail the same way, as a pydanticValidationErrorinstead of aValueError.🤖 Generated with Claude Code