From 471c5690d02b0cb99e47fb23e7c25c9737d5f297 Mon Sep 17 00:00:00 2001 From: John Jiang Date: Tue, 5 Sep 2023 22:19:27 +0800 Subject: [PATCH] chore: remove trailing spaces and add newlines for non-Java files Signed-off-by: John Jiang --- .github/ISSUE_TEMPLATE/bug_report.md | 4 +--- .github/workflows/build-main.yml | 8 ++++---- .github/workflows/build-pr.yml | 6 +++--- .github/workflows/build-tag.yml | 9 ++++----- .github/workflows/stale.yml | 4 ++-- MAINTAINERS | 1 - README.md | 2 +- docs/KeyVal.adoc | 3 --- docs/SslConfig.md | 10 +++++----- docs/Watch.md | 8 ++++---- etc/eclipse-formatter-config.xml | 3 +-- etc/license.txt | 2 +- etc/pmd-ruleset.xml | 4 ++-- gradle.properties | 1 - gradle/publishing-release-tasks.gradle | 4 ++-- gradle/publishing-release.gradle | 3 +-- gradle/release.gradle | 4 ++-- jetcd-core/src/main/proto/lock.proto | 4 ++-- jetcd-core/src/test/resources/ssl/.gitignore | 2 +- jetcd-ctl/README.MD | 4 ++-- jetcd-ctl/src/main/resources/log4j2.xml | 4 ++-- jetcd-grpc/src/main/proto/lock.proto | 4 ++-- 22 files changed, 42 insertions(+), 52 deletions(-) diff --git a/.github/ISSUE_TEMPLATE/bug_report.md b/.github/ISSUE_TEMPLATE/bug_report.md index 856942d12..929b18fed 100644 --- a/.github/ISSUE_TEMPLATE/bug_report.md +++ b/.github/ISSUE_TEMPLATE/bug_report.md @@ -15,7 +15,7 @@ assignees: '' A clear and concise description of what the bug is. **To Reproduce** -Steps or reproducer to reproduce the behavior. +Steps or reproducer to reproduce the behavior. This section *must* be provided, if not, the issue may not get attention. **Expected behavior** @@ -23,5 +23,3 @@ A clear and concise description of what you expected to happen. **Additional context** Add any other context about the problem here. - - diff --git a/.github/workflows/build-main.yml b/.github/workflows/build-main.yml index 928e4df3d..934c354eb 100644 --- a/.github/workflows/build-main.yml +++ b/.github/workflows/build-main.yml @@ -1,5 +1,5 @@ # -# Copyright 2016-2021 The jetcd authors +# Copyright 2016-2023 The jetcd authors # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -52,12 +52,12 @@ jobs: run: | export TC_USER="$(id -u):$(id -g)" echo "tc user -> $TC_USER" - + ./gradlew spotlessCheck ./gradlew test publish: runs-on: ubuntu-latest - needs: + needs: - build steps: - name: Checkout @@ -72,7 +72,7 @@ jobs: cache: 'gradle' - name: Collect Info run: | - ./gradlew currentVersion + ./gradlew currentVersion - name: Publish Snapshot if: github.event_name != 'schedule' env: diff --git a/.github/workflows/build-pr.yml b/.github/workflows/build-pr.yml index 4477564ef..6d83affca 100644 --- a/.github/workflows/build-pr.yml +++ b/.github/workflows/build-pr.yml @@ -1,5 +1,5 @@ # -# Copyright 2016-2021 The jetcd authors +# Copyright 2016-2023 The jetcd authors # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -28,7 +28,7 @@ on: branches: - main workflow_dispatch: - + jobs: deps: runs-on: ubuntu-latest @@ -60,6 +60,6 @@ jobs: run: | export TC_USER="$(id -u):$(id -g)" echo "tc user -> $TC_USER" - + ./gradlew check -x test ./gradlew test diff --git a/.github/workflows/build-tag.yml b/.github/workflows/build-tag.yml index 8978527a6..d75a4bbc0 100644 --- a/.github/workflows/build-tag.yml +++ b/.github/workflows/build-tag.yml @@ -1,5 +1,5 @@ # -# Copyright 2016-2021 The jetcd authors +# Copyright 2016-2023 The jetcd authors # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -49,12 +49,12 @@ jobs: run: | export TC_USER="$(id -u):$(id -g)" echo "tc user -> $TC_USER" - + ./gradlew spotlessCheck ./gradlew test publish: runs-on: ubuntu-latest - needs: + needs: - build steps: - name: Checkout @@ -69,7 +69,7 @@ jobs: cache: 'gradle' - name: Collect Info run: | - ./gradlew currentVersion + ./gradlew currentVersion - name: Publish Release env: NEXUS_USERNAME: ${{ secrets.OSSRH_USERNAME }} @@ -79,4 +79,3 @@ jobs: ./gradlew markNextVersion \ -Prelease.customUsername=${{ github.actor }} \ -Prelease.customPassword=${{ github.token }} - diff --git a/.github/workflows/stale.yml b/.github/workflows/stale.yml index c36e90133..edc961157 100644 --- a/.github/workflows/stale.yml +++ b/.github/workflows/stale.yml @@ -1,5 +1,5 @@ # -# Copyright 2016-2021 The jetcd authors +# Copyright 2016-2023 The jetcd authors # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -38,4 +38,4 @@ jobs: Remove stale label or comment or this will be closed in 7 days. stale-pr-message: | This PR is stale because it has been open 60 days with no activity. - Remove stale label or comment or this will be closed in 7 days. \ No newline at end of file + Remove stale label or comment or this will be closed in 7 days. diff --git a/MAINTAINERS b/MAINTAINERS index e343b6fb5..304393e85 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -2,4 +2,3 @@ Fanmin Shi (@fanminshi) pkg:* Luca Burgazzoli (@lburgazzoli) pkg:* Xiang Li (@xiang90) pkg:* Anthony Romano (@heyitsanthony) pkg:* - diff --git a/README.md b/README.md index 6ec87f9f8..d40943dbf 100644 --- a/README.md +++ b/README.md @@ -80,7 +80,7 @@ import io.etcd.jetcd.Client; import io.etcd.jetcd.test.EtcdClusterExtension; import org.junit.jupiter.api.extension.RegisterExtension; -@RegisterExtension +@RegisterExtension public static final EtcdClusterExtension cluster = EtcdClusterExtension.builder() .withNodes(1) .build(); diff --git a/docs/KeyVal.adoc b/docs/KeyVal.adoc index 5fcb2c588..cd46c9dda 100644 --- a/docs/KeyVal.adoc +++ b/docs/KeyVal.adoc @@ -26,6 +26,3 @@ for (KeyValue kv : response.getKvs()) { ); } ---- - - - diff --git a/docs/SslConfig.md b/docs/SslConfig.md index 6db845f0c..b43863bff 100644 --- a/docs/SslConfig.md +++ b/docs/SslConfig.md @@ -3,16 +3,16 @@ # prepare certification files If your etcd cluster is installed using [etcdadm](https://github.com/kubernetes-sigs/etcdadm), you are likely to find -certification files in the path `/etc/etcd/pki/`: `ca.crt`, `etcdctl-etcd-client.key`, `etcdctl-etcd-client.crt` +certification files in the path `/etc/etcd/pki/`: `ca.crt`, `etcdctl-etcd-client.key`, `etcdctl-etcd-client.crt`. If your etcd cluster is the builtin etcd in one kubernetes cluster( using [kubeadm](https://kubernetes.io/docs/setup/production-environment/tools/kubeadm/setup-ha-etcd-with-kubeadm/)), -you can find the same files in `/etc/kubernetes/pki/etcd/`: `ca.crt`, `healthcheck-client.crt`, `healthcheck-client.key` +you can find the same files in `/etc/kubernetes/pki/etcd/`: `ca.crt`, `healthcheck-client.crt`, `healthcheck-client.key`. Because `SslContextBuilder` only support a PKCS#8 private key file in PEM format, convert `etcdctl-etcd-client.key` to `etcdctl-etcd-client.key.pem` according -to [netty SslContextBuilder doc](https://netty.io/wiki/sslcontextbuilder-and-private-key.html) +to [netty SslContextBuilder doc](https://netty.io/wiki/sslcontextbuilder-and-private-key.html). # build jetcd client @@ -28,9 +28,9 @@ to [netty SslContextBuilder doc](https://netty.io/wiki/sslcontextbuilder-and-pri .endpoints("https://10.168.168.66:2379") .sslContext(context) .build(); - + client.getClusterClient().listMember().get().getMembers().forEach(member -> { logger.info("member: {}", member); }); -``` \ No newline at end of file +``` diff --git a/docs/Watch.md b/docs/Watch.md index 1ee03bfd7..ca85da0ec 100644 --- a/docs/Watch.md +++ b/docs/Watch.md @@ -12,15 +12,15 @@ The Watch provide methods to watch on a key interval and cancel a watcher. If th 4. Cancel watch request, the etcd client should process watch cancellation and filter all the notification after cancellation request. -5. The watch client should be able to make a progress notify request that propagates the latest revision number to all watches +5. The watch client should be able to make a progress notify request that propagates the latest revision number to all watches. # Implementation -The etcd client process watch request with [watch function](#watch-function), process notification with [processEvents function](#processevents-function) , process resume with [resume function](#resume-function), process cancel with [cancelWatch function](#cancelwatch-function) and request progress with [requestProgress function](#requestProgress-function). +The etcd client process watch request with [watch function](#watch-function), process notification with [processEvents function](#processevents-function), process resume with [resume function](#resume-function), process cancel with [cancelWatch function](#cancelwatch-function) and request progress with [requestProgress function](#requestProgress-function). ## watch function -Watch watches on a key interval. +Watch watches on a key interval. 1. Send create request to [requestStream](#requeststream-instance). 2. If the watch is create successfully, the `onCreate` will be called and the ListenableFuture task will be completed. @@ -116,4 +116,4 @@ Process cancel response from etcd server. Resume all the the watchers on new requestStream. 1. Build new watch creation request for old watcher with last revision + 1. -2. Call `watch` function with the new watch creation request. \ No newline at end of file +2. Call `watch` function with the new watch creation request. diff --git a/etc/eclipse-formatter-config.xml b/etc/eclipse-formatter-config.xml index 85c40e19f..05d3e794f 100644 --- a/etc/eclipse-formatter-config.xml +++ b/etc/eclipse-formatter-config.xml @@ -1,7 +1,7 @@