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

Add kafka-connect extension from Jet contrib repo [HZ-1805 HZ-1808] #23312

Merged
merged 33 commits into from
Feb 8, 2023

Conversation

ldziedziul
Copy link
Contributor

@ldziedziul ldziedziul commented Jan 4, 2023

Adds old kafka-connect extension along with unit tests. Integration tests will be added in the next PR

Fixes https://hazelcast.atlassian.net/browse/HZ-1805

@ldziedziul ldziedziul added this to the 5.3.0 milestone Jan 4, 2023
@ldziedziul ldziedziul self-assigned this Jan 4, 2023
@ldziedziul ldziedziul marked this pull request as ready for review January 12, 2023 11:43
@hazelcast hazelcast deleted a comment from hz-devops-test Jan 12, 2023
@hazelcast hazelcast deleted a comment from hz-devops-test Jan 12, 2023
@hazelcast hazelcast deleted a comment from hz-devops-test Jan 12, 2023
@ldziedziul
Copy link
Contributor Author

I don't like adding binaries (e.g. jars) into the repository until there is no other option. They could contain whatever malicious code. Could we prepare the connect-connector classes from sources or reference the artifact from the Maven central repo?
I didn't complete the review yet, but I'm failing it fast so we can discuss it or work on the improvements.

The connector are unavailable in the maven repository. There are sources we can build them but it will take time and complicate the build. Maybe we could add this jar to our jfrog repository like here: https://github.com/hazelcast/hazelcast/pull/23312/files#diff-563cf06ae27c7192b68fb111982ff428996336712840ac47dd50a39f09df44e8R53

@hz-devops-test
Copy link

The job Hazelcast-pr-builder of your PR failed. (Hazelcast internal details: build log, artifacts).
Through arcane magic we have determined that the following fragments from the build log may contain information about the problem.

Click to expand the log file
--------------------------
---------SUMMARY----------
--------------------------
[ERROR] Failed to execute goal org.codehaus.mojo:license-maven-plugin:2.0.0:add-third-party (add-third-party) on project hazelcast-jet-elasticsearch-7: could not init goal AddThirdPartyMojo for reason : null: ConcurrentModificationException -> [Help 1]
--------------------------

@ldziedziul
Copy link
Contributor Author

run-lab-run

Copy link
Member

@kwart kwart left a comment

Choose a reason for hiding this comment

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

Maybe we could make a simple replacement for the Random connector on our own.

Comment on lines 53 to 54
private static final String CONNECTOR_URL = "https://hazelcast.jfrog.io/artifactory/download-local"
+ "/tests/confluentinc-kafka-connect-jdbc-10.6.3.zip";
Copy link
Member

Choose a reason for hiding this comment

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

I think it'll be a blocker for Viridian, but please doublecheck with the legal dep.

