Skip to content
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

✨CAT: add test_primary_keys_data_type #38755

Merged
merged 5 commits into from
Jun 11, 2024

Conversation

askarpets
Copy link
Contributor

@askarpets askarpets commented May 29, 2024

What

Resolves:

How

  • Added TestDiscovery.test_primary_keys_data_type, which validates that primary keys are not of type array or object
  • Added validate_primary_keys_data_type to TestBasicRead.test_read, which validates that primary keys are not of type array or object in records and ensures that at least one primary key is non-null when there is a composite primary key

Review guide

  1. tests/test_core.py
  2. unit_tests/test_core.py

User Impact

No user impact

Can this PR be safely reverted and rolled back?

  • YES 💚
  • NO ❌

@askarpets askarpets self-assigned this May 29, 2024
@askarpets askarpets requested review from lazebnyi, oustynova and a team as code owners May 29, 2024 12:54
Copy link

vercel bot commented May 29, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
airbyte-docs ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jun 10, 2024 11:56pm

Copy link
Contributor

@natikgadzhi natikgadzhi left a comment

Choose a reason for hiding this comment

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

Looks good to me! I wonder how many connectors would fail this 👀

Copy link
Contributor

@brianjlai brianjlai left a comment

Choose a reason for hiding this comment

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

small comment, but nothing blocking. looks good to me

@@ -83,6 +83,7 @@ class DiscoveryTestConfig(BaseConfig):
backward_compatibility_tests_config: BackwardCompatibilityTestsConfig = Field(
description="Configuration for the backward compatibility tests.", default=BackwardCompatibilityTestsConfig()
)
skip_primary_keys_data_type_validation: Optional[bool] = Field(False, description="Skip primary keys data type validation")
Copy link
Contributor

Choose a reason for hiding this comment

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

Is there a reason why we made this one skip...? To make things more consistent, could we instead make this validate_primary_key_data_type and default to True.

@lazebnyi lazebnyi merged commit 04e776f into master Jun 11, 2024
26 checks passed
@lazebnyi lazebnyi deleted the cat-test-primary-keys-data-type branch June 11, 2024 00:07
kabeer27 pushed a commit to kabeer27/airbyte that referenced this pull request Jun 12, 2024
Co-authored-by: Serhii Lazebnyi <serhii.lazebnyi@globallogic.com>
This pull request was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/documentation Improvements or additions to documentation
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants