diff --git a/.github/workflows/prs_and_commits.yml b/.github/workflows/prs_and_commits.yml index 8c04c32e..a0afee1b 100644 --- a/.github/workflows/prs_and_commits.yml +++ b/.github/workflows/prs_and_commits.yml @@ -49,15 +49,6 @@ jobs: distribution: 'adopt' java-version: 17 cache: maven - - name: License header check - run: | - mvn -ntp license:remove license:format - if [[ -n $(git status -s) ]]; then - echo 1>&2 'Some files do not have the correct license header:' - git diff --name-only 1>&2 - echo 1>&2 'Please update the license headers for these files by running `mvn license:remove license:format`' - exit 1 - fi - name: Build (Maven) run: mvn -ntp -P ci --batch-mode clean package -DskipTests - name: Unit tests (Maven) diff --git a/big-query-rat-config.xml b/big-query-rat-config.xml new file mode 100644 index 00000000..efe7f51b --- /dev/null +++ b/big-query-rat-config.xml @@ -0,0 +1,37 @@ + + + + + + + + + + This software contains code derived from the Confluent BigQuery + Kafka Connector, Copyright Confluent, Inc, which in turn + contains code derived from the WePay BigQuery Kafka Connector, + Copyright WePay, Inc. + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + + http://www.apache.org/licenses/LICENSE-2.0 + https://www.apache.org/licenses/LICENSE-2.0 + + + Unless required by applicable law or agreed to in writing, + software distributed under the License is distributed on an + "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + KIND, either express or implied. See the License for the + specific language governing permissions and limitations + under the License. + + + + + + + + \ No newline at end of file diff --git a/kcbq-connector/src/test/java/com/wepay/kafka/connect/bigquery/BigQuerySinkTaskTest.java b/kcbq-connector/src/test/java/com/wepay/kafka/connect/bigquery/BigQuerySinkTaskTest.java index a70c72a2..1204a0b3 100644 --- a/kcbq-connector/src/test/java/com/wepay/kafka/connect/bigquery/BigQuerySinkTaskTest.java +++ b/kcbq-connector/src/test/java/com/wepay/kafka/connect/bigquery/BigQuerySinkTaskTest.java @@ -58,7 +58,6 @@ import com.wepay.kafka.connect.bigquery.write.storage.StorageWriteApiBase; import com.wepay.kafka.connect.bigquery.write.storage.StorageWriteApiDefaultStream; import java.net.SocketTimeoutException; -import java.time.Duration; import java.util.Arrays; import java.util.Collections; import java.util.Map; diff --git a/kcbq-connector/src/test/java/com/wepay/kafka/connect/bigquery/integration/BaseConnectorIT.java b/kcbq-connector/src/test/java/com/wepay/kafka/connect/bigquery/integration/BaseConnectorIT.java index 7144a4b9..70bddc51 100644 --- a/kcbq-connector/src/test/java/com/wepay/kafka/connect/bigquery/integration/BaseConnectorIT.java +++ b/kcbq-connector/src/test/java/com/wepay/kafka/connect/bigquery/integration/BaseConnectorIT.java @@ -172,11 +172,16 @@ protected Map baseConnectorProps(int tasksMax) { } protected BigQuery newBigQuery() { - return new GcpClientBuilder.BigQueryBuilder() - .withKey(keyFile()) - .withKeySource(GcpClientBuilder.KeySource.valueOf(keySource())) - .withProject(project()) - .build(); + try { + return new GcpClientBuilder.BigQueryBuilder() + .withKey(keyFile()) + .withKeySource(GcpClientBuilder.KeySource.valueOf(keySource())) + .withProject(project()) + .build(); + } catch (RuntimeException e) { + LoggerFactory.getLogger(BaseConnectorIT.class).error("query error", e); + throw e; + } } protected void waitForCommittedRecords( diff --git a/pom.xml b/pom.xml index e28fa6e6..c5fa28bd 100644 --- a/pom.xml +++ b/pom.xml @@ -126,7 +126,7 @@ Veli Can Ünal vlcanunal@gmail.com Europe/Berlin - + @@ -328,9 +328,19 @@ 3.3.1 maven-plugin + + org.apache.rat + apache-rat-plugin + 0.17 + + + org.apache.rat + apache-rat-plugin + 0.17 + com.google.cloud google-cloud-bigquerystorage @@ -348,47 +358,28 @@ - com.mycila - license-maven-plugin - 3.0 + org.apache.rat + apache-rat-plugin + 0.17 + + + rat-checks + validate + + check + + + - -Copyright 2024 Copyright 2022 Aiven Oy and -bigquery-connector-for-apache-kafka project contributors - -This software contains code derived from the Confluent BigQuery -Kafka Connector, Copyright Confluent, Inc, which in turn -contains code derived from the WePay BigQuery Kafka Connector, -Copyright WePay, Inc. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - -http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, -software distributed under the License is distributed on an -"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -KIND, either express or implied. See the License for the -specific language governing permissions and limitations -under the License. - - - ${main.dir}/config/copyright/custom-header-styles.xml - - - CUSTOM_JAVA_STYLE - JENKINSFILE_STYLE - - - **/*.vm - **/*.properties - LICENSE.md - *.log - config/checkstyle/google_checks.xml - **/VersionInfo.java - + false + + big-query-rat-config.xml + **/*.vm + **/*.properties + LICENSE.md + README.md + /docs/** + **/META-INF/services/**