-
Notifications
You must be signed in to change notification settings - Fork 63
[improvement] add test template to verify assessment flag usage #804
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
base: main
Are you sure you want to change the base?
Conversation
| ImmutableCollection<Connector> connectors = ConnectorRepository.getInstance().getAllConnectors(); | ||
| for (Connector connector : connectors) { | ||
| RespectsArgumentAssessment assessment = AnnotationUtils.findAnnotation(connector.getClass(), | ||
| RespectsArgumentAssessment.class); |
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.
Many connectors don't have this annotation, despite using the --assessment flag and they will not be found by this test.
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.
It's true. We need an additional test to verify that developer explicitly chased to use or do not use the annotation.
4d69e1e to
063b663
Compare
|
What about the connectors that are shared by assessment and translation? Depending on the use case they will need |
In this case such connectors should be able accept and process the flag. But I think we can go case by case. @shevek-google what do you think? |
|
Alternative solution:
This has a few benefits:
|
|
This PR is stale because it has been open 35 days with no activity. Remove "stale" label or comment or this will be closed in 14 days. |
It's very simple forget to add '--assessment' flag to connector. The problem is that the mistake will be find only during uploading zip to server.
So, the idea is to explicitly mark each connector if
assessmentflag is required or not for the connector. In addition to that the test will verify that connectors are aligned with the annotations.Please help to double check if the connectors marked properly by
RespectsArgumentAssessmentorAvoidArgumentAssessment.It should be at least align with our public doc: https://cloud.google.com/bigquery/docs/migration-assessment#teradata_1
Note: the test is failed because the validation logic doesn't exist for all the connector. I would prefer first define the list of connectors and add the validation logic later.