Skip to content

Conversation

@dbgold17
Copy link
Contributor

@dbgold17 dbgold17 commented Oct 18, 2025

Summary by CodeRabbit

  • Chores

    • Updated Docker base image to Python 3.13.9-slim-bookworm
    • Reorganized LangChain dependency structure: consolidated langchain packages and updated vector-db extras
  • Internal

    • Enhanced type safety through improved type annotations and validation across core modules

Copilot AI review requested due to automatic review settings October 18, 2025 01:14
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

Updates the manifest server Docker base image to Python 3.13.

  • Bumps Python version from 3.12 to 3.13.
  • Pins the image to a specific sha256 digest for reproducibility.

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

@github-actions
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@dbgold17/update-manifest-server-to-python-3.13#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 dbgold17/update-manifest-server-to-python-3.13

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.

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Oct 18, 2025

📝 Walkthrough

Walkthrough

The changes primarily focus on updating type-checking annotations and dependencies. The Dockerfile base image is upgraded to Python 3.13.9-slim-bookworm, langchain dependency declarations are restructured in pyproject.toml, and type: ignore annotations are added throughout the codebase to suppress typing warnings without modifying functional behavior.

Changes

Cohort / File(s) Change Summary
Docker Infrastructure
airbyte_cdk/manifest_server/Dockerfile
Base image updated from python:3.12-slim-bookworm to python:3.13.9-slim-bookworm@sha256:4c9fe962f6ce46ecf3633a7e9d0a9fb7f5622121ee00d628eff206da024147c9
Dependency Management
pyproject.toml
Langchain dependencies restructured: replaced langchain_community, langchain_core, and langchain_text_splitters with unified langchain, langchain_core, and langchain_community at version ^0.3.0; updated vector-db-based extras to reflect new package organization
Type Annotation Improvements
airbyte_cdk/connector_builder/connector_builder_handler.py, airbyte_cdk/manifest_server/command_processor/utils.py, airbyte_cdk/sources/declarative/interpolation/macros.py, airbyte_cdk/sources/file_based/stream/default_file_based_stream.py, airbyte_cdk/sources/streams/checkpoint/checkpoint_reader.py
Added type: ignore comments to suppress typing warnings; explicit bool() wrapping applied in command_processor/utils.py to enforce boolean returns

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

These are largely consistent pattern changes—adding type-ignore annotations, explicit bool() wrapping, and a straightforward dependency restructuring. The modifications preserve existing behavior while improving type-checker compatibility.

Possibly related PRs

Suggested reviewers

  • aaronsteers
  • brianjlai

Pre-merge checks and finishing touches

