-
Notifications
You must be signed in to change notification settings - Fork 4.2k
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
CDK: make TypeTransformer more robust to incorrect incoming records #16544
Conversation
Signed-off-by: Sergey Chvalyuk <grubberr@gmail.com>
Changes seem pretty straightforward, but can you add some additional context to the PR description as to which connector you were upgrading and what exactly triggered the need for this change to the CDK? |
Signed-off-by: Sergey Chvalyuk <grubberr@gmail.com>
Signed-off-by: Sergey Chvalyuk <grubberr@gmail.com>
Signed-off-by: Sergey Chvalyuk <grubberr@gmail.com>
Signed-off-by: Sergey Chvalyuk <grubberr@gmail.com>
@@ -145,14 +145,14 @@ def resolve(subschema): | |||
return subschema | |||
|
|||
# Transform object and array values before running json schema type checking for each element. | |||
if schema_key == "properties": | |||
if schema_key == "properties" and isinstance(instance, dict): |
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.
Can you add the comment you added in the PR description as a source code comment to clarify for the next developer reading this why we verify the isinstance?
Signed-off-by: Sergey Chvalyuk <grubberr@gmail.com>
Signed-off-by: Sergey Chvalyuk <grubberr@gmail.com>
…irbytehq#16544) Signed-off-by: Sergey Chvalyuk <grubberr@gmail.com>
…irbytehq#16544) Signed-off-by: Sergey Chvalyuk <grubberr@gmail.com>
Signed-off-by: Sergey Chvalyuk grubberr@gmail.com
What
Try to fix
https://github.com/airbytehq/alpha-beta-issues/issues/222
#15405
There are cases which can kill transformer by exceptions, for example:
Schema assume that "value" has to be array of strings, but we get sub-object.
In such cases transformer has to generate warning message, leave record as is and not be killed.
How
When we process "array" just make sure that
instance
variable of typelist
if it's not
list
just skip it, we can do nothing in such cases.