[improvement] add test template to verify assessment flag usage#804
[improvement] add test template to verify assessment flag usage#804vladislav-sidorovich wants to merge 3 commits intomainfrom
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.
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.
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.