❌ Failed checks (1 warning, 1 inconclusive)
Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 54.55% which is insufficient. The required threshold is 80.00%. You can run @coderabbitai generate docstrings to improve docstring coverage.
Title Check ❓ Inconclusive The PR title accurately describes the Python 3.13 base image update present in the changeset, which is a clear and specific change. However, the actual changeset includes multiple substantial changes beyond this: langchain dependency reorganization (updated to unified package set at ^0.3.0), bool() wrapping added to utility functions, and type: ignore annotations added across several files. While the instructions note that titles don't need to cover every detail, it's unclear whether these additional changes are supporting modifications necessary for the Python 3.13 upgrade or if they represent separate concerns that should be mentioned or split into different PRs. Could you clarify whether the langchain dependency updates and the type-checking annotations across multiple files are all directly related to the Python 3.13 upgrade? If these are supporting changes made necessary by the version bump, the title might benefit from mentioning that scope—something like "chore: upgrade to python 3.13 and update type checking." If they're independent changes, it might be worth splitting this into focused PRs to keep the scope clear. Wdyt?
✅ Passed checks (1 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
✨ Finishing touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch dbgold17/update-manifest-server-to-python-3.13

📜 Recent review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 82b423b and 32a7191.

⛔ Files ignored due to path filters (1)
  • poetry.lock is excluded by !**/*.lock
📒 Files selected for processing (7)
  • airbyte_cdk/connector_builder/connector_builder_handler.py (2 hunks)
  • airbyte_cdk/manifest_server/Dockerfile (1 hunks)
  • airbyte_cdk/manifest_server/command_processor/utils.py (3 hunks)
  • airbyte_cdk/sources/declarative/interpolation/macros.py (2 hunks)
  • airbyte_cdk/sources/file_based/stream/default_file_based_stream.py (1 hunks)
  • airbyte_cdk/sources/streams/checkpoint/checkpoint_reader.py (1 hunks)
  • pyproject.toml (2 hunks)
🚧 Files skipped from review as they are similar to previous changes (7)
  • airbyte_cdk/manifest_server/command_processor/utils.py
  • airbyte_cdk/manifest_server/Dockerfile
  • airbyte_cdk/sources/declarative/interpolation/macros.py
  • pyproject.toml
  • airbyte_cdk/sources/file_based/stream/default_file_based_stream.py
  • airbyte_cdk/connector_builder/connector_builder_handler.py
  • airbyte_cdk/sources/streams/checkpoint/checkpoint_reader.py
⏰ 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). (14)
  • GitHub Check: Check: source-hardcoded-records
  • GitHub Check: Check: source-google-drive
  • GitHub Check: Check: source-shopify
  • GitHub Check: Check: destination-motherduck
  • GitHub Check: Check: source-pokeapi
  • GitHub Check: Check: source-intercom
  • GitHub Check: Manifest Server Docker Image Build
  • GitHub Check: SDM Docker Image Build
  • GitHub Check: Pytest (All, Python 3.13, Ubuntu)
  • GitHub Check: Pytest (All, Python 3.12, Ubuntu)
  • GitHub Check: Pytest (All, Python 3.10, Ubuntu)
  • GitHub Check: Pytest (All, Python 3.11, Ubuntu)
  • GitHub Check: Pytest (Fast)
  • GitHub Check: Analyze (python)

Comment @coderabbitai help to get the list of available commands and usage tips.

@github-actions
Copy link

github-actions bot commented Oct 18, 2025

PyTest Results (Fast)

3 802 tests  ±0   3 790 ✅ ±0   6m 30s ⏱️ -13s
    1 suites ±0      12 💤 ±0 
    1 files   ±0       0 ❌ ±0 

Results for commit 82b423b. ± Comparison against base commit 20ae208.

♻️ This comment has been updated with latest results.

@github-actions
Copy link

github-actions bot commented Oct 18, 2025

PyTest Results (Full)

3 805 tests   3 793 ✅  10m 52s ⏱️
    1 suites     12 💤
    1 files        0 ❌

Results for commit 82b423b.

♻️ This comment has been updated with latest results.

@dbgold17 dbgold17 requested a review from aaronsteers October 22, 2025 23:46
@dbgold17 dbgold17 changed the title update connector-builder to use python 3.13 base image chore: use python 3.13 in connector builder base image Oct 22, 2025
@github-actions github-actions bot added the chore label Oct 23, 2025
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 (1)
airbyte_cdk/connector_builder/connector_builder_handler.py (1)

51-51: Consider explicit bool() casting for consistency with similar code?

I noticed that airbyte_cdk/manifest_server/command_processor/utils.py has nearly identical functions (should_migrate_manifest and should_normalize_manifest at lines 40-57) that use explicit bool() casting instead of type-ignore comments:

return bool(manifest.get(SHOULD_MIGRATE_KEY, False))

The explicit casting approach is a bit more self-documenting and ensures type safety without suppressing warnings. Would you consider aligning these implementations for consistency across the codebase? wdyt?

Apply this diff to use explicit bool casting:

-    return config.get("__should_migrate", False)  # type: ignore[no-any-return]
+    return bool(config.get("__should_migrate", False))
-    return config.get("__should_normalize", False)  # type: ignore[no-any-return]
+    return bool(config.get("__should_normalize", False))

Also applies to: 60-60

📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between e33f84d and 19dbf7e.

⛔ Files ignored due to path filters (1)
  • poetry.lock is excluded by !**/*.lock
📒 Files selected for processing (5)
  • airbyte_cdk/connector_builder/connector_builder_handler.py (2 hunks)
  • airbyte_cdk/manifest_server/command_processor/utils.py (3 hunks)
  • airbyte_cdk/sources/declarative/interpolation/macros.py (2 hunks)
  • airbyte_cdk/sources/file_based/stream/default_file_based_stream.py (1 hunks)
  • airbyte_cdk/sources/streams/checkpoint/checkpoint_reader.py (1 hunks)
✅ Files skipped from review due to trivial changes (1)
  • airbyte_cdk/sources/streams/checkpoint/checkpoint_reader.py
🧰 Additional context used
🧬 Code graph analysis (1)
airbyte_cdk/sources/file_based/stream/default_file_based_stream.py (2)
airbyte_cdk/sources/streams/concurrent/adapters.py (1)
  • cursor (196-197)
airbyte_cdk/sources/streams/concurrent/default_stream.py (1)
  • cursor (92-93)
⏰ 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). (14)
  • GitHub Check: Check: source-pokeapi
  • GitHub Check: Check: source-hardcoded-records
  • GitHub Check: Check: source-shopify
  • GitHub Check: Check: source-intercom
  • GitHub Check: Check: source-google-drive
  • GitHub Check: Check: destination-motherduck
  • GitHub Check: Manifest Server Docker Image Build
  • GitHub Check: SDM Docker Image Build
  • GitHub Check: Pytest (All, Python 3.10, Ubuntu)
  • GitHub Check: Pytest (All, Python 3.12, Ubuntu)
  • GitHub Check: Pytest (All, Python 3.13, Ubuntu)
  • GitHub Check: Pytest (All, Python 3.11, Ubuntu)
  • GitHub Check: Pytest (Fast)
  • GitHub Check: Analyze (python)
🔇 Additional comments (3)
airbyte_cdk/sources/declarative/interpolation/macros.py (1)

14-15: Type-ignore annotations look reasonable for untyped dependencies.

The type: ignore[import-untyped] annotations for pytz and dateutil.parser are appropriate since these are external libraries without complete type stubs. The return annotation on line 93 suppresses the no-any-return warning from astimezone(), which is reasonable given the complexity of the datetime handling.

Also applies to: 93-93

airbyte_cdk/manifest_server/command_processor/utils.py (1)

47-47: Nice! Explicit bool() casting is a solid approach.

The explicit bool() casting ensures these functions always return proper booleans, even if the config contains truthy/falsy non-bool values. This is clearer and safer than type-ignore comments, as it documents the intention and provides runtime guarantees.

Also applies to: 57-57

airbyte_cdk/sources/file_based/stream/default_file_based_stream.py (1)

95-95: Good refinement of the type-ignore annotation.

The updated type: ignore[override] is more specific than the previous generic comment, making it clearer what mypy warning is being suppressed. This helps future maintainers understand the intention.

@dbgold17 dbgold17 force-pushed the dbgold17/update-manifest-server-to-python-3.13 branch from 82b423b to 32a7191 Compare October 23, 2025 21:09
@dbgold17 dbgold17 closed this Oct 23, 2025
@dbgold17 dbgold17 force-pushed the dbgold17/update-manifest-server-to-python-3.13 branch from 32a7191 to c0e506f Compare October 23, 2025 21:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants