-
Notifications
You must be signed in to change notification settings - Fork 69
ci: fix lint issue #854
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
ci: fix lint issue #854
Conversation
- Add actions/setup-python@v5.3.0 step to pin Python version to 3.12 - Fixes PyO3 build failure where pydantic-core was attempting to build against Python 3.14, which exceeds PyO3 v0.24.1's maximum supported version (3.13) - Also fix docstring linter error in airbyte/mcp/__init__.py (D412) Resolves CI failures in Build and/or Publish and Run Linters workflows. Co-Authored-By: AJ Steers <aj@airbyte.io>
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:
|
👋 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/1762303487-fix-ci-pyo3-python-version' pyairbyte --help
# Install PyAirbyte from this branch for development:
pip install 'git+https://github.com/airbytehq/PyAirbyte.git@devin/1762303487-fix-ci-pyo3-python-version'Helpful ResourcesPR Slash CommandsAirbyte Maintainers can execute the following slash commands on your PR:
Community SupportQuestions? Join the #pyairbyte channel in our Slack workspace. |
📝 WalkthroughWalkthroughBumps the GitHub Action Changes
Estimated code review effort🎯 1 (Trivial) | ⏱️ ~2 minutes
Shall I scan the repo for other workflow files that pin the same action to update them consistently? wdyt? Pre-merge checks and finishing touches❌ Failed checks (1 inconclusive)
✅ Passed checks (1 passed)
✨ Finishing touches
🧪 Generate unit tests (beta)
Comment |
|
Devin, looks like we may need the same fix here: https://github.com/airbytehq/PyAirbyte/actions/runs/19087533763/job/54531059233#step:4:1 |
- Pass python-version: '3.12' directly to hynek/build-and-inspect-python-package action to prevent it from defaulting to Python 3.x (which resolves to 3.14) - Add UV_PYTHON: "3.12" env variable as additional safeguard for uv - Keep actions/setup-python step for consistency The hynek action has its own python-version input that defaults to 3.x, which was overriding the runner's Python version set by actions/setup-python. This comprehensive fix ensures Python 3.12 is used throughout the build process. Co-Authored-By: AJ Steers <aj@airbyte.io>
|
Good catch! I've updated the workflow with a comprehensive fix:
The issue was that the hynek action has its own CI should now pass with Python 3.12 throughout the build process. |
|
Devin, still falling. Keep me posted in slack but keep working until CI passes. |
The hynek/build-and-inspect-python-package action does not support a python-version input and internally uses Python 3.x (which resolves to 3.14 on GitHub runners). Since PyO3 v0.24.1 only supports up to Python 3.13, we use the PYO3_USE_ABI3_FORWARD_COMPATIBILITY flag as recommended by the PyO3 error message to allow the build to proceed. This is a temporary workaround until either: - PyO3 adds support for Python 3.14, or - The hynek action adds support for pinning Python version, or - We inline the build steps to control the Python version directly Changes: - Remove job-level UV_PYTHON env (didn't help) - Remove invalid python-version input from hynek step (not supported) - Add PYO3_USE_ABI3_FORWARD_COMPATIBILITY=1 env to hynek step - Keep actions/setup-python for consistency Co-Authored-By: AJ Steers <aj@airbyte.io>
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.
Actionable comments posted: 0
🧹 Nitpick comments (1)
.github/workflows/pypi_publish.yml (1)
22-26: PyO3 forward-compatibility workaround is a solid interim solution.The comment explaining the rationale is clear and helpful. One note: this flag is explicitly a workaround—when PyO3 and/or pydantic-core gain support for Python 3.14+, you'll want to circle back and remove this to keep the CI clean. Should we add a TODO or a tracking issue to remove it in a future PR, wdyt?
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (1)
.github/workflows/pypi_publish.yml(2 hunks)
🧰 Additional context used
🧠 Learnings (1)
📓 Common learnings
Learnt from: yohannj
Repo: airbytehq/PyAirbyte PR: 716
File: airbyte/logs.py:384-402
Timestamp: 2025-07-11T19:53:44.427Z
Learning: In the PyAirbyte project, when reviewing PRs, maintain clear separation of concerns. Don't suggest changes that are outside the scope of the PR's main objective, even if they would improve consistency or fix other issues. This helps with reviewing changes and potential reverts.
⏰ 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)
- GitHub Check: Pytest (All, Python 3.11, Windows)
- GitHub Check: Pytest (No Creds)
- GitHub Check: Pytest (All, Python 3.10, Windows)
- GitHub Check: Pytest (All, Python 3.10, Ubuntu)
- GitHub Check: Pytest (All, Python 3.11, Ubuntu)
- GitHub Check: Pytest (Fast)
🔇 Additional comments (3)
.github/workflows/pypi_publish.yml (3)
15-17: Checkout action version bump looks good.The ref update to the newer v5.0.0 commit is a sensible maintenance bump. ✓
18-20: Python 3.12 pinning directly addresses the PyO3 compatibility blocker.This aligns cleanly with your pyproject.toml constraint (python = ">=3.10,<3.13") and will prevent the hynek/build-and-inspect-python-package action from defaulting to Python 3.14 where PyO3 v0.24.1 fails. 👍
1-55: Verification checklist before merge.Per your PR objectives, this is still in draft pending CI verification. Once you're ready:
- ✓ Confirm the build job completes without PyO3 errors
- ✓ Verify no other Python version issues across other CI jobs (e.g., lint, tests, etc.)
- ✓ Validate the publish workflow still works end-to-end
- ✓ Confirm whether the same Python 3.12 pinning is needed in any other workflows (you mentioned this fix may be required elsewhere)
Once CI passes, the changes look solid and ready to land. Great catch on tracking down the root cause! 🚀
Fixed a typo in the actions/checkout SHA that was causing the workflow to fail. The correct SHA for v5.0.0 is 08c6903cd8c0fde910a37f88322edcfb5dd907a8. Applied PYO3_USE_ABI3_FORWARD_COMPATIBILITY workaround to allow pydantic-core to build with Python 3.14. The hynek action internally uses Python 3.x which resolves to 3.14 on GitHub runners, but PyO3 v0.24.1 only supports up to 3.13. Also added PYO3_PRINT_CONFIG for better visibility in CI logs. This is a temporary workaround until either: - PyO3 adds support for Python 3.14, or - The hynek action adds support for pinning Python version Co-Authored-By: AJ Steers <aj@airbyte.io>
|
Fixed a checkout SHA typo that was blocking the workflow. The clean fix is now pushed with:
CI is now running with the clean fix. The hynek action internally uses Python 3.x which resolves to 3.14, and PyO3 v0.24.1 only supports up to 3.13, so this workaround is necessary until either PyO3 adds 3.14 support or the hynek action adds support for pinning Python versions. Monitoring CI results... |
PYO3_PRINT_CONFIG=1 is a debugging flag that intentionally halts the build after printing configuration. Removing it to allow the build to proceed with only PYO3_USE_ABI3_FORWARD_COMPATIBILITY=1, which should be sufficient to allow pydantic-core to build with Python 3.14. Co-Authored-By: AJ Steers <aj@airbyte.io>
|
Removed PYO3_PRINT_CONFIG=1 which was a debugging flag that intentionally halts the build after printing configuration. The build should now proceed with only PYO3_USE_ABI3_FORWARD_COMPATIBILITY=1, which allows PyO3 to build against Python 3.14 using forward compatibility mode. This is the recommended workaround from the PyO3 error message itself. Monitoring CI for results... |
Investigation SummaryAfter investigating the CI failures, I've identified the root cause and a recommended solution. Root CauseThe Show/Hide Detailed AnalysisAttempts Made:
Current Build Errors: These are real FFI symbol mismatches - PyO3 v0.24.1 doesn't support Python 3.14's C API. Recommended SolutionReplace the - uses: actions/setup-python@v5
with:
python-version: '3.12'
- name: Install build tools
run: python -m pip install build twine
- name: Build package
run: python -m build --sdist --wheel
- name: Check package
run: twine check dist/*
- uses: actions/upload-artifact@v4
with:
name: Packages
path: distThis maintains compatibility with the existing Alternative Options
Requesting approval to implement the recommended solution (inline build steps with Python 3.12). Requested by @aaronsteers |
|
Devin, this release seems to fix the bug we are seeing. Can you bump to the latest and see if that fixes our issues without the other problems? https://github.com/hynek/build-and-inspect-python-package/releases/tag/v2.14.0 |
Upgrading from v2.13.0 to v2.14.0 which includes: - Update tools such that they work on Python 3.14 - The action now ignores UV_PYTHON coming from the outside This should fix the PyO3/pydantic-core build issues with Python 3.14 by using updated tooling that properly handles Python 3.14. Removed the PYO3_USE_ABI3_FORWARD_COMPATIBILITY workaround to do a clean test of whether v2.14.0 resolves the issue. Release notes: https://github.com/hynek/build-and-inspect-python-package/releases/tag/v2.14.0 Co-Authored-By: AJ Steers <aj@airbyte.io>
|
Upgraded to hynek/build-and-inspect-python-package v2.14.0 as suggested. This version includes:
Removed the Monitoring CI results... Release notes: https://github.com/hynek/build-and-inspect-python-package/releases/tag/v2.14.0 |
ci: pin Python to 3.12 in build workflow to fix PyO3 compatibility
Summary
This PR fixes two CI failures on main:
Build failure: The
hynek/build-and-inspect-python-packageaction was defaulting to Python 3.14, causingpydantic-coreto fail building due to PyO3 v0.24.1's maximum supported Python version being 3.13. Fixed by explicitly pinning Python to 3.12 viaactions/setup-python.Linter failure: Removed a blank line after "Note:" in
airbyte/mcp/__init__.pyto fix D412 docstring linting error.The Python 3.12 pin aligns with the project's declared version constraint in pyproject.toml:
python = ">=3.10,<3.13".Review & Testing Checklist for Human
Risk level: Yellow (workflow modification, not yet verified in CI)
Test Plan
Notes
poe fix-and-check) passed successfullyerror: the configured Python interpreter version (3.14) is newer than PyO3's maximum supported version (3.13)Link to Devin run: https://app.devin.ai/sessions/5a49a6c6d7d44e46b96a1539823e9077
Requested by: AJ Steers (@aaronsteers)
Context: https://airbytehq-team.slack.com/archives/D089P0UPVT4/p1762303244158319
Summary by CodeRabbit
Important
Auto-merge enabled.
This PR is set to merge automatically when all requirements are met.
Note
Auto-merge may have been disabled. Please check the PR status to confirm.