Skip to content

Conversation

pedroslopez
Copy link
Contributor

@pedroslopez pedroslopez commented Aug 28, 2025

The old one kept randomly timing out like so:

Screenshot 2025-08-28 at 1 04 18 AM

https://github.com/airbytehq/airbyte-python-cdk/actions/runs/17281035642/job/49049280943

This PR replaces setup-poetry with install-poetry, which is used in our other repos and has more stars.

Summary by CodeRabbit

  • Chores
    • Updated CI workflows to use a new Poetry installer action with standardized input naming.
    • Aligned Poetry version settings across testing, linting, docs, and dependency-analysis pipelines.
    • Improves reliability and consistency of build, test, and documentation jobs.
    • No user-facing changes.

Important

Auto-merge enabled.

This PR is set to merge automatically when all requirements are met.

@github-actions github-actions bot added bug Something isn't working security labels Aug 28, 2025
Copy link

👋 Greetings, Airbyte Team Member!

Here are some helpful tips and reminders for your convenience.

Testing This CDK Version

You can test this version of the CDK using the following:

# Run the CLI from this branch:
uvx 'git+https://github.com/airbytehq/airbyte-python-cdk.git@pedro/install-poetry#egg=airbyte-python-cdk[dev]' --help

# Update a connector to use the CDK from this branch ref:
cd airbyte-integrations/connectors/source-example
poe use-cdk-branch pedro/install-poetry

Helpful Resources

PR Slash Commands

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

  • /autofix - Fixes most formatting and linting issues
  • /poetry-lock - Updates poetry.lock file
  • /test - Runs connector tests with the updated CDK
  • /poe build - Regenerate git-committed build artifacts, such as the pydantic models which are generated from the manifest JSON schema in YAML.
  • /poe <command> - Runs any poe command in the CDK environment

📝 Edit this welcome message.

@pedroslopez pedroslopez marked this pull request as ready for review August 28, 2025 05:04
Copy link

github-actions bot commented Aug 28, 2025

PyTest Results (Fast)

3 762 tests  ±0   3 751 ✅ ±0   7m 2s ⏱️ -5s
    1 suites ±0      11 💤 ±0 
    1 files   ±0       0 ❌ ±0 

Results for commit 5344efc. ± Comparison against base commit ea76ce2.

♻️ This comment has been updated with latest results.

Copy link
Contributor

coderabbitai bot commented Aug 28, 2025

📝 Walkthrough

Walkthrough

Replaces the Poetry setup action across multiple GitHub Actions workflows from Gr1N/setup-poetry@v9 to snok/install-poetry@v1 and renames the input key from poetry-version to version; specified Poetry versions remain unchanged. No other steps, conditions, or control flow were modified.

Changes

Cohort / File(s) Summary
Connector tests workflows
.github/workflows/connector-tests.yml
Switch action to snok/install-poetry@v1; rename input poetry-versionversion (value 2.0.1) in two places.
Docs: pdoc preview/publish
.github/workflows/pdoc_preview.yml, .github/workflows/pdoc_publish.yml
Update Poetry setup action to snok/install-poetry@v1; rename input key to version (value 2.0.1).
Poetry lock command
.github/workflows/poetry-lock-command.yml
Replace action with snok/install-poetry@v1; input poetry-versionversion (value 2.0.1).
Pytest workflows
.github/workflows/pytest_fast.yml, .github/workflows/pytest_matrix.yml, .github/workflows/test-command.yml
Swap to snok/install-poetry@v1; rename input to version (value 2.0.1).
Dependency analysis
.github/workflows/python_dependency_analysis.yml
Use snok/install-poetry@v1; input key renamed to version (value 2.0.1).
Lint workflows (mixed Poetry versions)
.github/workflows/python_lint.yml
All jobs use snok/install-poetry@v1; input key renamed to version. Versions: ruff-lint-check 2.0.1; ruff-format-check 1.8.4; mypy-check 1.8.4.
On-demand & helper commands
.github/workflows/test-command.yml, .github/workflows/autofix-command.yml
Replace Gr1N/setup-poetry@v9 with snok/install-poetry@v1; rename poetry-versionversion (value 2.0.1).

Sequence Diagram(s)

(omitted — changes are action replacement/input rename only; no runtime/control-flow modifications to visualize)

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Possibly related PRs

Suggested labels

ci

Suggested reviewers

  • aaronsteers
  • ChristoGrab
  • maxi297

Would you like me to also scan README or contributor docs for CI action references to update mentions of the old action, wdyt?

✨ Finishing Touches
🧪 Generate unit tests
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch pedro/install-poetry

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share
🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

