From 2d0d115cb020c8fdc219d1b4f8c6fd24e3595381 Mon Sep 17 00:00:00 2001 From: Sangeet Mishra Date: Sat, 18 Jan 2025 16:40:00 +0530 Subject: [PATCH 1/3] commit without updating the depdendencies --- .semaphore/project.yml | 43 +++++++++ .semaphore/semaphore.yml | 88 +++++++++++++++++++ service.yml | 15 ++++ .../connect/jdbc/JdbcSourceConnectorTest.java | 2 + 4 files changed, 148 insertions(+) create mode 100644 .semaphore/project.yml create mode 100644 .semaphore/semaphore.yml create mode 100644 service.yml diff --git a/.semaphore/project.yml b/.semaphore/project.yml new file mode 100644 index 000000000..937791a17 --- /dev/null +++ b/.semaphore/project.yml @@ -0,0 +1,43 @@ +# This file is managed by ServiceBot plugin - Semaphore. The content in this file is created using a common +# template and configurations in service.yml. +# Modifications in this file will be overwritten by generated content in the nightly run. +# For more information, please refer to the page: +# https://confluentinc.atlassian.net/wiki/spaces/Foundations/pages/2871296194/Add+SemaphoreCI +apiVersion: v1alpha +kind: Project +metadata: + name: kafka-connect-jdbc + description: "" +spec: + visibility: private + repository: + url: git@github.com:confluentinc/kafka-connect-jdbc.git + run_on: + - branches + - pull_requests + pipeline_file: .semaphore/semaphore.yml + integration_type: github_app + status: + pipeline_files: + - path: .semaphore/semaphore.yml + level: pipeline + whitelist: + branches: + - master + - main + - /^\d+\.\d+\.x$/ + - /^gh-readonly-queue.*/ + custom_permissions: true + debug_permissions: + - empty + - default_branch + - non_default_branch + - pull_request + - forked_pull_request + - tag + attach_permissions: + - default_branch + - non_default_branch + - pull_request + - forked_pull_request + - tag diff --git a/.semaphore/semaphore.yml b/.semaphore/semaphore.yml new file mode 100644 index 000000000..e39867de8 --- /dev/null +++ b/.semaphore/semaphore.yml @@ -0,0 +1,88 @@ +# This file is managed by ServiceBot plugin - Semaphore. The content in this file is created using a common +# template and configurations in service.yml. +# Any modifications made to ths file will be overwritten by the generated content in nightly runs. +# For more information, please refer to the page: +# https://confluentinc.atlassian.net/wiki/spaces/Foundations/pages/2871296194/Add+SemaphoreCI +version: v1.0 +name: build-test-release +agent: + machine: + type: s1-prod-ubuntu20-04-amd64-1 + +fail_fast: + cancel: + when: "true" + +execution_time_limit: + hours: 1 + +queue: + - when: "branch != 'master' and branch !~ '[0-9]+\\.[0-9]+\\.x'" + processing: parallel + +global_job_config: + prologue: + commands: + - checkout + - sem-version java 8 + - . cache-maven restore + +blocks: + - name: Test + dependencies: [] + run: + # don't run the tests on non-functional changes... + when: "change_in('/', {exclude: ['/.deployed-versions/', '.github/']})" + task: + jobs: + - name: Test + commands: + - pip install confluent-release-tools -q + - . sem-pint + - mvn -Dcloud -Pjenkins -U -Dmaven.wagon.http.retryHandler.count=10 -Ddependency.check.skip=true --batch-mode --no-transfer-progress clean verify install dependency:analyze validate + - . cve-scan + - . cache-maven store + epilogue: + always: + commands: + - . publish-test-results + - artifact push workflow target/test-results + + - name: Release + dependencies: ["Test"] + run: + when: "branch = 'master' or branch =~ '[0-9]+\\.[0-9]+\\.x'" + task: + jobs: + - name: Release + commands: + - mvn -Dcloud -Pjenkins -U -Dmaven.wagon.http.retryHandler.count=10 -Ddependency.check.skip=true --batch-mode -DaltDeploymentRepository=confluent-codeartifact-internal::default::https://confluent-519856050701.d.codeartifact.us-west-2.amazonaws.com/maven/maven-snapshots/ + -DrepositoryId=confluent-codeartifact-internal deploy -DskipTests + + - name: Release Notes + dependencies: [] + run: + when: "branch =~ '[0-9]+\\.[0-9]+\\.x'" + task: + jobs: + - name: Generate Release Notes + commands: + - git clone --branch master --single-branch git@github.com:confluentinc/connect-releases.git + - ./connect-releases/tasks/release-connect-plugins/generate-connect-changelogs.sh +after_pipeline: + task: + agent: + machine: + type: s1-prod-ubuntu20-04-arm64-0 + jobs: + - name: Metrics + commands: + - emit-ci-metrics -p -a test-results + - name: Publish Test Results + commands: + - test-results gen-pipeline-report + - name: SonarQube + commands: + - checkout + - sem-version java 11 + - emit-sonarqube-data -a test-results diff --git a/service.yml b/service.yml new file mode 100644 index 000000000..9d073ead4 --- /dev/null +++ b/service.yml @@ -0,0 +1,15 @@ +name: kafka-connect-jdbc +lang: java +lang_version: 8 +git: + enable: true +codeowners: + enable: true +semaphore: + enable: true + pipeline_type: cp + trivy_scan: true + extra_deploy_args: "-Dcloud -Pjenkins" + extra_build_args: "-Dcloud -Pjenkins" + run_pint_merge: true + generate_connect_changelogs: true \ No newline at end of file diff --git a/src/test/java/io/confluent/connect/jdbc/JdbcSourceConnectorTest.java b/src/test/java/io/confluent/connect/jdbc/JdbcSourceConnectorTest.java index 1f67c8054..832d2177c 100644 --- a/src/test/java/io/confluent/connect/jdbc/JdbcSourceConnectorTest.java +++ b/src/test/java/io/confluent/connect/jdbc/JdbcSourceConnectorTest.java @@ -125,6 +125,8 @@ protected CachedConnectionProvider connectionProvider( // Close with stopping will be invoked when the connector is stopped mockCachedConnectionProvider.close(true); PowerMock.expectLastCall().atLeastOnce(); + mockCachedConnectionProvider.close(); + PowerMock.expectLastCall().anyTimes(); PowerMock.replayAll(); From 4cac4155413162647ab1615a051f1c44d650d045 Mon Sep 17 00:00:00 2001 From: Sangeet Mishra Date: Sat, 18 Jan 2025 17:04:41 +0530 Subject: [PATCH 2/3] update dependencies --- pom.xml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pom.xml b/pom.xml index 2da9869ac..84311e9df 100644 --- a/pom.xml +++ b/pom.xml @@ -59,8 +59,8 @@ 10.14.2.0 2.4 0.11.1 - 3.25.2 - 42.4.3 + 3.41.2.2 + 42.4.4 1.3.1 Apache License 2.0 ${project.version} From cf466240a90eef47cd55192505fe615d90ac9b36 Mon Sep 17 00:00:00 2001 From: Sangeet Mishra Date: Sat, 18 Jan 2025 17:33:37 +0530 Subject: [PATCH 3/3] install libncurses --- .semaphore/semaphore.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.semaphore/semaphore.yml b/.semaphore/semaphore.yml index e39867de8..9a737e9a6 100644 --- a/.semaphore/semaphore.yml +++ b/.semaphore/semaphore.yml @@ -39,6 +39,7 @@ blocks: commands: - pip install confluent-release-tools -q - . sem-pint + - sudo apt-get --assume-yes install libncurses5 - mvn -Dcloud -Pjenkins -U -Dmaven.wagon.http.retryHandler.count=10 -Ddependency.check.skip=true --batch-mode --no-transfer-progress clean verify install dependency:analyze validate - . cve-scan - . cache-maven store