-
Notifications
You must be signed in to change notification settings - Fork 4.6k
Code cleanup in abstract classes #18811
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
Increasing readability: - Performed audit of methods that are marked as public/protected but should be private - Performed audit of methods that are marked as public but should be protected - Removing @OverRide from methods that don't need them (are the very first)
- Removing AbstractRelationalDbSource abstract class and moving contents of it to a Util class
/test connector=connectors/source-postgres
Build PassedTest summary info:
|
Affected Connector ReportNOTE
|
Connector | Version | Changelog | Publish |
---|---|---|---|
source-alloydb |
1.0.17 |
✅ | ✅ |
source-alloydb-strict-encrypt |
1.0.17 |
✅ | ⚠ (not in seed) |
source-bigquery |
0.2.2 |
✅ | ✅ |
source-clickhouse |
0.1.14 |
✅ | ✅ |
source-clickhouse-strict-encrypt |
0.1.14 |
✅ | ⚠ (not in seed) |
source-cockroachdb |
0.1.18 |
✅ | ✅ |
source-cockroachdb-strict-encrypt |
0.1.18 |
✅ | ⚠ (not in seed) |
source-db2 |
0.1.16 |
✅ | ✅ |
source-db2-strict-encrypt |
0.1.16 |
✅ | ⚠ (not in seed) |
source-jdbc |
0.3.5 |
⚠ (doc not found) |
⚠ (not in seed) |
source-mongodb-strict-encrypt |
0.1.19 |
⚠ (doc not found) |
⚠ (not in seed) |
source-mongodb-v2 |
0.1.19 |
✅ | ✅ |
source-mssql |
0.4.24 |
✅ | ✅ |
source-mssql-strict-encrypt |
0.4.24 |
✅ | ⚠ (not in seed) |
source-mysql |
1.0.11 |
✅ | ✅ |
source-mysql-strict-encrypt |
1.0.11 |
✅ | ⚠ (not in seed) |
source-oracle |
0.3.21 |
✅ | ✅ |
source-oracle-strict-encrypt |
0.3.21 |
✅ | ⚠ (not in seed) |
source-postgres |
1.0.22 |
✅ | ✅ |
source-postgres-strict-encrypt |
1.0.22 |
✅ | ⚠ (not in seed) |
source-redshift |
0.3.14 |
✅ | ✅ |
source-scaffold-java-jdbc |
0.1.0 |
⚠ (doc not found) |
⚠ (not in seed) |
source-snowflake |
0.1.24 |
✅ | ✅ |
source-tidb |
0.2.1 |
✅ | ✅ |
- See "Actionable Items" below for how to resolve warnings and errors.
✅ Destinations (0)
Connector | Version | Changelog | Publish |
---|
- See "Actionable Items" below for how to resolve warnings and errors.
Actionable Items
(click to expand)
Category | Status | Actionable Item |
---|---|---|
Version | ❌ mismatch |
The version of the connector is different from its normal variant. Please bump the version of the connector. |
⚠ doc not found |
The connector does not seem to have a documentation file. This can be normal (e.g. basic connector like source-jdbc is not published or documented). Please double-check to make sure that it is not a bug. |
|
Changelog | ⚠ doc not found |
The connector does not seem to have a documentation file. This can be normal (e.g. basic connector like source-jdbc is not published or documented). Please double-check to make sure that it is not a bug. |
❌ changelog missing |
There is no chnagelog for the current version of the connector. If you are the author of the current version, please add a changelog. | |
Publish | ⚠ not in seed |
The connector is not in the seed file (e.g. source_definitions.yaml ), so its publication status cannot be checked. This can be normal (e.g. some connectors are cloud-specific, and only listed in the cloud seed file). Please double-check to make sure that it is not a bug. |
❌ diff seed version |
The connector exists in the seed file, but the latest version is not listed there. This usually means that the latest version is not published. Please use the /publish command to publish the latest version. |
/test connector=connectors/source-postgres-strict-encrypt
Build PassedTest summary info:
|
/test connector=connectors/source-mysql
Build PassedTest summary info:
|
/test connector=connectors/source-mysql-strict-encrypt
Build PassedTest summary info:
|
/test connector=connectors/source-mssql-strict-encrypt
Build PassedTest summary info:
|
/test connector=connectors/source-mssql
Build PassedTest summary info:
|
@@ -77,7 +78,6 @@ | |||
// TODO: Remove when the flag is not use anymore | |||
private final FeatureFlags featureFlags = new EnvVariableFeatureFlags(); | |||
|
|||
@Override |
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.
Why are we removing this Override?
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.
Mainly a stylistic concern.
For here and below, the superclass (BaseConnector) doesn't actually implement check/read/discover. It only implements spec, so there isn't anything to "override". I suppose in the case that these methods are added to the BaseConnector (seems unlikely) that we'd be protected.
I don't feel that strongly on this either way - let me know what you think
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.
I prefer to have the Override keyword! Lets keep these Override keywords cause they help avoid issues by throwing compilation error in case the super class behaviour changes.
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.
Added the override back
...elational-db/src/main/java/io/airbyte/integrations/source/relationaldb/AbstractDbSource.java
Outdated
Show resolved
Hide resolved
...elational-db/src/main/java/io/airbyte/integrations/source/relationaldb/AbstractDbSource.java
Outdated
Show resolved
Hide resolved
airbyte-integrations/bases/base-java/src/main/java/io/airbyte/integrations/BaseConnector.java
Outdated
Show resolved
Hide resolved
/test connector=connectors/source-postgres
Build PassedTest summary info:
|
/test connector=connectors/source-mysql
Build PassedTest summary info:
|
/test connector=connectors/source-postgres-strict-encrypt
Build PassedTest summary info:
|
/test connector=connectors/source-bigquery
Build PassedTest summary info:
|
/test connector=connectors/source-postgres-strict-encrypt
Build PassedTest summary info:
|
/test connector=connectors/source-mongodb-v2
Build PassedTest summary info:
|
Increasing readability by
Should mainly just make navigating through code in IntelliJ easier, reasoning about which methods can/are actually overriden in subclasses
In addition: