Skip to content

Feat: Upgrade to Pydantic 2.0 and CDK 2.0#291

Merged
Aaron ("AJ") Steers (aaronsteers) merged 11 commits into
mainfrom
feat/pydantic2
Jul 7, 2024
Merged

Feat: Upgrade to Pydantic 2.0 and CDK 2.0#291
Aaron ("AJ") Steers (aaronsteers) merged 11 commits into
mainfrom
feat/pydantic2

Conversation

@aaronsteers

@aaronsteers Aaron ("AJ") Steers (aaronsteers) commented Jul 7, 2024

Copy link
Copy Markdown
Member

Summary by CodeRabbit

  • New Features

    • Added "source-tiktok-marketing" to available sources.
    • Increased generated record count in run_faker.py from 50,000 to 200,000.
  • Bug Fixes

    • Ensured UTF-8 encoding in Windows runners for Python Pytest workflow.
  • Improvements

    • Enhanced Pydantic compatibility for SecretString.
    • Improved state and message processing for better validation and JSON handling.
    • Updated method calls for JSON operations in various modules to use the new Pydantic methods.
  • Refactor

    • Updated imports and configuration parameters to align with new experimental features.

@coderabbitai

coderabbitai Bot commented Jul 7, 2024

Copy link
Copy Markdown
Contributor

Warning

Rate limit exceeded

Aaron ("AJ") Steers (@aaronsteers) has exceeded the limit for the number of commits or files that can be reviewed per hour. Please wait 13 minutes and 22 seconds before requesting another review.

How to resolve this issue?

After the wait time has elapsed, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

We recommend that you space out your commits to avoid hitting the rate limit.

How do rate limits work?

CodeRabbit enforces hourly rate limits for each developer per organization.

Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout.

Please see our FAQ for further information.

Commits

Files that changed from the base of the PR and between a93f135 and 250ebde.

Walkthrough

Walkthrough

The updates introduce various improvements and adjustments across multiple files, including library version upgrades, enhanced Pydantic integration for validation in secrets handling, and refined processing of documents and state management. Key changes simplify source fetching and state writing, align type annotations, add new sources, and enhance encoding specifications. These modifications increase compatibility, maintainability, and functionality, particularly focusing on making the codebase more efficient and compatible with the latest dependencies.

Changes

File Path Summary
airbyte/_util/document_rendering.py Initialized certain properties to None in CustomRenderingInstructions and DocumentRenderer.
airbyte/caches/snowflake.py Changed dedupe_mode declaration to specify the type explicitly.
airbyte/secrets/base.py Added Pydantic compatibility methods for SecretString.
examples/run_pokeapi.py Modified source fetching method and associated configurations.
pyproject.toml Updated version constraints for multiple dependencies.
tests/integration_tests/test_all_cache_types.py Changed how sources are fetched in test fixtures.
airbyte/_future_cdk/record_processor.py Utilized model_validate_json for buffer processing.
airbyte/_future_cdk/state_providers.py Adjusted function calls for state input file text generation.
airbyte/_future_cdk/state_writers.py Updated method for printing JSON representation.
airbyte/caches/_state_backend.py Revised JSON processing methods in state writing and retrieval functions.
airbyte/sources/base.py Updated comments, type annotations, and JSON processing methods.
airbyte/sources/declarative.py Suppressed Pydantic deprecation warnings and added necessary imports.
airbyte/sources/registry.py Added "source-tiktok-marketing" entry to the registry.
examples/run_faker.py Increased records generation and set FORCE_FULL_REFRESH to True.
airbyte/_executor.py Added encoding="utf-8" parameter in subprocess streaming function.
.github/workflows/python_pytest.yml Set PYTHONIOENCODING to utf-8 for Windows runners.

Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media?

Share
Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>.
    • Generate unit testing code for this file.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai generate unit testing code for this file.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai 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:
    • @coderabbitai generate interesting stats about this repository and render them as a table.
    • @coderabbitai show all the console.log statements in this repository.
    • @coderabbitai read src/utils.ts and generate unit testing code.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.

