Skip to content
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

java CDK: clean up dependencies, refactor modules #34745

Merged
merged 35 commits into from Feb 9, 2024

Conversation

postamar
Copy link
Contributor

@postamar postamar commented Feb 1, 2024

This PR aims to change very little in terms of functionality and just moves stuff around for the most part. The CDK will be adopted (and thereby validated) in other PRs based on this one.

Copy link

vercel bot commented Feb 1, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

1 Ignored Deployment
Name Status Preview Comments Updated (UTC)
airbyte-docs ⬜️ Ignored (Inspect) Visit Preview Feb 9, 2024 0:41am

@@ -180,6 +180,7 @@ subprojects { subproj ->
}

apply plugin: 'java'
apply plugin: 'java-test-fixtures'
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This costs nothing and allows us to blanket-add lombok, junit, etc. dependencies to the fixtures sources.

@@ -319,45 +324,27 @@ subprojects { subproj ->
finalizedBy jacocoTestReportTask
}

// TODO: These should be added to the CDK or to the individual projects that need them:
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done. The dependencies have been hardcoded in the CDK, which no longer relies on deps.toml. We want to avoid significant version changes sneaking into the CDK.

testFixturesImplementation jarName(it)
}
PRE_V017_TEST_IMPLEMENTATION.each {testImplementation jarName(it) }
PRE_V017_INTEGRATION_TEST_IMPLEMENTATION.each {integrationTestJavaImplementation jarName(it) }
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is required to maintain backward-compatibility with old CDK versions. We can remove these once we update all connectors to recent CDK versions.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

which is already happening for java sources : #34453

useLocalCdk = false
cdkVersionRequired = '0.17.0'
features = ['db-destinations', 's3-destinations', 'typing-deduping', 'datastore-bigquery']
useLocalCdk = true
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

destination-bigquery needs to be in this PR because it used to depend on destination-gcs, but no longer does.

implementation ('com.github.airbytehq:json-avro-converter:1.1.0') { exclude group: 'ch.qos.logback', module: 'logback-classic'}

testImplementation 'org.apache.commons:commons-lang3:3.11'
testImplementation 'org.xerial.snappy:snappy-java:1.1.8.4'
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Most of the code in destination-gcs has been hoisted into the CDK's s3-destinations module, which is a much better home for it because the deps are the same.



implementation 'org.mongodb:mongodb-driver-sync:4.3.0'
}
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This connector lacks a metadata.yaml file and is therefore dead. Removing.

@@ -1,13 +1,22 @@
import org.openapitools.generator.gradle.plugin.tasks.GenerateTask
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This dependencies module was built from all the airbyte-* and *-oss modules, which are left-overs from the times of the monorepo. I ruled out importing things like airbyte-commons from the platform because of the considerable amount of dependencies they pull there. To be fair, dependencies are a lot less of a concern in that repo than they are here. Still, this code changes little enough that IMO it's safe to maintain two distinct copies of it.

@postamar postamar marked this pull request as ready for review February 1, 2024 17:29
@postamar postamar requested review from a team as code owners February 1, 2024 17:29
@postamar postamar changed the base branch from master to postamar/enable-connector-tests-for-draft-prs February 1, 2024 20:42
@postamar postamar marked this pull request as draft February 1, 2024 20:43
@postamar
Copy link
Contributor Author

postamar commented Feb 9, 2024

/publish-java-cdk

🕑 https://github.com/airbytehq/airbyte/actions/runs/7838416178
✅ Successfully published Java CDK version=0.19.0!

@postamar
Copy link
Contributor Author

postamar commented Feb 9, 2024

/approve-and-merge reason="CI all green except for destination-mongodb"

@octavia-approvington
Copy link
Contributor

Check that box
TODO complete

@octavia-approvington octavia-approvington merged commit 796b2e8 into master Feb 9, 2024
22 of 25 checks passed
@octavia-approvington octavia-approvington deleted the postamar/cdk-cleanup-base-pr branch February 9, 2024 01:46
postamar added a commit that referenced this pull request Feb 9, 2024
xiaohansong pushed a commit that referenced this pull request Feb 13, 2024
jatinyadav-cc pushed a commit to ollionorg/datapipes-airbyte that referenced this pull request Feb 21, 2024
jatinyadav-cc pushed a commit to ollionorg/datapipes-airbyte that referenced this pull request Feb 21, 2024
jatinyadav-cc pushed a commit to ollionorg/datapipes-airbyte that referenced this pull request Feb 26, 2024
jatinyadav-cc pushed a commit to ollionorg/datapipes-airbyte that referenced this pull request Feb 26, 2024
jatinyadav-cc pushed a commit to ollionorg/datapipes-airbyte that referenced this pull request Feb 26, 2024
jatinyadav-cc pushed a commit to ollionorg/datapipes-airbyte that referenced this pull request Feb 26, 2024
jatinyadav-cc pushed a commit to ollionorg/datapipes-airbyte that referenced this pull request Feb 26, 2024
jatinyadav-cc pushed a commit to ollionorg/datapipes-airbyte that referenced this pull request Feb 26, 2024
xiaohansong pushed a commit that referenced this pull request Feb 27, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants