Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
54 changes: 43 additions & 11 deletions .github/workflows/ci-integration.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,10 @@ jobs:
strategy:
fail-fast: false
matrix:
java:
- '11'
- '17'
- '21'
cassandra:
- cassandra_version: 3.0.27
ccm_version: 3.0.27
Expand All @@ -41,12 +45,13 @@ jobs:
- cassandra_version: dse-5.1
ccm_version: 5.1.31
is_dse: true
- cassandra_version: dse-6.0
ccm_version: 6.0.18
is_dse: true
- cassandra_version: dse-6.7
ccm_version: 6.7.17
is_dse: true
# DSE 6.0 and 6.7 are commented out because they are EOL and no longer supported by DataStax/IBM
#- cassandra_version: dse-6.0
# ccm_version: 6.0.18
# is_dse: true
#- cassandra_version: dse-6.7
# ccm_version: 6.7.17
# is_dse: true
- cassandra_version: dse-6.8
ccm_version: 6.8.24
is_dse: true
Expand All @@ -62,10 +67,10 @@ jobs:
run: |
export JDK8_PATH=$JAVA_HOME
echo "JDK8_PATH=$JDK8_PATH" >> $GITHUB_ENV
- name: Set up JDK 11
- name: Set up JDK ${{ matrix.java }}
uses: actions/setup-java@v2
with:
java-version: 11
java-version: ${{ matrix.java }}
distribution: 'temurin'
- name: Pre set up Python
run: |
Expand All @@ -84,15 +89,24 @@ jobs:
cache: 'pip'
allow-build: info
cache-build: true
- name: Generate installation token for CCM private
if: ${{ matrix.cassandra.is_dse }}
id: generate-token
uses: actions/create-github-app-token@v2
with:
app-id: ${{ vars.RIPTANO_CCM_PRIVATE_APP_ID }}
private-key: ${{ secrets.RIPTANO_CCM_APP_PRIVATE_KEY }}
owner: riptano
repositories: ccm-private
- name: Setup CCM private
if: ${{ matrix.cassandra.is_dse }}
env:
CLONE_RIPTANO_CCM_SECRET: ${{secrets.CLONE_RIPTANO_CCM_SECRET}}
CLONE_RIPTANO_CCM_SECRET: ${{ steps.generate-token.outputs.token }}
run: |
#!/bin/bash
set -e
echo "Cloning the repo"
git clone https://${CLONE_RIPTANO_CCM_SECRET}:x-oauth-basic@github.com/riptano/ccm-private.git
git clone https://x-access-token:${CLONE_RIPTANO_CCM_SECRET}@github.com/riptano/ccm-private.git
cd ccm-private
echo "pip install requirements"
pip install -r requirements.txt
Expand All @@ -103,6 +117,24 @@ jobs:
run: |
#!/bin/bash
pip install ccm
- name: Configure CCM for DSE
if: ${{ matrix.cassandra.is_dse }}
env:
DSE_USERNAME: ${{ secrets.DSE_USERNAME }}
DSE_PASSWORD: ${{ secrets.DSE_PASSWORD }}
run: |
mkdir -p ~/.ccm

cat <<EOF > ~/.ccm/config
[repositories]
dse = https://na.artifactory.swg-devops.com/artifactory/datastax-team-dse-packages-release-generic-local/dse-%s-bin.tar.gz
EOF

cat <<EOF > ~/.ccm/.dse.ini
[dse_credentials]
dse_username = $DSE_USERNAME
dse_password = $DSE_PASSWORD
EOF
- name: Cache local Maven repository
uses: actions/cache@v4
with:
Expand All @@ -111,7 +143,7 @@ jobs:
restore-keys: |
${{ runner.os }}-maven-

- name: Build with JDK 11
- name: Build with JDK ${{ matrix.java }}
run: mvn -B clean install -DskipTests

- name: Run integration tests
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/github-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ jobs:
matrix:
java:
- '11'
- '21'