CodeRabbit Commands (invoked as PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Additionally, you can add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.

CodeRabbit Configration 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

Documentation and Community

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

@aaronsteers

Copy link
Copy Markdown
Member Author

CodeRabbit (@coderabbitai) review

@coderabbitai

coderabbitai Bot commented Jul 7, 2024

Copy link
Copy Markdown
Contributor
Actions performed

Review triggered.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Actionable comments posted: 0

Review details

Configuration used: CodeRabbit UI
Review profile: CHILL

Commits

Files that changed from the base of the PR and between 42e9c85 and ac7217a.

Files ignored due to path filters (1)
  • poetry.lock is excluded by !**/*.lock
Files selected for processing (3)
  • examples/run_pokeapi.py (1 hunks)
  • pyproject.toml (3 hunks)
  • tests/integration_tests/test_all_cache_types.py (4 hunks)
Additional comments not posted (9)
examples/run_pokeapi.py (2)

17-20: LGTM! Verify the usage of the new parameter.

The usage of get_source has been updated correctly. Ensure that the new parameter source_manifest=True is correctly used.


<details>
<summary>Verification successful</summary>



---

<!-- [monologue]
[task review_file_1/3 lines_17-20] Review the usage of `get_source`.
[observations] The `source_manifest=True` parameter is used in multiple files:
- `examples/run_pokeapi.py`
- `tests/unit_tests/test_lowcode_connectors.py`
- `examples/run_downloadable_yaml_source.py`
- `tests/integration_tests/test_all_cache_types.py`
- `tests/integration_tests/test_lowcode_connectors.py`
[analysis] The presence of the `source_manifest=True` parameter in multiple test files suggests that its usage is being tested adequately. Additionally, its usage in example files indicates that it is being utilized in practical scenarios.
[actions] Confirm that the parameter is used correctly in the context of `get_source` function calls.
-->

**LGTM! Verify the usage of the new parameter.**

The `source_manifest=True` parameter is used correctly in multiple files, including examples and tests. This indicates adequate testing and practical usage.

- `examples/run_pokeapi.py`
- `tests/unit_tests/test_lowcode_connectors.py`
- `examples/run_downloadable_yaml_source.py`
- `tests/integration_tests/test_all_cache_types.py`
- `tests/integration_tests/test_lowcode_connectors.py`



</details>


<details>
<summary>Scripts executed</summary>

The following scripts were executed for the analysis:

Script:

```shell
#!/bin/bash
# Description: Verify the usage of the new parameter `source_manifest=True`.

# Test: Search for the usage of `source_manifest=True`. Expect: Only occurances of the new parameter.
rg --type python $'source_manifest=True'

Length of output: 70


Script:

#!/bin/bash
# Description: Verify the usage of the new parameter `source_manifest=True`.

# Test: Search for the usage of `source_manifest=True`. Expect: Only occurances of the new parameter.
rg --type py 'source_manifest=True'

Length of output: 580


14-14: LGTM! Verify the usage of the new import.

The import statement has been updated correctly. Ensure that the usage of get_source aligns with the new import.

tests/integration_tests/test_all_cache_types.py (4)

18-18: LGTM! Verify the usage of the new import.

The import statement has been updated correctly. Ensure that the usage of get_source aligns with the new import.


<details>
<summary>Verification successful</summary>



---

<!-- [monologue]
[task review_file_2/3 lines_18-18] The task is to verify the usage of the newly imported `get_source` function.
[observations] The `rg` command output shows multiple instances of `get_source` being used across different files. Some of these instances import `get_source` from `airbyte.experimental`, while others use `ab.get_source`.
[analysis] The goal is to ensure that the usage of `get_source` in `tests/integration_tests/test_all_cache_types.py` aligns with the new import from `airbyte.experimental`. The output indicates that the usage in this file is indeed consistent with the new import.
[actions] Generate the final response indicating that the verification is successful.
-->

**Verified: The usage of `get_source` aligns with the new import.**

The import statement has been updated correctly, and the usage of `get_source` in `tests/integration_tests/test_all_cache_types.py` is consistent with the new import from `airbyte.experimental`.

- `tests/integration_tests/test_all_cache_types.py`: Lines 18, 20, 22, 24



</details>


<details>
<summary>Scripts executed</summary>

The following scripts were executed for the analysis:

Script:

```shell
#!/bin/bash
# Description: Verify the usage of `get_source` aligns with the new import.

# Test: Search for the usage of `get_source`. Expect: Only occurances of the new import.
rg --type python $'get_source'

Length of output: 60


Script:

#!/bin/bash
# Description: Verify the usage of `get_source` aligns with the new import.

# Test: Search for the usage of `get_source`. Expect: Only occurrences of the new import.
rg --glob '*.py' 'get_source'

Length of output: 8597


83-88: LGTM! Verify the usage of the new parameter.

The usage of get_source has been updated correctly. Ensure that the new parameter source_manifest=True is correctly used.


<details>
<summary>Verification successful</summary>



---

<!-- [monologue]
[task review_file_2/3 lines_83-88] Review the usage of `get_source` in `source_pokeapi`.
[observations] The `rg` command successfully found multiple occurrences of `source_manifest=True` in various files.
[analysis] The occurrences of `source_manifest=True` were found in different test files and example scripts, indicating that the new parameter is being used consistently across the codebase.
[actions] Conclude the verification process by confirming that the new parameter `source_manifest=True` is correctly used.
-->

**The new parameter `source_manifest=True` is correctly used across the codebase.**

The usage of `get_source` with the `source_manifest=True` parameter has been verified in multiple files:
- `tests/unit_tests/test_lowcode_connectors.py`
- `examples/run_pokeapi.py`
- `tests/integration_tests/test_all_cache_types.py`
- `examples/run_downloadable_yaml_source.py`
- `tests/integration_tests/test_lowcode_connectors.py`



</details>


<details>
<summary>Scripts executed</summary>

The following scripts were executed for the analysis:

Script:

```shell
#!/bin/bash
# Description: Verify the usage of the new parameter `source_manifest=True`.

# Test: Search for the usage of `source_manifest=True`. Expect: Only occurances of the new parameter.
rg --type python $'source_manifest=True'

Length of output: 70


Script:

#!/bin/bash
# Description: Verify the usage of the new parameter `source_manifest=True`.

# Test: Search for the usage of `source_manifest=True`. Expect: Only occurrences of the new parameter.
rg --type py $'source_manifest=True'

Length of output: 580


66-66: LGTM! Verify the usage of the new parameter.

The usage of get_source has been updated correctly. Ensure that the new parameter install_if_missing=False is correctly used.


<details>
<summary>Verification successful</summary>



---

<!-- [monologue]
[task review_file_2/3 lines_66-66] Verify the usage of the `install_if_missing=False` parameter in the `get_source` function.
[observations] The search results show multiple occurrences of the `install_if_missing=False` parameter across various test files, including `tests/integration_tests/test_all_cache_types.py`.
[analysis] The presence of the `install_if_missing=False` parameter in multiple test files indicates that the parameter is being used consistently. The specific file and line under review, `tests/integration_tests/test_all_cache_types.py` at line 66, also shows the correct usage of this parameter.
[actions] Conclude that the usage of the `install_if_missing=False` parameter is verified and correct.
-->

**LGTM! The `install_if_missing=False` parameter is used correctly.**

The parameter `install_if_missing=False` is consistently used across multiple test files, including the specified line in `tests/integration_tests/test_all_cache_types.py`.

- `tests/integration_tests/test_all_cache_types.py:66`



</details>


<details>
<summary>Scripts executed</summary>

The following scripts were executed for the analysis:

Script:

```shell
#!/bin/bash
# Description: Verify the usage of the new parameter `install_if_missing=False`.

# Test: Search for the usage of `install_if_missing=False`. Expect: Only occurances of the new parameter.
rg --type python $'install_if_missing=False'

Length of output: 74


Script:

#!/bin/bash
# Description: Verify the usage of the new parameter `install_if_missing=False`.

# Test: Search for the usage of `install_if_missing=False`. Expect: Only occurrences of the new parameter.
rg --type py 'install_if_missing=False'

Length of output: 1997


49-49: LGTM! Verify the usage of the new parameter.

The usage of get_source has been updated correctly. Ensure that the new parameter install_if_missing=False is correctly used.


<details>
<summary>Verification successful</summary>



---

<!-- [monologue]
[task review_file_2/3 lines_49-49] Verify the usage of `install_if_missing=False` in the codebase.
[observations] The search results show multiple instances of `install_if_missing=False` across various test files and one instance in a non-test file (`airbyte/validate.py`).
[analysis] The presence of `install_if_missing=False` in both unit and integration tests suggests that the new parameter is being used consistently across the codebase. The single instance in `airbyte/validate.py` also aligns with the expected usage. This confirms that the new parameter is correctly used.
[actions] Conclude the verification process and generate the final response indicating successful verification.
-->

**LGTM! Verify the usage of the new parameter.**

The usage of `get_source` has been updated correctly to include the `install_if_missing=False` parameter. The new parameter is consistently used across the codebase.

- `tests/unit_tests/test_anonymous_usage_stats.py`
- `tests/integration_tests/test_duckdb_cache.py`
- `tests/integration_tests/test_source_faker_integration.py`
- `tests/integration_tests/cloud/test_cloud_sync.py`
- `tests/integration_tests/test_all_cache_types.py`
- `tests/integration_tests/cloud/test_cloud_workspaces.py`
- `tests/integration_tests/test_source_test_fixture.py`
- `tests/integration_tests/cloud/test_cloud_sql_reads.py`
- `airbyte/validate.py`



</details>


<details>
<summary>Scripts executed</summary>

The following scripts were executed for the analysis:

Script:

```shell
#!/bin/bash
# Description: Verify the usage of the new parameter `install_if_missing=False`.

# Test: Search for the usage of `install_if_missing=False`. Expect: Only occurances of the new parameter.
rg --type python $'install_if_missing=False'

Length of output: 74


Script:

#!/bin/bash
# Description: Verify the usage of the new parameter `install_if_missing=False`.

# Test: Search for the usage of `install_if_missing=False`. Expect: Occurrences of the new parameter.
rg --type py 'install_if_missing=False'

Length of output: 1997

pyproject.toml (3)

61-61: LGTM! Verify the compatibility of the new version constraint.

The version constraint for airbyte-source-faker has been updated correctly. Ensure that the new version constraint ">=6.2.0" is compatible with the project.


<details>
<summary>Verification successful</summary>

**Verify the compatibility of the new version constraint for `airbyte-source-faker`.**

The new version constraint `">=6.2.0"` for `airbyte-source-faker` is present in `pyproject.toml`. Ensure that this update does not introduce any breaking changes or incompatibilities with the rest of the project by checking the usage of `airbyte-source-faker` in the codebase.

---

**Verify the consistency of the `poetry.lock` file with the new version constraint for `airbyte-source-faker`.**

The new version constraint `">=6.2.0"` for `airbyte-source-faker` is present in `pyproject.toml`, and there are no direct usages of this package in the rest of the codebase. Ensure that the `poetry.lock` file is consistent with the new version constraint.

---

<!-- [monologue]
[task review_file_3/3 lines_61-61] Verify the consistency of the `poetry.lock` file with the new version constraint for `airbyte-source-faker`.
[observations] The `poetry.lock` file shows that the version of `airbyte-source-faker` is `6.2.0`, which is consistent with the new version constraint `">=6.2.0"` specified in `pyproject.toml`.
[analysis] The `poetry.lock` file is consistent with the new version constraint, and there are no direct usages of `airbyte-source-faker` in the codebase that could be affected by this version update.
[actions] Conclude the verification process and categorize the final response.
-->

**The version constraint for `airbyte-source-faker` is correctly updated and consistent.**

The `poetry.lock` file shows that the version of `airbyte-source-faker` is `6.2.0`, which aligns with the new version constraint `">=6.2.0"` specified in `pyproject.toml`. There are no direct usages of this package in the codebase that could be affected by this update.

- `pyproject.toml`: `airbyte-source-faker = ">=6.2.0"`
- `poetry.lock`: `version = "6.2.0"`



</details>


<details>
<summary>Scripts executed</summary>

The following scripts were executed for the analysis:

Script:

```shell
#!/bin/bash
# Description: Verify the compatibility of the new version constraint `">=6.2.0"` for `airbyte-source-faker`.

# Test: Search for the usage of `airbyte-source-faker`. Expect: Only occurances of the new version constraint.
rg --type toml $'airbyte-source-faker'

Length of output: 85


Script:

#!/bin/bash
# Search for the usage of `airbyte-source-faker` in the codebase to verify compatibility.
rg 'airbyte-source-faker'

Length of output: 115


Script:

#!/bin/bash
# Check the version of `airbyte-source-faker` in the `poetry.lock` file to ensure consistency with the new version constraint.
rg 'name = "airbyte-source-faker"' -A 5 poetry.lock

Length of output: 234


18-18: LGTM! Verify the compatibility of the new version constraint.

The version constraint for airbyte-cdk has been updated correctly. Ensure that the new version constraint ">=2.0,<=3.0" is compatible with the project.


---

`32-32`: **LGTM! Verify the compatibility of the new version constraint.**

The version constraint for `pydantic` has been updated correctly. Ensure that the new version constraint `">=2.0,<=3.0"` is compatible with the project.



Verification successful

LGTM! Verify the compatibility of the new version constraint.

The version constraint for pydantic has been updated correctly. Ensure that the new version constraint ">=2.0,<=3.0" is compatible with the project by running the tests.

  • Instances of BaseModel, Field, and PrivateAttr from pydantic were found and appear to be used correctly.
  • Recommend running the project's tests to confirm compatibility.
Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Description: Verify the compatibility of the new version constraint `">=2.0,<=3.0"` for `pydantic`.

# Test: Search for the usage of `pydantic`. Expect: Only occurances of the new version constraint.
rg --type toml $'pydantic'

Length of output: 65


Script:

#!/bin/bash
# Search for all import statements of `pydantic` in the codebase to verify compatibility with the new version constraint.
rg --type py 'import pydantic' --context 5

Length of output: 44


Script:

#!/bin/bash
# Search for all from-import statements of `pydantic` in the codebase to verify compatibility with the new version constraint.
rg --type py 'from pydantic import' --context 5

Length of output: 7285


Script:

#!/bin/bash
# Search for the usage of `BaseModel` from `pydantic` in the codebase.
rg --type py 'BaseModel' --context 5

Length of output: 4298


Script:

#!/bin/bash
# Search for the usage of `Field` from `pydantic` in the codebase.
rg --type py 'Field' --context 5

Length of output: 12592


Script:

#!/bin/bash
# Search for the usage of `PrivateAttr` from `pydantic` in the codebase.
rg --type py 'PrivateAttr' --context 5

Length of output: 6419

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Actionable comments posted: 0

Review details

Configuration used: CodeRabbit UI
Review profile: CHILL

Commits

Files that changed from the base of the PR and between ac7217a and ed12f36.

Files selected for processing (1)
  • airbyte/_util/document_rendering.py (2 hunks)
Files skipped from review due to trivial changes (1)
  • airbyte/_util/document_rendering.py

@harjotgill

Copy link
Copy Markdown

CodeRabbit team member here - it looks like the formatting broke. :)

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Actionable comments posted: 0

Review details

Configuration used: CodeRabbit UI
Review profile: CHILL

Commits

Files that changed from the base of the PR and between ed12f36 and 1ebb5e9.

Files selected for processing (2)
  • airbyte/caches/snowflake.py (1 hunks)
  • airbyte/secrets/base.py (2 hunks)
Files skipped from review due to trivial changes (1)
  • airbyte/caches/snowflake.py
Additional comments not posted (4)
airbyte/secrets/base.py (4)

9-11: Imports look good.

The added imports for TYPE_CHECKING, Any, CoreSchema, and core_schema are necessary for the new Pydantic compatibility methods.


77-89: Method validate looks good.

The method correctly validates that the input value is a valid secret string and raises an appropriate exception if the value is not a string.


91-99: Method __get_pydantic_core_schema__ looks good.

The method correctly returns a core schema using the validate method.


101-116: Method __get_pydantic_json_schema__ looks good.

The method correctly returns a JSON schema with writeOnly and format properties to prevent secrets from being exposed inadvertently.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Actionable comments posted: 0

Review details

Configuration used: CodeRabbit UI
Review profile: CHILL

Commits

Files that changed from the base of the PR and between 1ebb5e9 and 317dec0.

Files selected for processing (8)
  • airbyte/_future_cdk/record_processor.py (1 hunks)
  • airbyte/_future_cdk/state_providers.py (1 hunks)
  • airbyte/_future_cdk/state_writers.py (1 hunks)
  • airbyte/caches/_state_backend.py (2 hunks)
  • airbyte/sources/base.py (4 hunks)
  • airbyte/sources/declarative.py (4 hunks)
  • airbyte/sources/registry.py (1 hunks)
  • examples/run_faker.py (1 hunks)
Files skipped from review due to trivial changes (3)
  • airbyte/_future_cdk/state_providers.py
  • airbyte/sources/registry.py
  • examples/run_faker.py
Additional comments not posted (10)
airbyte/_future_cdk/state_writers.py (1)

39-39: LGTM!

The change to use model_dump_json instead of json() is appropriate for Pydantic 2.0.

airbyte/sources/declarative.py (2)

25-34: LGTM!

The function _suppress_cdk_pydantic_deprecation_warnings correctly suppresses the Pydantic deprecation warnings.


50-50: LGTM!

The calls to _suppress_cdk_pydantic_deprecation_warnings in the constructors of DeclarativeExecutor and DeclarativeSource are correctly placed.

Also applies to: 110-110

airbyte/caches/_state_backend.py (2)

107-107: LGTM!

The change to use model_dump_json instead of json() is appropriate for Pydantic 2.0.


173-173: LGTM!

The change to use model_validate_json instead of parse_raw is appropriate for Pydantic 2.0.

airbyte/_future_cdk/record_processor.py (1)

136-136: LGTM!

The change to use model_validate_json instead of parse_raw is appropriate for Pydantic 2.0.

airbyte/sources/base.py (4)

301-301: LGTM!

The use of model_dump aligns with Pydantic 2.0 standards.


540-540: LGTM!

The use of model_dump_json aligns with Pydantic 2.0 standards.


582-582: LGTM!

The use of model_validate_json aligns with Pydantic 2.0 standards.


301-301: LGTM!

The use of model_dump aligns with Pydantic 2.0 standards.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Actionable comments posted: 0

Review details

Configuration used: CodeRabbit UI
Review profile: CHILL

Commits

Files that changed from the base of the PR and between 317dec0 and dc37c6d.

Files selected for processing (1)
  • airbyte/_executor.py (1 hunks)
Files skipped from review due to trivial changes (1)
  • airbyte/_executor.py

@aaronsteers

Copy link
Copy Markdown
Member Author

Harjot Gill (@harjotgill) re:

CodeRabbit team member here - it looks like the formatting broke. :)

I saw that too! Good catch! Not a big problem, but I appreciate you are looking into it! 🙏

BTW, I'm learning to love CodeRabbit for our open source project, especially for PRs we review/approve ourselves (self-review) and for contributions from community members when I'm not deeply knowledgeable and/or when I just would appreciate another pair of eyes. Thanks for the great work! 🎉

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Actionable comments posted: 0

Review details

Configuration used: CodeRabbit UI
Review profile: CHILL

Commits

Files that changed from the base of the PR and between dc37c6d and a93f135.

Files selected for processing (1)
  • .github/workflows/python_pytest.yml (1 hunks)
Files skipped from review due to trivial changes (1)
  • .github/workflows/python_pytest.yml

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Support of Pydantic v2

2 participants