JobConfig jobConfig = new JobConfig();
jobConfig.addJar(Objects.requireNonNull(this.getClass()
.getClassLoader()
.getResource("random-connector-1.0-SNAPSHOT.jar"))
Copy link
Member

Choose a reason for hiding this comment

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

And if I'm looking into the project correctly, we are out of luck.

The https://github.com/sasakitoa/kafka-connect-random project does neither have the license filled in the metadata (GH or POM) nor has it included within the sources. We can't use it.

@ldziedziul ldziedziul requested a review from kwart February 7, 2023 12:57
@hz-devops-test
Copy link

The job Hazelcast-pr-builder of your PR failed. (Hazelcast internal details: build log, artifacts).
Through arcane magic we have determined that the following fragments from the build log may contain information about the problem.

Click to expand the log file
--------------------------
---------SUMMARY----------
--------------------------
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-checkstyle-plugin:3.2.1:checkstyle (default) on project hazelcast-jet-kafka-connect: An error has occurred in Checkstyle report generation. Failed during checkstyle execution: There is 1 error reported by Checkstyle 8.38 with /home/jenkins/jenkins_slave/workspace/Hazelcast-pr-builder_2/extensions/kafka-connect/../../checkstyle/checkstyle_jet.xml ruleset. -> [Help 1]
--------------------------
---------ERRORS-----------
--------------------------
[ERROR] /home/jenkins/jenkins_slave/workspace/Hazelcast-pr-builder_2/extensions/kafka-connect/src/test/java/com/hazelcast/jet/kafka/connect/KafkaConnectDatagenIntegrationTest.java:47: Line is longer than 123 characters (found 155). [LineLength]
--------------------------

@hz-devops-test
Copy link

The job Hazelcast-pr-compiler of your PR failed. (Hazelcast internal details: build log, artifacts).
Through arcane magic we have determined that the following fragments from the build log may contain information about the problem.

Click to expand the log file
--------------------------
---------SUMMARY----------
--------------------------
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-checkstyle-plugin:3.2.1:checkstyle (default) on project hazelcast-jet-kafka-connect: An error has occurred in Checkstyle report generation. Failed during checkstyle execution: There is 1 error reported by Checkstyle 8.38 with /home/jenkins/jenkins_slave/workspace/Hazelcast-pr-compiler/extensions/kafka-connect/../../checkstyle/checkstyle_jet.xml ruleset. -> [Help 1]
--------------------------
---------ERRORS-----------
--------------------------
[ERROR] /home/jenkins/jenkins_slave/workspace/Hazelcast-pr-compiler/extensions/kafka-connect/src/test/java/com/hazelcast/jet/kafka/connect/KafkaConnectDatagenIntegrationTest.java:47: Line is longer than 123 characters (found 155). [LineLength]
--------------------------

@ldziedziul ldziedziul requested a review from kwart February 8, 2023 10:58
@hz-devops-test
Copy link

The job Hazelcast-pr-builder of your PR failed. (Hazelcast internal details: build log, artifacts).
Through arcane magic we have determined that the following fragments from the build log may contain information about the problem.

Click to expand the log file
--------------------------
---------SUMMARY----------
--------------------------
[ERROR] COMPILATION ERROR : 
--------------------------
[ERROR] /home/jenkins/jenkins_slave/workspace/Hazelcast-pr-builder_2/extensions/kafka-connect/src/test/java/com/hazelcast/jet/kafka/connect/KafkaConnectJdbcIntegrationTest.java:[52,110] illegal forward reference
--------------------------
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.10.1:testCompile (default-testCompile) on project hazelcast-jet-kafka-connect: Compilation failure: Compilation failure: 
--------------------------
---------ERRORS-----------
--------------------------
[ERROR] /home/jenkins/jenkins_slave/workspace/Hazelcast-pr-builder_2/extensions/kafka-connect/src/test/java/com/hazelcast/jet/kafka/connect/KafkaConnectJdbcIntegrationTest.java:[52,110] illegal forward reference
--------------------------
[ERROR] /home/jenkins/jenkins_slave/workspace/Hazelcast-pr-builder_2/extensions/kafka-connect/src/test/java/com/hazelcast/jet/kafka/connect/KafkaConnectJdbcIntegrationTest.java:[52,87] illegal forward reference
--------------------------
[ERROR] /home/jenkins/jenkins_slave/workspace/Hazelcast-pr-builder_2/extensions/kafka-connect/src/test/java/com/hazelcast/jet/kafka/connect/KafkaConnectJdbcIntegrationTest.java:[52,110] illegal forward reference
--------------------------
[ERROR] /home/jenkins/jenkins_slave/workspace/Hazelcast-pr-builder_2/extensions/kafka-connect/src/test/java/com/hazelcast/jet/kafka/connect/KafkaConnectJdbcIntegrationTest.java:[52,87] illegal forward reference
--------------------------

@hz-devops-test
Copy link

The job Hazelcast-pr-EE-compiler of your PR failed. (Hazelcast internal details: build log, artifacts).
Through arcane magic we have determined that the following fragments from the build log may contain information about the problem.

Click to expand the log file
--------------------------
---------SUMMARY----------
--------------------------
[ERROR] COMPILATION ERROR : 
--------------------------
[ERROR] /home/jenkins/jenkins_slave/workspace/Hazelcast-pr-EE-compiler/hazelcast/extensions/kafka-connect/src/test/java/com/hazelcast/jet/kafka/connect/KafkaConnectJdbcIntegrationTest.java:[52,110] illegal forward reference
--------------------------
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.10.1:testCompile (default-testCompile) on project hazelcast-jet-kafka-connect: Compilation failure: Compilation failure: 
--------------------------
---------ERRORS-----------
--------------------------
[ERROR] /home/jenkins/jenkins_slave/workspace/Hazelcast-pr-EE-compiler/hazelcast/extensions/kafka-connect/src/test/java/com/hazelcast/jet/kafka/connect/KafkaConnectJdbcIntegrationTest.java:[52,110] illegal forward reference
--------------------------
[ERROR] /home/jenkins/jenkins_slave/workspace/Hazelcast-pr-EE-compiler/hazelcast/extensions/kafka-connect/src/test/java/com/hazelcast/jet/kafka/connect/KafkaConnectJdbcIntegrationTest.java:[52,87] illegal forward reference
--------------------------
[ERROR] /home/jenkins/jenkins_slave/workspace/Hazelcast-pr-EE-compiler/hazelcast/extensions/kafka-connect/src/test/java/com/hazelcast/jet/kafka/connect/KafkaConnectJdbcIntegrationTest.java:[52,110] illegal forward reference
--------------------------
[ERROR] /home/jenkins/jenkins_slave/workspace/Hazelcast-pr-EE-compiler/hazelcast/extensions/kafka-connect/src/test/java/com/hazelcast/jet/kafka/connect/KafkaConnectJdbcIntegrationTest.java:[52,87] illegal forward reference
--------------------------

@ldziedziul ldziedziul merged commit 3743802 into hazelcast:master Feb 8, 2023
@ldziedziul ldziedziul deleted the import-kafka-connect branch February 8, 2023 12:43
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