Skip to content

Commit

Permalink
chore: remove trailing spaces and add newlines for non-Java files
Browse files Browse the repository at this point in the history
Signed-off-by: John Jiang <[email protected]>
  • Loading branch information
johnshajiang authored and lburgazzoli committed Sep 6, 2023
1 parent bcf9936 commit 471c569
Show file tree
Hide file tree
Showing 22 changed files with 42 additions and 52 deletions.
4 changes: 1 addition & 3 deletions .github/ISSUE_TEMPLATE/bug_report.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,13 +15,11 @@ 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**
A clear and concise description of what you expected to happen.

**Additional context**
Add any other context about the problem here.


8 changes: 4 additions & 4 deletions .github/workflows/build-main.yml
Original file line number Diff line number Diff line change
@@ -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.
Expand Down Expand Up @@ -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
Expand All @@ -72,7 +72,7 @@ jobs:
cache: 'gradle'
- name: Collect Info
run: |
./gradlew currentVersion
./gradlew currentVersion
- name: Publish Snapshot
if: github.event_name != 'schedule'
env:
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/build-pr.yml
Original file line number Diff line number Diff line change
@@ -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.
Expand Down Expand Up @@ -28,7 +28,7 @@ on:
branches:
- main
workflow_dispatch:

jobs:
deps:
runs-on: ubuntu-latest
Expand Down Expand Up @@ -60,6 +60,6 @@ jobs:
run: |
export TC_USER="$(id -u):$(id -g)"
echo "tc user -> $TC_USER"
./gradlew check -x test
./gradlew test
9 changes: 4 additions & 5 deletions .github/workflows/build-tag.yml
Original file line number Diff line number Diff line change
@@ -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.
Expand Down Expand Up @@ -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
Expand All @@ -69,7 +69,7 @@ jobs:
cache: 'gradle'
- name: Collect Info
run: |
./gradlew currentVersion
./gradlew currentVersion
- name: Publish Release
env:
NEXUS_USERNAME: ${{ secrets.OSSRH_USERNAME }}
Expand All @@ -79,4 +79,3 @@ jobs:
./gradlew markNextVersion \
-Prelease.customUsername=${{ github.actor }} \
-Prelease.customPassword=${{ github.token }}
4 changes: 2 additions & 2 deletions .github/workflows/stale.yml
Original file line number Diff line number Diff line change
@@ -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.
Expand Down Expand Up @@ -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.
Remove stale label or comment or this will be closed in 7 days.
1 change: 0 additions & 1 deletion MAINTAINERS
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,3 @@ Fanmin Shi <[email protected]> (@fanminshi) pkg:*
Luca Burgazzoli <[email protected]> (@lburgazzoli) pkg:*
Xiang Li <[email protected]> (@xiang90) pkg:*
Anthony Romano <[email protected]> (@heyitsanthony) pkg:*

2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down
3 changes: 0 additions & 3 deletions docs/KeyVal.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,3 @@ for (KeyValue kv : response.getKvs()) {
);
}
----



10 changes: 5 additions & 5 deletions docs/SslConfig.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand All @@ -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);
});
```
```
8 changes: 4 additions & 4 deletions docs/Watch.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down Expand Up @@ -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.
2. Call `watch` function with the new watch creation request.
3 changes: 1 addition & 2 deletions etc/eclipse-formatter-config.xml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
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.
Expand Down Expand Up @@ -271,4 +271,3 @@
<setting id="org.eclipse.jdt.core.formatter.enabling_tag" value="CHECKSTYLE:ON"/>
</profile>
</profiles>

2 changes: 1 addition & 1 deletion etc/license.txt
Original file line number Diff line number Diff line change
Expand Up @@ -10,4 +10,4 @@ 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.
limitations under the License.
4 changes: 2 additions & 2 deletions etc/pmd-ruleset.xml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
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.
Expand Down Expand Up @@ -90,4 +90,4 @@

<rule ref="category/java/performance.xml/BigIntegerInstantiation"/>
<rule ref="category/java/bestpractices.xml/PrimitiveWrapperInstantiation" />
</ruleset>
</ruleset>
1 change: 0 additions & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,3 @@ gitURL = [email protected]/etcd-io/jetcd.git
# gradle
#
org.gradle.parallel = true

4 changes: 2 additions & 2 deletions gradle/publishing-release-tasks.gradle
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright 2016-2020 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.
Expand All @@ -22,4 +22,4 @@ task pubblications {
println "Publication $publication.name [$publication.groupId/$publication.artifactId/$publication.version]"
}
}
}
}
3 changes: 1 addition & 2 deletions gradle/publishing-release.gradle
Original file line number Diff line number Diff line change
@@ -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.
Expand Down Expand Up @@ -96,4 +96,3 @@ javadoc {

exclude "**/io/etcd/jetcd/api/**"
}

4 changes: 2 additions & 2 deletions gradle/release.gradle
Original file line number Diff line number Diff line change
@@ -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.
Expand All @@ -25,4 +25,4 @@ scmVersion {

allprojects {
project.version = scmVersion.version
}
}
4 changes: 2 additions & 2 deletions jetcd-core/src/main/proto/lock.proto
Original file line number Diff line number Diff line change
@@ -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.
Expand Down Expand Up @@ -67,4 +67,4 @@ message UnlockRequest {

message UnlockResponse {
etcdserverpb.ResponseHeader header = 1;
}
}
2 changes: 1 addition & 1 deletion jetcd-core/src/test/resources/ssl/.gitignore
Original file line number Diff line number Diff line change
@@ -1 +1 @@
cfssl/
cfssl/
4 changes: 2 additions & 2 deletions jetcd-ctl/README.MD
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,9 @@ Put `foo` `bar` into the cluster:
$ gradle run --args="put foo bar"
21:39:06.126|INFO |CommandPut - OK
```

Put `foo` `bar2` into the cluster:

```bash
$ gradle run --args="put foo bar2"
21:39:06.126|INFO |CommandPut - OK
Expand Down
4 changes: 2 additions & 2 deletions jetcd-ctl/src/main/resources/log4j2.xml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
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.
Expand All @@ -27,4 +27,4 @@
<AppenderRef ref="STDOUT" />
</Root>
</Loggers>
</Configuration>
</Configuration>
4 changes: 2 additions & 2 deletions jetcd-grpc/src/main/proto/lock.proto
Original file line number Diff line number Diff line change
@@ -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.
Expand Down Expand Up @@ -67,4 +67,4 @@ message UnlockRequest {

message UnlockResponse {
etcdserverpb.ResponseHeader header = 1;
}
}

0 comments on commit 471c569

Please sign in to comment.