‼️ IMPORTANT
Auto-reply has been disabled for this repository in the CodeRabbit settings. The CodeRabbit bot will not respond to your replies unless it is explicitly tagged.

  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbit in a new review comment at the desired location with your query.
  • PR comments: Tag @coderabbit in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbit gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbit read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.

Support

Need help? Create a ticket on our support page for assistance with any issues or questions.

CodeRabbit Commands (Invoked using PR/Issue comments)

Type @coderabbit help to get the list of available commands.

Other keywords and placeholders

  • Add @coderabbit ignore or @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbit summary or @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbit or @coderabbitai anywhere in the PR title to generate the title automatically.

CodeRabbit Configuration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Status, Documentation and Community

  • Visit our Status Page to check the current availability of CodeRabbit.
  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

🧹 Nitpick comments (9)
.github/workflows/pytest_fast.yml (2)

18-20: LGTM on action swap; would you like to pin to a commit for security?

The change to snok/install-poetry@v1 with version: "2.0.1" is correct. For defense-in-depth, pinning the action to a commit SHA could be worthwhile, wdyt?


45-47: Second Poetry setup matches the new pattern — LGTM.

Consistent with the first job; nice. Same optional suggestion about pinning to a commit SHA applies here, wdyt?

.github/workflows/pdoc_publish.yml (1)

34-36: Docs workflow updated correctly; consider pinning snok/install-poetry to a commit, wdyt?

Change looks good; the rest of the job (Python setup with Poetry cache) remains compatible.

.github/workflows/test-command.yml (1)

86-88: On-demand test flow uses the new Poetry installer — LGTM; pin to commit for hardening?

Everything else in the job continues to work with Poetry 2.0.1. Do you want to pin snok/install-poetry to a commit SHA to reduce supply-chain risk, wdyt?

.github/workflows/poetry-lock-command.yml (1)

84-86: Lock command workflow updated — LGTM; optional pin-to-SHA suggestion.

Swap to snok/install-poetry@v1 with version is correct. Given this job pushes commits, would you like to pin the action to a specific commit for extra safety, wdyt?

.github/workflows/pytest_matrix.yml (1)

61-65: Switch to snok/install-poetry looks good; consider pinning and preferring active Python.

  • Nice swap; value preserved. Would you pin the action to a commit SHA instead of @v1 to tighten supply-chain security, wdyt?
  • Since Poetry is installed before actions/setup-python in this job, would you add virtualenvs-prefer-active-python: true so Poetry reliably uses the matrix Python when creating the venv, wdyt?

Apply this minimal tweak:

-      - name: Set up Poetry
-        uses: snok/install-poetry@v1
+      - name: Set up Poetry
+        uses: snok/install-poetry@v1
         if: steps.changes.outputs.src == 'true'
         with:
-          version: "2.0.1"
+          version: "2.0.1"
+          virtualenvs-prefer-active-python: true
.github/workflows/pdoc_preview.yml (1)

17-19: LGTM; mirror security pin and prefer active Python?

  • Change is consistent with the PR’s goal. Would you pin snok/install-poetry to a commit SHA here too, wdyt?
  • Optional: add virtualenvs-prefer-active-python: true to avoid the runner’s default Python influencing Poetry’s venv selection (harmless even though Python is set up right after), wdyt?
-      - name: Set up Poetry
-        uses: snok/install-poetry@v1
+      - name: Set up Poetry
+        uses: snok/install-poetry@v1
         with:
-          version: "2.0.1"
+          version: "2.0.1"
+          virtualenvs-prefer-active-python: true
.github/workflows/connector-tests.yml (1)

144-147: Good swap; add pinning and consider caching to speed this long job.

  • Action switch + version mapping looks correct. Would you pin snok/install-poetry to a commit SHA, wdyt?
  • This job doesn’t use actions/setup-python cache: "poetry". Adding it can shave minutes off installs—OK to include, wdyt?
  • Also, to ensure Poetry uses 3.11 for venvs even if other Pythons are present, would you add virtualenvs-prefer-active-python: true?

Minimal tweak within this step:

-      - name: Set up Poetry
-        if: steps.no_changes.outputs.status != 'cancelled'
-        uses: snok/install-poetry@v1
+      - name: Set up Poetry
+        if: steps.no_changes.outputs.status != 'cancelled'
+        uses: snok/install-poetry@v1
         with:
-          version: "2.0.1"
+          version: "2.0.1"
+          virtualenvs-prefer-active-python: true

If you’re open to caching, in the “Set up Python” step above add:

       - name: Set up Python
         if: steps.no_changes.outputs.status != 'cancelled'
         uses: actions/setup-python@v5
         with:
           python-version: "3.11"