steps:
- uses: actions/checkout@v2
Expand Down
2 changes: 1 addition & 1 deletion dist/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@
<transformer implementation="org.apache.maven.plugins.shade.resource.AppendingTransformer">
<resource>META-INF/io.netty.versions.properties</resource>
</transformer>
<transformer implementation="org.apache.maven.plugins.shade.resource.ServicesResourceTransformer" />
<transformer implementation="org.apache.maven.plugins.shade.resource.ServicesResourceTransformer"/>
</transformers>
</configuration>
</execution>
Expand Down
107 changes: 98 additions & 9 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -45,12 +45,12 @@
<caffeine.version>2.6.2</caffeine.version>
<protobuf.version>3.25.6</protobuf.version>
<oss.driver.version>4.16.0</oss.driver.version>
<dsbulk.version>1.10.0</dsbulk.version>
<dsbulk.version>1.11.1</dsbulk.version>
<reactive-streams.version>1.0.4</reactive-streams.version>
<guava.version>25.1-jre</guava.version>
<slf4j.version>1.7.36</slf4j.version>
<logback.version>1.2.13</logback.version>
<junit.version>5.4.1</junit.version>
<junit.version>5.10.2</junit.version>
<assertj.version>3.14.0</assertj.version>
<mockito.version>2.18.3</mockito.version>
<wiremock.version>2.25.0</wiremock.version>
Expand Down Expand Up @@ -270,11 +270,6 @@
<artifactId>kafka-schema-registry-client-encryption-hcvault</artifactId>
<version>${confluent.version}</version>
</dependency>
<dependency>
<groupId>io.confluent</groupId>
<artifactId>kafka-schema-registry-client-encryption-hcvault</artifactId>
<version>${confluent.version}</version>
</dependency>
<dependency>
<groupId>com.amazonaws</groupId>
<artifactId>aws-java-sdk-core</artifactId>
Expand Down Expand Up @@ -464,7 +459,7 @@ limitations under the License.]]></inlineHeader>
<plugin>
<groupId>org.jacoco</groupId>
<artifactId>jacoco-maven-plugin</artifactId>
<version>0.8.6</version>
<version>0.8.14</version>
<executions>
<execution>
<id>unit-tests-coverage</id>
Expand Down Expand Up @@ -659,10 +654,104 @@ limitations under the License.]]></inlineHeader>
</plugins>
</build>
<profiles>
<profile>
<id>jdk21</id>
<activation>
<jdk>[21,)</jdk>
</activation>
<build>
<pluginManagement>
<plugins>
<plugin>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.15.0</version>
<configuration>
<source>${java.version}</source>
<target>${java.version}</target>
<release>${java.release.version}</release>
<showDeprecation>true</showDeprecation>
<failOnWarning>false</failOnWarning>
<fork>true</fork>
<compilerArgs>
<arg>-XDcompilePolicy=simple</arg>
<arg>-Xplugin:ErrorProne</arg>
<arg>-XDshould-stop.ifError=FLOW</arg>
<arg>-XDaddTypeAnnotationsToSymbol=true</arg>
<arg>-J--add-exports=jdk.compiler/com.sun.tools.javac.api=ALL-UNNAMED</arg>
<arg>-J--add-exports=jdk.compiler/com.sun.tools.javac.file=ALL-UNNAMED</arg>
<arg>-J--add-exports=jdk.compiler/com.sun.tools.javac.main=ALL-UNNAMED</arg>
<arg>-J--add-exports=jdk.compiler/com.sun.tools.javac.model=ALL-UNNAMED</arg>
<arg>-J--add-exports=jdk.compiler/com.sun.tools.javac.parser=ALL-UNNAMED</arg>
<arg>-J--add-exports=jdk.compiler/com.sun.tools.javac.processing=ALL-UNNAMED</arg>
<arg>-J--add-exports=jdk.compiler/com.sun.tools.javac.tree=ALL-UNNAMED</arg>
<arg>-J--add-exports=jdk.compiler/com.sun.tools.javac.util=ALL-UNNAMED</arg>
<arg>-J--add-opens=jdk.compiler/com.sun.tools.javac.code=ALL-UNNAMED</arg>
<arg>-J--add-opens=jdk.compiler/com.sun.tools.javac.comp=ALL-UNNAMED</arg>
</compilerArgs>
<annotationProcessorPaths>
<path>
<groupId>com.google.errorprone</groupId>
<artifactId>error_prone_core</artifactId>
<version>2.49.0</version>
</path>
</annotationProcessorPaths>
</configuration>
</plugin>
</plugins>
</pluginManagement>
</build>
</profile>
<profile>
<id>jdk17</id>
<activation>
<jdk>[16,21)</jdk>
</activation>
<build>
<pluginManagement>
<plugins>
<plugin>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.15.0</version>
<configuration>
<source>${java.version}</source>
<target>${java.version}</target>
<release>${java.release.version}</release>
<showDeprecation>true</showDeprecation>
<failOnWarning>false</failOnWarning>
<fork>true</fork>
<compilerArgs>
<arg>-XDcompilePolicy=simple</arg>
<arg>-Xplugin:ErrorProne</arg>
<arg>-XDshould-stop.ifError=FLOW</arg>
<arg>-J--add-exports=jdk.compiler/com.sun.tools.javac.api=ALL-UNNAMED</arg>
<arg>-J--add-exports=jdk.compiler/com.sun.tools.javac.file=ALL-UNNAMED</arg>
<arg>-J--add-exports=jdk.compiler/com.sun.tools.javac.main=ALL-UNNAMED</arg>
<arg>-J--add-exports=jdk.compiler/com.sun.tools.javac.model=ALL-UNNAMED</arg>
<arg>-J--add-exports=jdk.compiler/com.sun.tools.javac.parser=ALL-UNNAMED</arg>
<arg>-J--add-exports=jdk.compiler/com.sun.tools.javac.processing=ALL-UNNAMED</arg>
<arg>-J--add-exports=jdk.compiler/com.sun.tools.javac.tree=ALL-UNNAMED</arg>
<arg>-J--add-exports=jdk.compiler/com.sun.tools.javac.util=ALL-UNNAMED</arg>
<arg>-J--add-opens=jdk.compiler/com.sun.tools.javac.code=ALL-UNNAMED</arg>
<arg>-J--add-opens=jdk.compiler/com.sun.tools.javac.comp=ALL-UNNAMED</arg>
</compilerArgs>
<annotationProcessorPaths>
<path>
<groupId>com.google.errorprone</groupId>
<artifactId>error_prone_core</artifactId>
<!-- From further version the minimum supported JDK version to run Error Prone is 21 -->
<version>2.42.0</version>
</path>
</annotationProcessorPaths>
</configuration>
</plugin>
</plugins>
</pluginManagement>
</build>
</profile>
<profile>
<id>jdk11</id>
<activation>
<jdk>[9..)</jdk>
<jdk>[9,16)</jdk>
</activation>
<build>
<pluginManagement>
Expand Down
4 changes: 0 additions & 4 deletions sink/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -71,10 +71,6 @@
<groupId>io.confluent</groupId>
<artifactId>kafka-schema-registry-client-encryption-hcvault</artifactId>
</dependency>
<dependency>
<groupId>io.confluent</groupId>
<artifactId>kafka-schema-registry-client-encryption-hcvault</artifactId>
</dependency>
<dependency>
<groupId>com.google.protobuf</groupId>
<artifactId>protobuf-java</artifactId>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -93,9 +93,10 @@ void should_build_dse_session_with_unresolved_contact_points_when_hostname_valid
assertThat(set).isNotNull();
// and endPoint uses unresolved DNS address
EndPoint endPoint = getEndPoint(session);
assertThat(endPoint.toString())
.isEqualTo(String.format("%s:%d", contactPointDns, ccm.getBinaryPort()));
assertTrue(((InetSocketAddress) endPoint.resolve()).isUnresolved());
InetSocketAddress address = (InetSocketAddress) endPoint.resolve();
assertThat(address.getHostString()).isEqualTo(contactPointDns);
assertThat(address.getPort()).isEqualTo(ccm.getBinaryPort());
assertTrue(address.isUnresolved());
}
}

Expand Down Expand Up @@ -127,9 +128,10 @@ void should_build_dse_session_with_unresolved_contact_points_when_hostname_valid
assertThat(set).isNotNull();
// and endPoint uses unresolved IP address
EndPoint endPoint = getEndPoint(session);
assertThat(endPoint.toString())
.isEqualTo(String.format("%s:%d", contactPointIp, ccm.getBinaryPort()));
assertTrue(((InetSocketAddress) endPoint.resolve()).isUnresolved());
InetSocketAddress address = (InetSocketAddress) endPoint.resolve();
assertThat(address.getHostString()).isEqualTo(contactPointIp);
assertThat(address.getPort()).isEqualTo(ccm.getBinaryPort());
assertTrue(address.isUnresolved());
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ private class SinkTaskProcessorImpl extends AbstractSinkTask {
/**
* Handle a failed record.
*
* @param record the {@link SinkRecord} that failed to process
* @param abstractRecord the {@link SinkRecord} that failed to process
* @param e the exception
* @param cql the cql statement that failed to execute
* @param failCounter the metric that keeps track of number of failures encountered
Expand Down
Loading