Skip to content

Commit e8859b2

Browse files
authored
Exclude zookeeper dependencies (#37584)
1 parent c47142f commit e8859b2

File tree

6 files changed

+93
-55
lines changed

6 files changed

+93
-55
lines changed

airbyte-cdk/java/airbyte-cdk/README.md

+79-48
Original file line numberDiff line numberDiff line change
@@ -2,22 +2,22 @@
22

33
This page will walk through the process of developing with the Java CDK.
44

5-
* [Developing with the Java CDK](#developing-with-the-java-cdk)
6-
* [Intro to the Java CDK](#intro-to-the-java-cdk)
7-
* [What is included in the Java CDK?](#what-is-included-in-the-java-cdk)
8-
* [How is the CDK published?](#how-is-the-cdk-published)
9-
* [Using the Java CDK](#using-the-java-cdk)
10-
* [Building the CDK](#building-the-cdk)
11-
* [Bumping the CDK version](#bumping-the-cdk-version)
12-
* [Publishing the CDK](#publishing-the-cdk)
13-
* [Developing Connectors with the Java CDK](#developing-connectors-with-the-java-cdk)
14-
* [Referencing the CDK from Java connectors](#referencing-the-cdk-from-java-connectors)
15-
* [Developing a connector alongside the CDK](#developing-a-connector-alongside-the-cdk)
16-
* [Publishing the CDK and switching to a pinned CDK reference](#publishing-the-cdk-and-switching-to-a-pinned-cdk-reference)
17-
* [Troubleshooting CDK Dependency Caches](#troubleshooting-cdk-dependency-caches)
18-
* [Developing a connector against a pinned CDK version](#developing-a-connector-against-a-pinned-cdk-version)
19-
* [Changelog](#changelog)
20-
* [Java CDK](#java-cdk)
5+
- [Developing with the Java CDK](#developing-with-the-java-cdk)
6+
- [Intro to the Java CDK](#intro-to-the-java-cdk)
7+
- [What is included in the Java CDK?](#what-is-included-in-the-java-cdk)
8+
- [How is the CDK published?](#how-is-the-cdk-published)
9+
- [Using the Java CDK](#using-the-java-cdk)
10+
- [Building the CDK](#building-the-cdk)
11+
- [Bumping the CDK version](#bumping-the-cdk-version)
12+
- [Publishing the CDK](#publishing-the-cdk)
13+
- [Developing Connectors with the Java CDK](#developing-connectors-with-the-java-cdk)
14+
- [Referencing the CDK from Java connectors](#referencing-the-cdk-from-java-connectors)
15+
- [Developing a connector alongside the CDK](#developing-a-connector-alongside-the-cdk)
16+
- [Publishing the CDK and switching to a pinned CDK reference](#publishing-the-cdk-and-switching-to-a-pinned-cdk-reference)
17+
- [Troubleshooting CDK Dependency Caches](#troubleshooting-cdk-dependency-caches)
18+
- [Developing a connector against a pinned CDK version](#developing-a-connector-against-a-pinned-cdk-version)
19+
- [Changelog](#changelog)
20+
- [Java CDK](#java-cdk)
2121

2222
## Intro to the Java CDK
2323

@@ -31,15 +31,23 @@ The java CDK is comprised of separate modules, among which:
3131

3232
Each CDK submodule may contain these elements:
3333

34-
- `src/main` - (Required.) The classes that will ship with the connector, providing capabilities to the connectors.
35-
- `src/test` - (Required.) These are unit tests that run as part of every build of the CDK. They help ensure that CDK `main` code is in a healthy state.
36-
- `src/testFixtures` - (Optional.) These shared classes are exported for connectors for use in the connectors' own test implementations. Connectors will have access to these classes within their unit and integration tests, but the classes will not be shipped with connectors when they are published.
34+
- `src/main` - (Required.) The classes that will ship with the connector, providing capabilities to
35+
the connectors.
36+
- `src/test` - (Required.) These are unit tests that run as part of every build of the CDK. They
37+
help ensure that CDK `main` code is in a healthy state.
38+
- `src/testFixtures` - (Optional.) These shared classes are exported for connectors for use in the
39+
connectors' own test implementations. Connectors will have access to these classes within their
40+
unit and integration tests, but the classes will not be shipped with connectors when they are
41+
published.
3742

3843
### How is the CDK published?
3944

40-
The CDK is published as a set of jar files sharing a version number. Every submodule generates one runtime jar for the main classes. If the submodule contains test fixtures, a second jar will be published with the test fixtures classes.
45+
The CDK is published as a set of jar files sharing a version number. Every submodule generates one
46+
runtime jar for the main classes. If the submodule contains test fixtures, a second jar will be
47+
published with the test fixtures classes.
4148

42-
Note: Connectors do not have to manage which jars they should depend on, as this is handled automatically by the `airbyte-java-connector` plugin. See example below.
49+
Note: Connectors do not have to manage which jars they should depend on, as this is handled
50+
automatically by the `airbyte-java-connector` plugin. See example below.
4351

4452
## Using the Java CDK
4553

@@ -55,17 +63,20 @@ To build and test the Java CDK, execute the following:
5563

5664
You will need to bump this version manually whenever you are making changes to code inside the CDK.
5765

58-
While under development, the next version number for the CDK is tracked in the file: `airbyte-cdk/java/airbyte-cdk/core/src/main/resources/version.properties`.
66+
While under development, the next version number for the CDK is tracked in the file:
67+
`airbyte-cdk/java/airbyte-cdk/core/src/main/resources/version.properties`.
5968

6069
If the CDK is not being modified, this file will contain the most recently published version number.
6170

6271
### Publishing the CDK
6372

6473
_⚠️ These steps should only be performed after all testing and approvals are in place on the PR. ⚠️_
6574

66-
The CDK can be published with a GitHub Workflow and a slash command which can be run by Airbyte personnel.
75+
The CDK can be published with a GitHub Workflow and a slash command which can be run by Airbyte
76+
personnel.
6777

68-
To invoke via slash command (recommended), use the following syntax in a comment on the PR that contains your changes:
78+
To invoke via slash command (recommended), use the following syntax in a comment on the PR that
79+
contains your changes:
6980

7081
```bash
7182
/publish-java-cdk # Run with the defaults (dry-run=false, force=false)
@@ -77,12 +88,18 @@ Note:
7788

7889
- Remember to **document your changes** in the Changelog section below.
7990
- After you publish the CDK, remember to toggle `useLocalCdk` back to `false` in all connectors.
80-
- Unless you specify `force=true`, the pipeline should fail if the version you are trying to publish already exists.
81-
- By running the publish with `dry-run=true`, you can confirm the process is working as expected, without actually publishing the changes.
82-
- In dry-run mode, you can also view and download the jars that are generated. To do so, navigate to the job status in GitHub Actions and navigate to the 'artifacts' section.
83-
- You can also invoke manually in the GitHub Web UI. To do so: go to `Actions` tab, select the `Publish Java CDK` workflow, and click `Run workflow`.
84-
- You can view and administer published CDK versions here: https://admin.cloudrepo.io/repository/airbyte-public-jars/io/airbyte/cdk
85-
- The public endpoint for published CDK versions is here: https://airbyte.mycloudrepo.io/public/repositories/airbyte-public-jars/io/airbyte/cdk/
91+
- Unless you specify `force=true`, the pipeline should fail if the version you are trying to publish
92+
already exists.
93+
- By running the publish with `dry-run=true`, you can confirm the process is working as expected,
94+
without actually publishing the changes.
95+
- In dry-run mode, you can also view and download the jars that are generated. To do so, navigate to
96+
the job status in GitHub Actions and navigate to the 'artifacts' section.
97+
- You can also invoke manually in the GitHub Web UI. To do so: go to `Actions` tab, select the
98+
`Publish Java CDK` workflow, and click `Run workflow`.
99+
- You can view and administer published CDK versions here:
100+
https://admin.cloudrepo.io/repository/airbyte-public-jars/io/airbyte/cdk
101+
- The public endpoint for published CDK versions is here:
102+
https://airbyte.mycloudrepo.io/public/repositories/airbyte-public-jars/io/airbyte/cdk/
86103

87104
## Developing Connectors with the Java CDK
88105

@@ -104,20 +121,26 @@ airbyteJavaConnector {
104121
105122
```
106123

107-
Replace `0.1.0` with the CDK version you are working with. If you're actively developing the CDK and want to use the latest version locally, use the `useLocalCdk` flag to use the live CDK code during builds and tests.
124+
Replace `0.1.0` with the CDK version you are working with. If you're actively developing the CDK and
125+
want to use the latest version locally, use the `useLocalCdk` flag to use the live CDK code during
126+
builds and tests.
108127

109128
### Developing a connector alongside the CDK
110129

111-
You can iterate on changes in the CDK local and test them in the connector without needing to publish the CDK changes publicly.
130+
You can iterate on changes in the CDK local and test them in the connector without needing to
131+
publish the CDK changes publicly.
112132

113133
When modifying the CDK and a connector in the same PR or branch, please use the following steps:
114134

115-
1. Set the version of the CDK in `version.properties` to the next appropriate version number and add a description in the `Changelog` at the bottom of this readme file.
135+
1. Set the version of the CDK in `version.properties` to the next appropriate version number and add
136+
a description in the `Changelog` at the bottom of this readme file.
116137
2. Modify your connector's build.gradle file as follows:
117-
1. Set `useLocalCdk` to `true` in the connector you are working on. This will ensure the connector always uses the local CDK definitions instead of the published version.
138+
1. Set `useLocalCdk` to `true` in the connector you are working on. This will ensure the
139+
connector always uses the local CDK definitions instead of the published version.
118140
2. Set `cdkVersionRequired` to use the new _to-be-published_ CDK version.
119141

120-
After the above, you can build and test your connector as usual. Gradle will automatically use the local CDK code files while you are working on the connector.
142+
After the above, you can build and test your connector as usual. Gradle will automatically use the
143+
local CDK code files while you are working on the connector.
121144

122145
### Publishing the CDK and switching to a pinned CDK reference
123146

@@ -128,30 +151,38 @@ Once you are done developing and testing your CDK changes:
128151

129152
### Troubleshooting CDK Dependency Caches
130153

131-
Note: after switching between a local and a pinned CDK reference, you may need to refresh dependency caches in Gradle and/or your IDE.
154+
Note: after switching between a local and a pinned CDK reference, you may need to refresh dependency
155+
caches in Gradle and/or your IDE.
132156

133-
In Gradle, you can use the CLI arg `--refresh-dependencies` the next time you build or test your connector, which will ensure that the correct version of the CDK is used after toggling the `useLocalCdk` value.
157+
In Gradle, you can use the CLI arg `--refresh-dependencies` the next time you build or test your
158+
connector, which will ensure that the correct version of the CDK is used after toggling the
159+
`useLocalCdk` value.
134160

135161
### Developing a connector against a pinned CDK version
136162

137-
You can always pin your connector to a prior stable version of the CDK, which may not match what is the latest version in the `airbyte` repo. For instance, your connector can be pinned to `0.1.1` while the latest version may be `0.2.0`.
163+
You can always pin your connector to a prior stable version of the CDK, which may not match what is
164+
the latest version in the `airbyte` repo. For instance, your connector can be pinned to `0.1.1`
165+
while the latest version may be `0.2.0`.
138166

139-
Maven and Gradle will automatically reference the correct (pinned) version of the CDK for your connector, and you can use your local IDE to browse the prior version of the codebase that corresponds to that version.
167+
Maven and Gradle will automatically reference the correct (pinned) version of the CDK for your
168+
connector, and you can use your local IDE to browse the prior version of the codebase that
169+
corresponds to that version.
140170

141171
## Changelog
142172

143173
### Java CDK
144174

145175
| Version | Date | Pull Request | Subject |
146-
|:--------|:-----------|:-----------------------------------------------------------|:---------------------------------------------------------------------------------------------------------------------------------------------------------------|
147-
| 0.30.11 | 2024-04-25 | [\#36899](https://github.com/airbytehq/airbyte/pull/36899) | changes for bigQuery destination. |
148-
| 0.30.10 | 2024-04-24 | [\#37541](https://github.com/airbytehq/airbyte/pull/37541) | remove excessive logging |
149-
| 0.30.9 | 2024-04-24 | [\#37477](https://github.com/airbytehq/airbyte/pull/37477) | remove unnecessary logs
150-
| 0.30.7 | 2024-04-23 | [\#37477](https://github.com/airbytehq/airbyte/pull/37477) | fix kotlin warnings in core CDK submodule
151-
| 0.30.7 | 2024-04-23 | [\#37484](https://github.com/airbytehq/airbyte/pull/37484) | fix kotlin warnings in dependencies CDK submodule |
152-
| 0.30.7 | 2024-04-23 | [\#37479](https://github.com/airbytehq/airbyte/pull/37479) | fix kotlin warnings in azure-destination, datastore-{bigquery,mongo,postgres} CDK submodules |
153-
| 0.30.7 | 2024-04-23 | [\#37481](https://github.com/airbytehq/airbyte/pull/37481) | fix kotlin warnings in destination CDK submodules |
154-
| 0.30.7 | 2024-04-23 | [\#37482](https://github.com/airbytehq/airbyte/pull/37482) | fix kotlin warnings in db-sources CDK submodule |
176+
| :------ | :--------- | :--------------------------------------------------------- | :------------------------------------------------------------------------------------------------------------------------------------------------------------- |
177+
| 0.31.0 | 2024-04-26 | [\#37584](https://github.com/airbytehq/airbyte/pull/37584) | Update S3 destination deps to exclude zookeeper and hadoop-yarn-common |
178+
| 0.30.11 | 2024-04-25 | [\#36899](https://github.com/airbytehq/airbyte/pull/36899) | changes for bigQuery destination. |
179+
| 0.30.10 | 2024-04-24 | [\#37541](https://github.com/airbytehq/airbyte/pull/37541) | remove excessive logging |
180+
| 0.30.9 | 2024-04-24 | [\#37477](https://github.com/airbytehq/airbyte/pull/37477) | remove unnecessary logs |
181+
| 0.30.7 | 2024-04-23 | [\#37477](https://github.com/airbytehq/airbyte/pull/37477) | fix kotlin warnings in core CDK submodule |
182+
| 0.30.7 | 2024-04-23 | [\#37484](https://github.com/airbytehq/airbyte/pull/37484) | fix kotlin warnings in dependencies CDK submodule |
183+
| 0.30.7 | 2024-04-23 | [\#37479](https://github.com/airbytehq/airbyte/pull/37479) | fix kotlin warnings in azure-destination, datastore-{bigquery,mongo,postgres} CDK submodules |
184+
| 0.30.7 | 2024-04-23 | [\#37481](https://github.com/airbytehq/airbyte/pull/37481) | fix kotlin warnings in destination CDK submodules |
185+
| 0.30.7 | 2024-04-23 | [\#37482](https://github.com/airbytehq/airbyte/pull/37482) | fix kotlin warnings in db-sources CDK submodule |
155186
| 0.30.6 | 2024-04-19 | [\#37442](https://github.com/airbytehq/airbyte/pull/37442) | Destinations: Rename File format related classes to be agnostic of S3 |
156187
| 0.30.3 | 2024-04-12 | [\#37106](https://github.com/airbytehq/airbyte/pull/37106) | Destinations: Simplify constructors in `AsyncStreamConsumer` |
157188
| 0.30.2 | 2024-04-12 | [\#36926](https://github.com/airbytehq/airbyte/pull/36926) | Destinations: Remove `JdbcSqlOperations#formatData`; misc changes for java interop |
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
version=0.30.11
1+
version=0.31.0

airbyte-cdk/java/airbyte-cdk/s3-destinations/build.gradle

+8-2
Original file line numberDiff line numberDiff line change
@@ -27,8 +27,14 @@ dependencies {
2727
api 'org.apache.commons:commons-csv:1.10.0'
2828
api 'org.apache.commons:commons-text:1.11.0'
2929
api ('org.apache.hadoop:hadoop-aws:3.3.6') { exclude group: 'com.amazonaws', module: 'aws-java-sdk-bundle' }
30-
api 'org.apache.hadoop:hadoop-common:3.3.6'
31-
api 'org.apache.hadoop:hadoop-mapreduce-client-core:3.3.6'
30+
api ('org.apache.hadoop:hadoop-common:3.3.6') {
31+
exclude group: 'org.apache.zookeeper'
32+
exclude group: 'org.apache.hadoop', module: 'hadoop-yarn-common'
33+
}
34+
api ('org.apache.hadoop:hadoop-mapreduce-client-core:3.3.6') {
35+
exclude group: 'org.apache.zookeeper'
36+
exclude group: 'org.apache.hadoop', module: 'hadoop-yarn-common'
37+
}
3238
api 'org.apache.parquet:parquet-avro:1.13.1'
3339
runtimeOnly 'com.hadoop.gplcompression:hadoop-lzo:0.4.20'
3440

airbyte-integrations/connectors/destination-bigquery/build.gradle

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ plugins {
33
}
44

55
airbyteJavaConnector {
6-
cdkVersionRequired = '0.30.11'
6+
cdkVersionRequired = '0.31.0'
77
features = [
88
'db-destinations',
99
'datastore-bigquery',

airbyte-integrations/connectors/destination-bigquery/metadata.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ data:
55
connectorSubtype: database
66
connectorType: destination
77
definitionId: 22f6c74f-5699-40ff-833c-4a879ea40133
8-
dockerImageTag: 2.4.13
8+
dockerImageTag: 2.4.14
99
dockerRepository: airbyte/destination-bigquery
1010
documentationUrl: https://docs.airbyte.com/integrations/destinations/bigquery
1111
githubIssueLabel: destination-bigquery

0 commit comments

Comments
 (0)