+          cache: "poetry"
.github/workflows/python_lint.yml (1)

18-21: Consistent action update; confirm mixed Poetry versions are intentional and consider pinning.

  • Nice, all three jobs use snok/install-poetry. Would you pin to a commit SHA across the board, wdyt?
  • You’re using Poetry 2.0.1 for ruff-lint but 1.8.4 for ruff-format and mypy. Is the split intentional to keep parity with prior runs or toolchain quirks? If not, standardizing on one Poetry version could reduce drift, wdyt?
  • Optional: add virtualenvs-prefer-active-python: true to each step to consistently target the job’s Python.

Example tweak for one job (repeat similarly for the others if you agree):

       - name: Set up Poetry
-        uses: snok/install-poetry@v1
+        uses: snok/install-poetry@v1
         with:
           version: "2.0.1"
+          virtualenvs-prefer-active-python: true

Also applies to: 41-44, 64-67

📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

💡 Knowledge Base configuration:

  • MCP integration is disabled by default for public repositories
  • Jira integration is disabled by default for public repositories
  • Linear integration is disabled by default for public repositories

You can enable these sources in your CodeRabbit configuration.

📥 Commits

Reviewing files that changed from the base of the PR and between ea76ce2 and c914d1c.

📒 Files selected for processing (9)
  • .github/workflows/connector-tests.yml (1 hunks)
  • .github/workflows/pdoc_preview.yml (1 hunks)
  • .github/workflows/pdoc_publish.yml (1 hunks)
  • .github/workflows/poetry-lock-command.yml (1 hunks)
  • .github/workflows/pytest_fast.yml (2 hunks)
  • .github/workflows/pytest_matrix.yml (1 hunks)
  • .github/workflows/python_dependency_analysis.yml (1 hunks)
  • .github/workflows/python_lint.yml (3 hunks)
  • .github/workflows/test-command.yml (1 hunks)
⏰ 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). (2)
  • GitHub Check: Pytest (Fast)
  • GitHub Check: Manifest Server Docker Image Build

Copy link
Contributor

@aaronsteers aaronsteers left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Awesome 👍😎

@pedroslopez pedroslopez enabled auto-merge (squash) August 28, 2025 05:15
Copy link
Contributor

@coderabbitai coderabbitai bot left a 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 (2)
.github/workflows/autofix-command.yml (2)

75-79: Consider pinning the action to a commit SHA for supply-chain hardening.

Since this PR is labeled security, would you pin snok/install-poetry to a specific commit SHA instead of a moving tag to mitigate tampering risks, wdyt?

-        uses: snok/install-poetry@v1
+        uses: snok/install-poetry@<commit-sha> # v1

75-79: Ensure Poetry uses the matrix Python and that caching remains effective.

To avoid Poetry selecting a different interpreter on the runner and to help actions/setup-python’s cache: "poetry" work as intended, would you add the following inputs, wdyt?

  • Prefer the active Python set by setup-python.
  • Optionally keep venvs outside the project so cache keys target Poetry’s default venv location.
         with:
-          version: "2.0.1"
+          version: "2.0.1"
+          virtualenvs-prefer-active-python: true
+          # Optional: uncomment if you want setup-python caching to target Poetry’s default venvs dir
+          # virtualenvs-in-project: false

Also, if you’d like, we could add a tiny debug step after setup to print poetry --version && poetry config --list to confirm the effective config. Wdyt?

📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

💡 Knowledge Base configuration:

  • MCP integration is disabled by default for public repositories
  • Jira integration is disabled by default for public repositories
  • Linear integration is disabled by default for public repositories

You can enable these sources in your CodeRabbit configuration.

📥 Commits

Reviewing files that changed from the base of the PR and between c914d1c and 5344efc.

📒 Files selected for processing (1)
  • .github/workflows/autofix-command.yml (1 hunks)
⏰ 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). (3)
  • GitHub Check: Manifest Server Docker Image Build
  • GitHub Check: SDM Docker Image Build
  • GitHub Check: Pytest (Fast)
🔇 Additional comments (1)
.github/workflows/autofix-command.yml (1)

75-79: Switch to snok/install-poetry looks good.

Using snok/install-poetry@v1 with version: "2.0.1" is correct and aligns with the PR goal. Nice, this should reduce flakiness. Wdyt?

@pedroslopez pedroslopez merged commit eca065f into main Aug 28, 2025
21 checks passed
@pedroslopez pedroslopez deleted the pedro/install-poetry branch August 28, 2025 05:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working security
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants