-
Notifications
You must be signed in to change notification settings - Fork 4.3k
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
Issue 35112/relax cats when not primary key #35645
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎ 1 Ignored Deployment
|
…12/relax-cats-when-not-primary-key
@@ -132,11 +115,6 @@ class IgnoredFieldsConfiguration(BaseConfig): | |||
bypass_reason: Optional[str] = Field(default=None, description="Reason why this field is considered ignored.") | |||
|
|||
|
|||
ignored_fields: Optional[Mapping[str, List[IgnoredFieldsConfiguration]]] = Field( |
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.
As it is not shared anymore for basic_read, the definition has been moved to https://github.com/airbytehq/airbyte/pull/35645/files#diff-6d30b0c7923582524ce6f15dccff0e22689713a162893c6dcd268c6af46f2302R194
@@ -214,7 +191,9 @@ class FullRefreshConfig(BaseConfig): | |||
configured_catalog_path: Optional[str] = configured_catalog_path | |||
timeout_seconds: int = timeout_seconds | |||
deployment_mode: Optional[str] = deployment_mode | |||
ignored_fields: Optional[Mapping[str, List[IgnoredFieldsConfiguration]]] = ignored_fields | |||
ignored_fields: Optional[Mapping[str, List[IgnoredFieldsConfiguration]]] = Field( |
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.
The "compare records" between "actual" and "expected_records" and between "first read" and "second read" is different hence why we are keeping this. It is worth wondering if those should be aligned but for now, we will assume this is out of scope for this change
@@ -888,13 +887,13 @@ def _validate_records_structure(records: List[AirbyteRecordMessage], configured_ | |||
), f" Record {record} from {record.stream} stream with fields {record_fields} should have some fields mentioned by json schema: {schema_pathes}" | |||
|
|||
@staticmethod | |||
def _validate_schema(records: List[AirbyteRecordMessage], configured_catalog: ConfiguredAirbyteCatalog, fail_on_extra_columns: Boolean): |
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.
The new field was removed as part of #35556 but was not cleaned up properly
@@ -1130,30 +1124,12 @@ async def test_airbyte_trace_message_on_failure(self, connector_config, inputs: | |||
|
|||
assert len(error_trace_messages) >= 1, "Connector should emit at least one error trace message" | |||
|
|||
@staticmethod | |||
def remove_extra_fields(record: Any, spec: Any) -> Any: |
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.
This wasn't used but I don't know when the usage was removed
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.
lgtm, just small things and responses to your comments
What
Addresses https://github.com/airbytehq/airbyte-internal-issues/issues/6377
How
Ignored fields
Removing
ignored_fields
is a bit messy as there are mismatch withbasic_read
testsfull_refresh
which I can't explain. For now, I'll only remove thebasic_read.ignored_fields
but it seems like both should follow the same logicScript to detect mismatch (to run with cwd in
airbyte-integrations/connectors
):Output:
If we decide to align the comparison of records in
basic_read
andfull_refresh
or just remove it for full_refresh (see this Slack discussion), this would mean that:exclude_fields
frommake_hashable
delete_fields
🚨 User Impact 🚨
This means that parts of the
acceptance-test-config.yml
are now outdated. There will be a follow up PR to clean them but we want to still deliver value with this.Adding a lot of expected records for source-s3 (up to ID=20), we can generate this error: