-
Notifications
You must be signed in to change notification settings - Fork 547
feat: Implement support for Incremental Table on Typeform's FormResponses table #18492
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
Conversation
| @property | ||
| def resolver(self): | ||
| return FormResponsesResolver(table=self) | ||
| return self._resolver |
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 is a dangerous anti-pattern we should be aware of. It was creating a brand new resolver every time the property was being referenced (note that by adding @property, you don't call resolver(), but just resolver).
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.
@marianogappa What's the risk of this usage, out of curiosity? Is there a performance hit?
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.
@dkeyer-twilio oh sorry, I should have been more clear. There's no performance issue.
resolverhere is acting as agetter, and one doesn't expect a getter to create a brand new object.- Objects are stateful. One wouldn't normally expect to set some state on an object and then not have it later.
- In this case, the
.sync()method callsresolver.set_state_client(...), and this method would erase that state.
I think this pattern causes very unintuitive behaviour. I certainly lost an hour on it.
|
Approved, but some tests are failing (seems to be due to the introduction of forced keyword arguments) |
🤖 I have created a release *beep* *boop* --- ## [1.5.0](plugins-source-typeform-v1.4.3...plugins-source-typeform-v1.5.0) (2024-07-09) ### Features * Implement support for Incremental Table on Typeform's FormResponses table ([#18492](#18492)) ([5127370](5127370)) ### Bug Fixes * **deps:** Update dependency cloudquery-plugin-sdk to v0.1.28 ([#18509](#18509)) ([e1cf3ad](e1cf3ad)) * **deps:** Update module github.com/cloudquery/cloudquery-api-go to v1.12.0 ([#18448](#18448)) ([a5850e1](a5850e1)) * Fix pagination logic for responses on Typeform plugin. ([#18479](#18479)) ([d0923b0](d0923b0)) --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please).
fixes #18490
Implements support for Incremental Table on Typeform's FormResponses table.
Bumps plugin-sdk-python, which enables Python clients to use a StateClient.
Before:
✓ Code/test-typeform-postgres-sync $ cli sync cloudquery-config ⏱ 10:35:07 Loading spec(s) from cloudquery-config Starting sync for: typeform (grpc@localhost:7777) -> [postgresql (cloudquery/postgresql@v8.0.7)] Sync completed successfully. Resources: 457, Errors: 0, Warnings: 0, Time: 2Enable PR
After:
✓ Code/test-typeform-postgres-sync $ cli sync cloudquery-config ⏱ 10:35:19 Loading spec(s) from cloudquery-config Starting sync for: typeform (grpc@localhost:7777) -> [postgresql (cloudquery/postgresql@v8.0.7)] Sync completed successfully. Resources: 20, Errors: 0, Warnings: 0, Time: 1s