-
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
Add CAT scenario that validates a connector's check
method runs within a reasonable amount of time
#33568
Comments
Grooming notes:
|
I've checked telemetry metrics here, and can conclude that this tests will not be helpful and can lead to False-positive results. No doubts, that we can easily find some connectors with “long” check duration, e.g. TYDO’s shopify or FB marketing, but it might be a legitimate behaviour as of now. For example, during the check for FB Marketing connector does:
I think we should not only care about the absolute time duration during the check but also to define more precisely what should happen in this case. From our docs: Note
My suggestion is as follows:
P.S. In my perspective, considering the transition to stream-safe reading in CDK (where an exception in one stream won't lead to the failure of the entire sync), and adhering to the principle of supplying "minimum available" data, it seems feasible to relocate a significant portion of the validation logic—particularly that which necessitates a request to the provider—to the read method. |
@artem1205 I think that is fair assessment and thanks for the detailed investigation. A flaky test that obfuscates real problems is worse than no test so I think closing this as something we won't address is okay by me. It does make me question the criteria itself because if we've been capable of getting a lot of false positives, that indicates we were probably not adhering to this criteria that strongly in our past certifications.
I am not sure I would quite agree with this because one of the problems with moving more validations to the |
Agreed, in that case we can remove this point from our checklist, wdyt? |
Description
One of our certification criteria is that the connector's check method runs in 7 seconds or less. We can automate this.
Implementation Details
We can verify this by simply running the check and measuring the time. However, a good point has been brought up that this could be flaky as we have some connectors that take a long time because they might actually be making API calls or more complex logic in the validation.
There are two discussion points for grooming:
One way we could try to reduce the variance or flakiness is to in parallel run the check multiple times and take the average. Just a thought
How to test this to verify long running checks fail:
:dev
connector usingpoetry run pytest -p connector_acceptance_test.plugin --acceptance-test-config=../../connectors/source-<name>
Acceptance Criteria
The text was updated successfully, but these errors were encountered: