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

Added a ref Resolver #105

Merged
merged 3 commits into from
Mar 3, 2022
Merged

Added a ref Resolver #105

merged 3 commits into from
Mar 3, 2022

Conversation

visch
Copy link
Contributor

@visch visch commented Jan 8, 2022

Closes #104

…he old broken ref schemas, and added a tool for resolving the refs
@visch
Copy link
Contributor Author

visch commented Jan 8, 2022

Worried about potential json schema failures as we haven't been able to fully test this with Data in production setups (Tested with my test instance and one live instances data, but history shows that's not enough)

@visch
Copy link
Contributor Author

visch commented Jan 8, 2022

  • Check for any items in def's that don't' have a null option, add null as an option

Copy link
Contributor Author

@visch visch left a comment

Choose a reason for hiding this comment

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

Need to fix those issues

},
"color": {
"type": ["null", "string"]
},
"type": {
"type": ["null", "string"]
}
},
"feature": {
Copy link
Contributor Author

Choose a reason for hiding this comment

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

This doesn't look to be needed

tap_clickup/schemas/folder.json Show resolved Hide resolved
@@ -13,6 +13,7 @@ plugins:
- name: api_token
kind: password
select:
- '!shared_hierarchy.*'
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Not needed

tap_clickup/schemas/space.json Show resolved Hide resolved
"type": ["null", "string"]
}
"id": {
"type": "integer"
Copy link
Contributor Author

Choose a reason for hiding this comment

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

To be safe I think we should add null here, as these refs haven't been heavily tested by users.

"user": {
"$ref": "#/definitions/user"
"id": {
"type": "integer"
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Add nulls (similar to above comment)

"type": "object",
"properties": {
"id": {
"type": "integer"
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Add nulls (similar to above comment)

@saeedzareian
Copy link

saeedzareian commented Feb 18, 2022

Hi, thank you for the great work and support here.

I am using list (folder-list) and space heavily and this fix will help us a lot. Also, we found another issue that I will share shortly with you after verifying my solution. Could you please move forward with this pull request earlier?

@visch
Copy link
Contributor Author

visch commented Feb 18, 2022

Hi, thank you for the great work and support here.

I am using list (folder-list) and space heavily and this fix will help us a lot. Also, we found another issue that I will share shortly with you after verifying my solution. Could you please move forward with this pull request earlier?

Yeah I want to merge this, I just need to test that it works with target-postgres, and target-stitch. Issue is that I don't have functional testing setup to automate this for me (and I'd probably want to smoke test myself locally anyway)

Next steps are

  1. Verify data before and after this MR are the same in target-postgres (ie select * from old_tap_clickup except select * from new_tap_clickup and visaversa should return 0 records) , looks like CHECKSUM TABLE old_tap_clickup , new_tap_clickup ; would work too, if there are differences we should look at them and see if they make sense or not.
  2. Run tap-postgres target-stitch to be sure data gets through so I don't break anyone later
  3. Run tap-postgres target-jsonl to be sure schema checks pass

I won't have time to do this for a bit. I''ll try to, or if someone could do these tests for me or a portion of them it'd be mightly helpful!

},
"invited_by": {
"$ref": "#/definitions/user"
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Would be nice to keep this instead of duplicating what a user is

Copy link
Contributor Author

Choose a reason for hiding this comment

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

noted in above comment

"type": "array",
"items": [
{
"type": "object",
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Would be nice to keep this instead of duplicating what a user is

@visch
Copy link
Contributor Author

visch commented Feb 18, 2022

Hi, thank you for the great work and support here.

I am using list (folder-list) and space heavily and this fix will help us a lot. Also, we found another issue that I will share shortly with you after verifying my solution. Could you please move forward with this pull request earlier?

There's also some duplicate in the PR, I'd like to remove some of them and replace them with Refs, if someone could to that it would be very helpful as well (I hope it can work without changing the ref resolver we're using, if not we don't need to dive too hard we can just leave the duplication)

@saeedzareian
Copy link

I won't have time to do this for a bit. I''ll try to, or if someone could do these tests for me or a portion of them it'd be mightly helpful!

I will ask my friends if they have capacity to help, their sprint starts the next Monday (No tomorrow).

@visch
Copy link
Contributor Author

visch commented Mar 3, 2022

Data looks good from a run on my end

  • Check for any items in def's that don't' have a null option, add null as an option

After review there were only a handful of properties without nulls, this shouldn't' hold up the merge as this PR puts us in a better place.

@visch visch merged commit 6452c25 into main Mar 3, 2022
@visch
Copy link
Contributor Author

visch commented Mar 3, 2022

I won't have time to do this for a bit. I''ll try to, or if someone could do these tests for me or a portion of them it'd be mightly helpful!

I will ask my friends if they have capacity to help, their sprint starts the next Monday (No tomorrow).

We're all merged in, pull the latest from pypi and you should be good to go!

@visch visch deleted the snowflake-issues branch April 25, 2022 12:55
@visch visch restored the snowflake-issues branch April 25, 2022 12:55
@visch visch deleted the snowflake-issues branch April 25, 2022 12:56
@visch visch restored the snowflake-issues branch April 25, 2022 12:56
@visch visch deleted the snowflake-issues branch April 25, 2022 12:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Target-Snowflake PipelineWise Variant KeyError: 'type'
2 participants