Compare commits

...

291 Commits

Author SHA1 Message Date
dependabot[bot] 8e72ab3da0 build(deps): bump grpc from 1.73.0 to 1.74.0
Bumps `grpc` from 1.73.0 to 1.74.0.

Updates `io.grpc:grpc-core` from 1.73.0 to 1.74.0
- [Release notes](https://github.com/grpc/grpc-java/releases)
- [Commits](https://github.com/grpc/grpc-java/compare/v1.73.0...v1.74.0)

Updates `io.grpc:grpc-netty` from 1.73.0 to 1.74.0
- [Release notes](https://github.com/grpc/grpc-java/releases)
- [Commits](https://github.com/grpc/grpc-java/compare/v1.73.0...v1.74.0)

Updates `io.grpc:grpc-protobuf` from 1.73.0 to 1.74.0
- [Release notes](https://github.com/grpc/grpc-java/releases)
- [Commits](https://github.com/grpc/grpc-java/compare/v1.73.0...v1.74.0)

Updates `io.grpc:grpc-stub` from 1.73.0 to 1.74.0
- [Release notes](https://github.com/grpc/grpc-java/releases)
- [Commits](https://github.com/grpc/grpc-java/compare/v1.73.0...v1.74.0)

Updates `io.grpc:grpc-grpclb` from 1.73.0 to 1.74.0
- [Release notes](https://github.com/grpc/grpc-java/releases)
- [Commits](https://github.com/grpc/grpc-java/compare/v1.73.0...v1.74.0)

Updates `io.grpc:grpc-inprocess` from 1.73.0 to 1.74.0
- [Release notes](https://github.com/grpc/grpc-java/releases)
- [Commits](https://github.com/grpc/grpc-java/compare/v1.73.0...v1.74.0)

Updates `io.grpc:grpc-util` from 1.73.0 to 1.74.0
- [Release notes](https://github.com/grpc/grpc-java/releases)
- [Commits](https://github.com/grpc/grpc-java/compare/v1.73.0...v1.74.0)

---
updated-dependencies:
- dependency-name: io.grpc:grpc-core
  dependency-version: 1.74.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
- dependency-name: io.grpc:grpc-netty
  dependency-version: 1.74.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
- dependency-name: io.grpc:grpc-protobuf
  dependency-version: 1.74.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
- dependency-name: io.grpc:grpc-stub
  dependency-version: 1.74.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
- dependency-name: io.grpc:grpc-grpclb
  dependency-version: 1.74.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
- dependency-name: io.grpc:grpc-inprocess
  dependency-version: 1.74.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
- dependency-name: io.grpc:grpc-util
  dependency-version: 1.74.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-08-03 21:33:58 +02:00
dependabot[bot] 3be6978e23 build(deps): bump org.apache.commons:commons-compress
Bumps [org.apache.commons:commons-compress](https://github.com/apache/commons-compress) from 1.27.1 to 1.28.0.
- [Changelog](https://github.com/apache/commons-compress/blob/master/RELEASE-NOTES.txt)
- [Commits](https://github.com/apache/commons-compress/compare/rel/commons-compress-1.27.1...rel/commons-compress-1.28.0)

---
updated-dependencies:
- dependency-name: org.apache.commons:commons-compress
  dependency-version: 1.28.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-08-03 21:33:38 +02:00
yunpeng.hu 9b4c9dd2ce fix 2025-07-28 22:01:18 +02:00
Michael Vorburger 03a3b994e6 chore: Remove xiang90@ and heyitsanthony@ from OWNERS
See https://github.com/etcd-io/jetcd/pull/1487#discussion_r2178670309.

Signed-off-by: Michael Vorburger <mike@vorburger.ch>
2025-07-23 14:06:55 +02:00
Michael Vorburger 10a335bf5f chore: Add vorburger to OWNERS
See https://github.com/etcd-io/jetcd/issues/1486,

for https://github.com/kubernetes/org/issues/5665.

Signed-off-by: Michael Vorburger <mike@vorburger.ch>
2025-07-23 14:06:55 +02:00
Lan fd240de17e chore: add ci for etcd 3.6.0 and drop 3.4
Signed-off-by: Lan <gcslyp@gmail.com>
2025-07-23 14:06:22 +02:00
dependabot[bot] 602feaf479 build(deps): bump org.junit.jupiter:junit-jupiter from 5.13.3 to 5.13.4
Bumps [org.junit.jupiter:junit-jupiter](https://github.com/junit-team/junit-framework) from 5.13.3 to 5.13.4.
- [Release notes](https://github.com/junit-team/junit-framework/releases)
- [Commits](https://github.com/junit-team/junit-framework/compare/r5.13.3...r5.13.4)

---
updated-dependencies:
- dependency-name: org.junit.jupiter:junit-jupiter
  dependency-version: 5.13.4
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-07-21 22:32:17 +02:00
dependabot[bot] 4489b3f8da build(deps): bump commons-io:commons-io from 2.19.0 to 2.20.0
Bumps [commons-io:commons-io](https://github.com/apache/commons-io) from 2.19.0 to 2.20.0.
- [Changelog](https://github.com/apache/commons-io/blob/master/RELEASE-NOTES.txt)
- [Commits](https://github.com/apache/commons-io/compare/rel/commons-io-2.19.0...rel/commons-io-2.20.0)

---
updated-dependencies:
- dependency-name: commons-io:commons-io
  dependency-version: 2.20.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-07-21 22:13:28 +02:00
dependabot[bot] 40425c35d5 build(deps): bump org.testcontainers:testcontainers
Bumps [org.testcontainers:testcontainers](https://github.com/testcontainers/testcontainers-java) from 1.21.0 to 1.21.3.
- [Release notes](https://github.com/testcontainers/testcontainers-java/releases)
- [Changelog](https://github.com/testcontainers/testcontainers-java/blob/main/CHANGELOG.md)
- [Commits](https://github.com/testcontainers/testcontainers-java/compare/1.21.0...1.21.3)

---
updated-dependencies:
- dependency-name: org.testcontainers:testcontainers
  dependency-version: 1.21.3
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-07-15 08:02:36 +02:00
dependabot[bot] 990a5ea690 build(deps): bump log4j from 2.24.3 to 2.25.1
Bumps `log4j` from 2.24.3 to 2.25.1.

Updates `org.apache.logging.log4j:log4j-api` from 2.24.3 to 2.25.1

Updates `org.apache.logging.log4j:log4j-core` from 2.24.3 to 2.25.1

Updates `org.apache.logging.log4j:log4j-slf4j2-impl` from 2.24.3 to 2.25.1

Updates `org.apache.logging.log4j:log4j-1.2-api` from 2.24.3 to 2.25.1

---
updated-dependencies:
- dependency-name: org.apache.logging.log4j:log4j-api
  dependency-version: 2.25.1
  dependency-type: direct:production
  update-type: version-update:semver-minor
- dependency-name: org.apache.logging.log4j:log4j-core
  dependency-version: 2.25.1
  dependency-type: direct:production
  update-type: version-update:semver-minor
- dependency-name: org.apache.logging.log4j:log4j-slf4j2-impl
  dependency-version: 2.25.1
  dependency-type: direct:production
  update-type: version-update:semver-minor
- dependency-name: org.apache.logging.log4j:log4j-1.2-api
  dependency-version: 2.25.1
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-07-15 08:01:51 +02:00
dependabot[bot] 6843e47a96 build(deps): bump org.junit.jupiter:junit-jupiter from 5.13.2 to 5.13.3
Bumps [org.junit.jupiter:junit-jupiter](https://github.com/junit-team/junit-framework) from 5.13.2 to 5.13.3.
- [Release notes](https://github.com/junit-team/junit-framework/releases)
- [Commits](https://github.com/junit-team/junit-framework/compare/r5.13.2...r5.13.3)

---
updated-dependencies:
- dependency-name: org.junit.jupiter:junit-jupiter
  dependency-version: 5.13.3
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-07-05 18:12:29 +09:00
dependabot[bot] 5a83bdb482 build(deps): bump mockito from 5.17.0 to 5.18.0
Bumps `mockito` from 5.17.0 to 5.18.0.

Updates `org.mockito:mockito-core` from 5.17.0 to 5.18.0
- [Release notes](https://github.com/mockito/mockito/releases)
- [Commits](https://github.com/mockito/mockito/compare/v5.17.0...v5.18.0)

Updates `org.mockito:mockito-junit-jupiter` from 5.17.0 to 5.18.0
- [Release notes](https://github.com/mockito/mockito/releases)
- [Commits](https://github.com/mockito/mockito/compare/v5.17.0...v5.18.0)

---
updated-dependencies:
- dependency-name: org.mockito:mockito-core
  dependency-version: 5.18.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
- dependency-name: org.mockito:mockito-junit-jupiter
  dependency-version: 5.18.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-07-01 08:13:28 +09:00
dependabot[bot] 5f0ee26f3b build(deps): bump io.vertx:vertx-grpc from 4.5.14 to 5.0.1
Bumps [io.vertx:vertx-grpc](https://github.com/vert-x3/vertx-grpc) from 4.5.14 to 5.0.1.
- [Commits](https://github.com/vert-x3/vertx-grpc/compare/4.5.14...5.0.1)

---
updated-dependencies:
- dependency-name: io.vertx:vertx-grpc
  dependency-version: 5.0.1
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-07-01 07:55:53 +09:00
dependabot[bot] 80b72b0b2a build(deps): bump grpc from 1.72.0 to 1.73.0
Bumps `grpc` from 1.72.0 to 1.73.0.

Updates `io.grpc:grpc-core` from 1.72.0 to 1.73.0
- [Release notes](https://github.com/grpc/grpc-java/releases)
- [Commits](https://github.com/grpc/grpc-java/compare/v1.72.0...v1.73.0)

Updates `io.grpc:grpc-netty` from 1.72.0 to 1.73.0
- [Release notes](https://github.com/grpc/grpc-java/releases)
- [Commits](https://github.com/grpc/grpc-java/compare/v1.72.0...v1.73.0)

Updates `io.grpc:grpc-protobuf` from 1.72.0 to 1.73.0
- [Release notes](https://github.com/grpc/grpc-java/releases)
- [Commits](https://github.com/grpc/grpc-java/compare/v1.72.0...v1.73.0)

Updates `io.grpc:grpc-stub` from 1.72.0 to 1.73.0
- [Release notes](https://github.com/grpc/grpc-java/releases)
- [Commits](https://github.com/grpc/grpc-java/compare/v1.72.0...v1.73.0)

Updates `io.grpc:grpc-grpclb` from 1.72.0 to 1.73.0
- [Release notes](https://github.com/grpc/grpc-java/releases)
- [Commits](https://github.com/grpc/grpc-java/compare/v1.72.0...v1.73.0)

Updates `io.grpc:grpc-inprocess` from 1.72.0 to 1.73.0
- [Release notes](https://github.com/grpc/grpc-java/releases)
- [Commits](https://github.com/grpc/grpc-java/compare/v1.72.0...v1.73.0)

Updates `io.grpc:grpc-util` from 1.72.0 to 1.73.0
- [Release notes](https://github.com/grpc/grpc-java/releases)
- [Commits](https://github.com/grpc/grpc-java/compare/v1.72.0...v1.73.0)

---
updated-dependencies:
- dependency-name: io.grpc:grpc-core
  dependency-version: 1.73.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
- dependency-name: io.grpc:grpc-netty
  dependency-version: 1.73.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
- dependency-name: io.grpc:grpc-protobuf
  dependency-version: 1.73.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
- dependency-name: io.grpc:grpc-stub
  dependency-version: 1.73.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
- dependency-name: io.grpc:grpc-grpclb
  dependency-version: 1.73.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
- dependency-name: io.grpc:grpc-inprocess
  dependency-version: 1.73.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
- dependency-name: io.grpc:grpc-util
  dependency-version: 1.73.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-07-01 07:48:50 +09:00
dependabot[bot] 98307934fe build(deps): bump io.rest-assured:rest-assured from 5.5.1 to 5.5.5
Bumps [io.rest-assured:rest-assured](https://github.com/rest-assured/rest-assured) from 5.5.1 to 5.5.5.
- [Changelog](https://github.com/rest-assured/rest-assured/blob/master/changelog.txt)
- [Commits](https://github.com/rest-assured/rest-assured/compare/rest-assured-5.5.1...rest-assured-5.5.5)

---
updated-dependencies:
- dependency-name: io.rest-assured:rest-assured
  dependency-version: 5.5.5
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-07-01 07:47:32 +09:00
dependabot[bot] a3f85475a2 build(deps): bump org.junit.jupiter:junit-jupiter from 5.12.2 to 5.13.2
Bumps [org.junit.jupiter:junit-jupiter](https://github.com/junit-team/junit-framework) from 5.12.2 to 5.13.2.
- [Release notes](https://github.com/junit-team/junit-framework/releases)
- [Commits](https://github.com/junit-team/junit-framework/compare/r5.12.2...r5.13.2)

---
updated-dependencies:
- dependency-name: org.junit.jupiter:junit-jupiter
  dependency-version: 5.13.2
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-07-01 07:46:13 +09:00
dependabot[bot] 579e05b634 build(deps): bump org.testcontainers:testcontainers
Bumps [org.testcontainers:testcontainers](https://github.com/testcontainers/testcontainers-java) from 1.20.6 to 1.21.0.
- [Release notes](https://github.com/testcontainers/testcontainers-java/releases)
- [Changelog](https://github.com/testcontainers/testcontainers-java/blob/main/CHANGELOG.md)
- [Commits](https://github.com/testcontainers/testcontainers-java/compare/1.20.6...1.21.0)

---
updated-dependencies:
- dependency-name: org.testcontainers:testcontainers
  dependency-version: 1.21.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-04-28 21:33:20 +02:00
dependabot[bot] 43f0f23122 build(deps): bump commons-io:commons-io from 2.18.0 to 2.19.0
Bumps commons-io:commons-io from 2.18.0 to 2.19.0.

---
updated-dependencies:
- dependency-name: commons-io:commons-io
  dependency-version: 2.19.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-04-28 21:33:12 +02:00
dependabot[bot] 81ea44b082 build(deps): bump info.picocli:picocli from 4.7.6 to 4.7.7
Bumps [info.picocli:picocli](https://github.com/remkop/picocli) from 4.7.6 to 4.7.7.
- [Release notes](https://github.com/remkop/picocli/releases)
- [Changelog](https://github.com/remkop/picocli/blob/main/RELEASE-NOTES.md)
- [Commits](https://github.com/remkop/picocli/compare/v4.7.6...v4.7.7)

---
updated-dependencies:
- dependency-name: info.picocli:picocli
  dependency-version: 4.7.7
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-04-28 21:33:03 +02:00
dependabot[bot] c41c3fdc68 build(deps): bump grpc from 1.71.0 to 1.72.0
Bumps `grpc` from 1.71.0 to 1.72.0.

Updates `io.grpc:grpc-core` from 1.71.0 to 1.72.0
- [Release notes](https://github.com/grpc/grpc-java/releases)
- [Commits](https://github.com/grpc/grpc-java/compare/v1.71.0...v1.72.0)

Updates `io.grpc:grpc-netty` from 1.71.0 to 1.72.0
- [Release notes](https://github.com/grpc/grpc-java/releases)
- [Commits](https://github.com/grpc/grpc-java/compare/v1.71.0...v1.72.0)

Updates `io.grpc:grpc-protobuf` from 1.71.0 to 1.72.0
- [Release notes](https://github.com/grpc/grpc-java/releases)
- [Commits](https://github.com/grpc/grpc-java/compare/v1.71.0...v1.72.0)

Updates `io.grpc:grpc-stub` from 1.71.0 to 1.72.0
- [Release notes](https://github.com/grpc/grpc-java/releases)
- [Commits](https://github.com/grpc/grpc-java/compare/v1.71.0...v1.72.0)

Updates `io.grpc:grpc-grpclb` from 1.71.0 to 1.72.0
- [Release notes](https://github.com/grpc/grpc-java/releases)
- [Commits](https://github.com/grpc/grpc-java/compare/v1.71.0...v1.72.0)

Updates `io.grpc:grpc-inprocess` from 1.71.0 to 1.72.0
- [Release notes](https://github.com/grpc/grpc-java/releases)
- [Commits](https://github.com/grpc/grpc-java/compare/v1.71.0...v1.72.0)

Updates `io.grpc:grpc-util` from 1.71.0 to 1.72.0
- [Release notes](https://github.com/grpc/grpc-java/releases)
- [Commits](https://github.com/grpc/grpc-java/compare/v1.71.0...v1.72.0)

---
updated-dependencies:
- dependency-name: io.grpc:grpc-core
  dependency-version: 1.72.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
- dependency-name: io.grpc:grpc-netty
  dependency-version: 1.72.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
- dependency-name: io.grpc:grpc-protobuf
  dependency-version: 1.72.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
- dependency-name: io.grpc:grpc-stub
  dependency-version: 1.72.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
- dependency-name: io.grpc:grpc-grpclb
  dependency-version: 1.72.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
- dependency-name: io.grpc:grpc-inprocess
  dependency-version: 1.72.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
- dependency-name: io.grpc:grpc-util
  dependency-version: 1.72.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-04-28 21:32:54 +02:00
Luca Burgazzoli e852bd921d Update deps
Signed-off-by: Luca Burgazzoli <lburgazzoli@gmail.com>
2025-04-28 13:51:24 +02:00
dependabot[bot] 8dd9d3504e build(deps): bump mockito from 5.16.1 to 5.17.0
Bumps `mockito` from 5.16.1 to 5.17.0.

Updates `org.mockito:mockito-core` from 5.16.1 to 5.17.0
- [Release notes](https://github.com/mockito/mockito/releases)
- [Commits](https://github.com/mockito/mockito/compare/v5.16.1...v5.17.0)

Updates `org.mockito:mockito-junit-jupiter` from 5.16.1 to 5.17.0
- [Release notes](https://github.com/mockito/mockito/releases)
- [Commits](https://github.com/mockito/mockito/compare/v5.16.1...v5.17.0)

---
updated-dependencies:
- dependency-name: org.mockito:mockito-core
  dependency-version: 5.17.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
- dependency-name: org.mockito:mockito-junit-jupiter
  dependency-version: 5.17.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-04-28 13:13:45 +02:00
dependabot[bot] c468ab4dd8 build(deps): bump io.vertx:vertx-grpc from 4.5.13 to 4.5.14
Bumps io.vertx:vertx-grpc from 4.5.13 to 4.5.14.

---
updated-dependencies:
- dependency-name: io.vertx:vertx-grpc
  dependency-version: 4.5.14
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-04-28 13:13:35 +02:00
dependabot[bot] 08f3c274cc build(deps): bump com.google.protobuf from 0.9.4 to 0.9.5
Bumps com.google.protobuf from 0.9.4 to 0.9.5.

---
updated-dependencies:
- dependency-name: com.google.protobuf
  dependency-version: 0.9.5
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-04-28 13:13:25 +02:00
Chih-Chieh Huang a2c1db0279 core: user provided vertx instance for ClientConnectionManager
This allows user to provide Vertx instance instead of creating a new one

Fixs #1467

Signed-off-by: Chih-Chieh Huang <cchdroid@gmail.com>
2025-04-28 13:13:12 +02:00
dependabot[bot] a65e765e36 build(deps): bump mockito from 5.16.0 to 5.16.1
Bumps `mockito` from 5.16.0 to 5.16.1.

Updates `org.mockito:mockito-core` from 5.16.0 to 5.16.1
- [Release notes](https://github.com/mockito/mockito/releases)
- [Commits](https://github.com/mockito/mockito/compare/v5.16.0...v5.16.1)

Updates `org.mockito:mockito-junit-jupiter` from 5.16.0 to 5.16.1
- [Release notes](https://github.com/mockito/mockito/releases)
- [Commits](https://github.com/mockito/mockito/compare/v5.16.0...v5.16.1)

---
updated-dependencies:
- dependency-name: org.mockito:mockito-core
  dependency-type: direct:production
  update-type: version-update:semver-patch
- dependency-name: org.mockito:mockito-junit-jupiter
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-03-24 08:04:55 +01:00
dependabot[bot] 280a445773 build(deps): bump org.testcontainers:testcontainers
Bumps [org.testcontainers:testcontainers](https://github.com/testcontainers/testcontainers-java) from 1.20.5 to 1.20.6.
- [Release notes](https://github.com/testcontainers/testcontainers-java/releases)
- [Changelog](https://github.com/testcontainers/testcontainers-java/blob/main/CHANGELOG.md)
- [Commits](https://github.com/testcontainers/testcontainers-java/compare/1.20.5...1.20.6)

---
updated-dependencies:
- dependency-name: org.testcontainers:testcontainers
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-03-24 08:04:44 +01:00
dependabot[bot] d498294fca build(deps): bump grpc from 1.70.0 to 1.71.0
Bumps `grpc` from 1.70.0 to 1.71.0.

Updates `io.grpc:grpc-core` from 1.70.0 to 1.71.0
- [Release notes](https://github.com/grpc/grpc-java/releases)
- [Commits](https://github.com/grpc/grpc-java/compare/v1.70.0...v1.71.0)

Updates `io.grpc:grpc-netty` from 1.70.0 to 1.71.0
- [Release notes](https://github.com/grpc/grpc-java/releases)
- [Commits](https://github.com/grpc/grpc-java/compare/v1.70.0...v1.71.0)

Updates `io.grpc:grpc-protobuf` from 1.70.0 to 1.71.0
- [Release notes](https://github.com/grpc/grpc-java/releases)
- [Commits](https://github.com/grpc/grpc-java/compare/v1.70.0...v1.71.0)

Updates `io.grpc:grpc-stub` from 1.70.0 to 1.71.0
- [Release notes](https://github.com/grpc/grpc-java/releases)
- [Commits](https://github.com/grpc/grpc-java/compare/v1.70.0...v1.71.0)

Updates `io.grpc:grpc-grpclb` from 1.70.0 to 1.71.0
- [Release notes](https://github.com/grpc/grpc-java/releases)
- [Commits](https://github.com/grpc/grpc-java/compare/v1.70.0...v1.71.0)

Updates `io.grpc:grpc-inprocess` from 1.70.0 to 1.71.0
- [Release notes](https://github.com/grpc/grpc-java/releases)
- [Commits](https://github.com/grpc/grpc-java/compare/v1.70.0...v1.71.0)

Updates `io.grpc:grpc-util` from 1.70.0 to 1.71.0
- [Release notes](https://github.com/grpc/grpc-java/releases)
- [Commits](https://github.com/grpc/grpc-java/compare/v1.70.0...v1.71.0)

---
updated-dependencies:
- dependency-name: io.grpc:grpc-core
  dependency-type: direct:production
  update-type: version-update:semver-minor
- dependency-name: io.grpc:grpc-netty
  dependency-type: direct:production
  update-type: version-update:semver-minor
- dependency-name: io.grpc:grpc-protobuf
  dependency-type: direct:production
  update-type: version-update:semver-minor
- dependency-name: io.grpc:grpc-stub
  dependency-type: direct:production
  update-type: version-update:semver-minor
- dependency-name: io.grpc:grpc-grpclb
  dependency-type: direct:production
  update-type: version-update:semver-minor
- dependency-name: io.grpc:grpc-inprocess
  dependency-type: direct:production
  update-type: version-update:semver-minor
- dependency-name: io.grpc:grpc-util
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-03-24 08:04:34 +01:00
dependabot[bot] 81ebd3a3fe build(deps): bump mockito from 5.15.2 to 5.16.0
Bumps `mockito` from 5.15.2 to 5.16.0.

Updates `org.mockito:mockito-core` from 5.15.2 to 5.16.0
- [Release notes](https://github.com/mockito/mockito/releases)
- [Commits](https://github.com/mockito/mockito/compare/v5.15.2...v5.16.0)

Updates `org.mockito:mockito-junit-jupiter` from 5.15.2 to 5.16.0
- [Release notes](https://github.com/mockito/mockito/releases)
- [Commits](https://github.com/mockito/mockito/compare/v5.15.2...v5.16.0)

---
updated-dependencies:
- dependency-name: org.mockito:mockito-core
  dependency-type: direct:production
  update-type: version-update:semver-minor
- dependency-name: org.mockito:mockito-junit-jupiter
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-03-05 19:35:28 +01:00
Luca Burgazzoli 9a0d2f4076
Update README 2025-03-03 11:17:32 +01:00
Luca Burgazzoli 61a21a2d7c
Update deps 2025-03-03 10:55:26 +01:00
Luca Burgazzoli 69c2ec3d03
Update deps 2025-03-03 10:52:04 +01:00
dependabot[bot] 59ff5091cc build(deps): bump org.slf4j:slf4j-api from 2.0.16 to 2.0.17
Bumps org.slf4j:slf4j-api from 2.0.16 to 2.0.17.

---
updated-dependencies:
- dependency-name: org.slf4j:slf4j-api
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-03-03 10:04:25 +01:00
dependabot[bot] 098cf0f8bc build(deps): bump org.awaitility:awaitility from 4.2.2 to 4.3.0
Bumps [org.awaitility:awaitility](https://github.com/awaitility/awaitility) from 4.2.2 to 4.3.0.
- [Changelog](https://github.com/awaitility/awaitility/blob/master/changelog.txt)
- [Commits](https://github.com/awaitility/awaitility/compare/awaitility-4.2.2...awaitility-4.3.0)

---
updated-dependencies:
- dependency-name: org.awaitility:awaitility
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-03-03 10:04:17 +01:00
dependabot[bot] e68613fb6b build(deps): bump org.testcontainers:testcontainers
Bumps [org.testcontainers:testcontainers](https://github.com/testcontainers/testcontainers-java) from 1.20.4 to 1.20.5.
- [Release notes](https://github.com/testcontainers/testcontainers-java/releases)
- [Changelog](https://github.com/testcontainers/testcontainers-java/blob/main/CHANGELOG.md)
- [Commits](https://github.com/testcontainers/testcontainers-java/compare/1.20.4...1.20.5)

---
updated-dependencies:
- dependency-name: org.testcontainers:testcontainers
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-03-03 10:04:08 +01:00
dependabot[bot] 59337b388b build(deps): bump io.rest-assured:rest-assured from 5.5.0 to 5.5.1
Bumps [io.rest-assured:rest-assured](https://github.com/rest-assured/rest-assured) from 5.5.0 to 5.5.1.
- [Changelog](https://github.com/rest-assured/rest-assured/blob/master/changelog.txt)
- [Commits](https://github.com/rest-assured/rest-assured/compare/rest-assured-5.5.0...rest-assured-5.5.1)

---
updated-dependencies:
- dependency-name: io.rest-assured:rest-assured
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-02-19 08:57:23 +01:00
dependabot[bot] 9f1a90cc6a build(deps): bump io.vertx:vertx-grpc from 4.5.11 to 4.5.13
Bumps io.vertx:vertx-grpc from 4.5.11 to 4.5.13.

---
updated-dependencies:
- dependency-name: io.vertx:vertx-grpc
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-02-18 14:12:44 +01:00
dependabot[bot] 2e34d10d24 build(deps): bump grpc from 1.68.1 to 1.70.0
Bumps `grpc` from 1.68.1 to 1.70.0.

Updates `io.grpc:grpc-core` from 1.68.1 to 1.70.0
- [Release notes](https://github.com/grpc/grpc-java/releases)
- [Commits](https://github.com/grpc/grpc-java/compare/v1.68.1...v1.70.0)

Updates `io.grpc:grpc-netty` from 1.68.1 to 1.70.0
- [Release notes](https://github.com/grpc/grpc-java/releases)
- [Commits](https://github.com/grpc/grpc-java/compare/v1.68.1...v1.70.0)

Updates `io.grpc:grpc-protobuf` from 1.68.1 to 1.70.0
- [Release notes](https://github.com/grpc/grpc-java/releases)
- [Commits](https://github.com/grpc/grpc-java/compare/v1.68.1...v1.70.0)

Updates `io.grpc:grpc-stub` from 1.68.1 to 1.70.0
- [Release notes](https://github.com/grpc/grpc-java/releases)
- [Commits](https://github.com/grpc/grpc-java/compare/v1.68.1...v1.70.0)

Updates `io.grpc:grpc-grpclb` from 1.68.1 to 1.70.0
- [Release notes](https://github.com/grpc/grpc-java/releases)
- [Commits](https://github.com/grpc/grpc-java/compare/v1.68.1...v1.70.0)

Updates `io.grpc:grpc-inprocess` from 1.68.1 to 1.70.0
- [Release notes](https://github.com/grpc/grpc-java/releases)
- [Commits](https://github.com/grpc/grpc-java/compare/v1.68.1...v1.70.0)

Updates `io.grpc:grpc-util` from 1.68.1 to 1.70.0
- [Release notes](https://github.com/grpc/grpc-java/releases)
- [Commits](https://github.com/grpc/grpc-java/compare/v1.68.1...v1.70.0)

---
updated-dependencies:
- dependency-name: io.grpc:grpc-core
  dependency-type: direct:production
  update-type: version-update:semver-minor
- dependency-name: io.grpc:grpc-netty
  dependency-type: direct:production
  update-type: version-update:semver-minor
- dependency-name: io.grpc:grpc-protobuf
  dependency-type: direct:production
  update-type: version-update:semver-minor
- dependency-name: io.grpc:grpc-stub
  dependency-type: direct:production
  update-type: version-update:semver-minor
- dependency-name: io.grpc:grpc-grpclb
  dependency-type: direct:production
  update-type: version-update:semver-minor
- dependency-name: io.grpc:grpc-inprocess
  dependency-type: direct:production
  update-type: version-update:semver-minor
- dependency-name: io.grpc:grpc-util
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-02-18 14:12:35 +01:00
dependabot[bot] 11f45ec3fc build(deps): bump mockito from 5.14.2 to 5.15.2
Bumps `mockito` from 5.14.2 to 5.15.2.

Updates `org.mockito:mockito-core` from 5.14.2 to 5.15.2
- [Release notes](https://github.com/mockito/mockito/releases)
- [Commits](https://github.com/mockito/mockito/compare/v5.14.2...v5.15.2)

Updates `org.mockito:mockito-junit-jupiter` from 5.14.2 to 5.15.2
- [Release notes](https://github.com/mockito/mockito/releases)
- [Commits](https://github.com/mockito/mockito/compare/v5.14.2...v5.15.2)

---
updated-dependencies:
- dependency-name: org.mockito:mockito-core
  dependency-type: direct:production
  update-type: version-update:semver-minor
- dependency-name: org.mockito:mockito-junit-jupiter
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-02-18 14:12:17 +01:00
dependabot[bot] 3a7740fa92 build(deps): bump com.google.guava:guava from 33.3.1-jre to 33.4.0-jre
Bumps [com.google.guava:guava](https://github.com/google/guava) from 33.3.1-jre to 33.4.0-jre.
- [Release notes](https://github.com/google/guava/releases)
- [Commits](https://github.com/google/guava/commits)

---
updated-dependencies:
- dependency-name: com.google.guava:guava
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-02-18 14:12:08 +01:00
dependabot[bot] b7293499a4 build(deps): bump org.junit.jupiter:junit-jupiter from 5.11.3 to 5.11.4
Bumps [org.junit.jupiter:junit-jupiter](https://github.com/junit-team/junit5) from 5.11.3 to 5.11.4.
- [Release notes](https://github.com/junit-team/junit5/releases)
- [Commits](https://github.com/junit-team/junit5/compare/r5.11.3...r5.11.4)

---
updated-dependencies:
- dependency-name: org.junit.jupiter:junit-jupiter
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-02-18 14:11:53 +01:00
Cristian Ferretti 08def01ee1 Wording. 2025-02-18 14:11:34 +01:00
Cristian Ferretti 05f92e0443 Do not retry by default non-idempotent operations. Fixes #1444
Also use the chance to improve javadoc on some *Options objects

Signed-off-by: Cristian Ferretti <jcferretti2020@gmail.com>
2025-02-18 14:11:34 +01:00
dependabot[bot] a240dc6a74 build(deps): bump log4j from 2.24.2 to 2.24.3
Bumps `log4j` from 2.24.2 to 2.24.3.

Updates `org.apache.logging.log4j:log4j-api` from 2.24.2 to 2.24.3

Updates `org.apache.logging.log4j:log4j-core` from 2.24.2 to 2.24.3

Updates `org.apache.logging.log4j:log4j-slf4j2-impl` from 2.24.2 to 2.24.3

Updates `org.apache.logging.log4j:log4j-1.2-api` from 2.24.2 to 2.24.3

---
updated-dependencies:
- dependency-name: org.apache.logging.log4j:log4j-api
  dependency-type: direct:production
  update-type: version-update:semver-patch
- dependency-name: org.apache.logging.log4j:log4j-core
  dependency-type: direct:production
  update-type: version-update:semver-patch
- dependency-name: org.apache.logging.log4j:log4j-slf4j2-impl
  dependency-type: direct:production
  update-type: version-update:semver-patch
- dependency-name: org.apache.logging.log4j:log4j-1.2-api
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-01-20 21:14:13 +01:00
dependabot[bot] 8ee9c1573e build(deps): bump org.assertj:assertj-core from 3.26.3 to 3.27.3
Bumps [org.assertj:assertj-core](https://github.com/assertj/assertj) from 3.26.3 to 3.27.3.
- [Release notes](https://github.com/assertj/assertj/releases)
- [Commits](https://github.com/assertj/assertj/compare/assertj-build-3.26.3...assertj-build-3.27.3)

---
updated-dependencies:
- dependency-name: org.assertj:assertj-core
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-01-20 21:13:37 +01:00
dependabot[bot] 0dad061111 build(deps): bump log4j from 2.24.1 to 2.24.2
Bumps `log4j` from 2.24.1 to 2.24.2.

Updates `org.apache.logging.log4j:log4j-api` from 2.24.1 to 2.24.2

Updates `org.apache.logging.log4j:log4j-core` from 2.24.1 to 2.24.2

Updates `org.apache.logging.log4j:log4j-slf4j2-impl` from 2.24.1 to 2.24.2

Updates `org.apache.logging.log4j:log4j-1.2-api` from 2.24.1 to 2.24.2

---
updated-dependencies:
- dependency-name: org.apache.logging.log4j:log4j-api
  dependency-type: direct:production
  update-type: version-update:semver-patch
- dependency-name: org.apache.logging.log4j:log4j-core
  dependency-type: direct:production
  update-type: version-update:semver-patch
- dependency-name: org.apache.logging.log4j:log4j-slf4j2-impl
  dependency-type: direct:production
  update-type: version-update:semver-patch
- dependency-name: org.apache.logging.log4j:log4j-1.2-api
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-11-27 07:48:00 +01:00
dependabot[bot] dab6c4cb2d build(deps): bump org.testcontainers:testcontainers
Bumps [org.testcontainers:testcontainers](https://github.com/testcontainers/testcontainers-java) from 1.20.3 to 1.20.4.
- [Release notes](https://github.com/testcontainers/testcontainers-java/releases)
- [Changelog](https://github.com/testcontainers/testcontainers-java/blob/main/CHANGELOG.md)
- [Commits](https://github.com/testcontainers/testcontainers-java/compare/1.20.3...1.20.4)

---
updated-dependencies:
- dependency-name: org.testcontainers:testcontainers
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-11-21 07:53:40 +01:00
dependabot[bot] befcdc538d build(deps): bump commons-io:commons-io from 2.17.0 to 2.18.0
Bumps commons-io:commons-io from 2.17.0 to 2.18.0.

---
updated-dependencies:
- dependency-name: commons-io:commons-io
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-11-21 07:53:32 +01:00
Luca Burgazzoli 8a6c463341
Fix README 2024-11-14 09:37:13 +01:00
Luca Burgazzoli 01a2014b54 Update deps
Signed-off-by: Luca Burgazzoli <lburgazzoli@gmail.com>
2024-11-14 09:28:50 +01:00
dependabot[bot] acbfa6f434 build(deps): bump io.vertx:vertx-grpc from 4.5.10 to 4.5.11
Bumps io.vertx:vertx-grpc from 4.5.10 to 4.5.11.

---
updated-dependencies:
- dependency-name: io.vertx:vertx-grpc
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-11-13 21:32:21 +01:00
dependabot[bot] d2005ada3f build(deps): bump mockito from 5.13.0 to 5.14.2
Bumps `mockito` from 5.13.0 to 5.14.2.

Updates `org.mockito:mockito-core` from 5.13.0 to 5.14.2
- [Release notes](https://github.com/mockito/mockito/releases)
- [Commits](https://github.com/mockito/mockito/compare/v5.13.0...v5.14.2)

Updates `org.mockito:mockito-junit-jupiter` from 5.13.0 to 5.14.2
- [Release notes](https://github.com/mockito/mockito/releases)
- [Commits](https://github.com/mockito/mockito/compare/v5.13.0...v5.14.2)

---
updated-dependencies:
- dependency-name: org.mockito:mockito-core
  dependency-type: direct:production
  update-type: version-update:semver-minor
- dependency-name: org.mockito:mockito-junit-jupiter
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-10-31 09:37:25 +01:00
dependabot[bot] 327a37bbc9 build(deps): bump org.testcontainers:testcontainers
Bumps [org.testcontainers:testcontainers](https://github.com/testcontainers/testcontainers-java) from 1.20.1 to 1.20.3.
- [Release notes](https://github.com/testcontainers/testcontainers-java/releases)
- [Changelog](https://github.com/testcontainers/testcontainers-java/blob/main/CHANGELOG.md)
- [Commits](https://github.com/testcontainers/testcontainers-java/compare/1.20.1...1.20.3)

---
updated-dependencies:
- dependency-name: org.testcontainers:testcontainers
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-10-31 09:37:16 +01:00
dependabot[bot] 8f182d4b8e build(deps): bump log4j from 2.23.1 to 2.24.1
Bumps `log4j` from 2.23.1 to 2.24.1.

Updates `org.apache.logging.log4j:log4j-api` from 2.23.1 to 2.24.1

Updates `org.apache.logging.log4j:log4j-core` from 2.23.1 to 2.24.1

Updates `org.apache.logging.log4j:log4j-slf4j2-impl` from 2.23.1 to 2.24.1

Updates `org.apache.logging.log4j:log4j-1.2-api` from 2.23.1 to 2.24.1

---
updated-dependencies:
- dependency-name: org.apache.logging.log4j:log4j-api
  dependency-type: direct:production
  update-type: version-update:semver-minor
- dependency-name: org.apache.logging.log4j:log4j-core
  dependency-type: direct:production
  update-type: version-update:semver-minor
- dependency-name: org.apache.logging.log4j:log4j-slf4j2-impl
  dependency-type: direct:production
  update-type: version-update:semver-minor
- dependency-name: org.apache.logging.log4j:log4j-1.2-api
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-10-30 15:15:29 +01:00
dependabot[bot] 2da6f79b9d build(deps): bump org.junit.jupiter:junit-jupiter from 5.11.0 to 5.11.3
Bumps [org.junit.jupiter:junit-jupiter](https://github.com/junit-team/junit5) from 5.11.0 to 5.11.3.
- [Release notes](https://github.com/junit-team/junit5/releases)
- [Commits](https://github.com/junit-team/junit5/compare/r5.11.0...r5.11.3)

---
updated-dependencies:
- dependency-name: org.junit.jupiter:junit-jupiter
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-10-30 15:07:20 +01:00
dependabot[bot] 05777ffaca build(deps): bump com.google.guava:guava from 33.3.0-jre to 33.3.1-jre
Bumps [com.google.guava:guava](https://github.com/google/guava) from 33.3.0-jre to 33.3.1-jre.
- [Release notes](https://github.com/google/guava/releases)
- [Commits](https://github.com/google/guava/commits)

---
updated-dependencies:
- dependency-name: com.google.guava:guava
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-10-30 15:07:11 +01:00
dependabot[bot] 503bdd0f5a build(deps): bump commons-io:commons-io from 2.16.1 to 2.17.0
Bumps commons-io:commons-io from 2.16.1 to 2.17.0.

---
updated-dependencies:
- dependency-name: commons-io:commons-io
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-10-30 15:07:02 +01:00
dependabot[bot] 346827957c build(deps): bump grpc from 1.66.0 to 1.68.0
Bumps `grpc` from 1.66.0 to 1.68.0.

Updates `io.grpc:grpc-core` from 1.66.0 to 1.68.0
- [Release notes](https://github.com/grpc/grpc-java/releases)
- [Commits](https://github.com/grpc/grpc-java/commits)

Updates `io.grpc:grpc-netty` from 1.66.0 to 1.68.0
- [Release notes](https://github.com/grpc/grpc-java/releases)
- [Commits](https://github.com/grpc/grpc-java/commits)

Updates `io.grpc:grpc-protobuf` from 1.66.0 to 1.68.0
- [Release notes](https://github.com/grpc/grpc-java/releases)
- [Commits](https://github.com/grpc/grpc-java/commits)

Updates `io.grpc:grpc-stub` from 1.66.0 to 1.68.0
- [Release notes](https://github.com/grpc/grpc-java/releases)
- [Commits](https://github.com/grpc/grpc-java/commits)

Updates `io.grpc:grpc-grpclb` from 1.66.0 to 1.68.0
- [Release notes](https://github.com/grpc/grpc-java/releases)
- [Commits](https://github.com/grpc/grpc-java/commits)

Updates `io.grpc:grpc-inprocess` from 1.66.0 to 1.68.0
- [Release notes](https://github.com/grpc/grpc-java/releases)
- [Commits](https://github.com/grpc/grpc-java/commits)

Updates `io.grpc:grpc-util` from 1.66.0 to 1.68.0
- [Release notes](https://github.com/grpc/grpc-java/releases)
- [Commits](https://github.com/grpc/grpc-java/commits)

---
updated-dependencies:
- dependency-name: io.grpc:grpc-core
  dependency-type: direct:production
  update-type: version-update:semver-minor
- dependency-name: io.grpc:grpc-netty
  dependency-type: direct:production
  update-type: version-update:semver-minor
- dependency-name: io.grpc:grpc-protobuf
  dependency-type: direct:production
  update-type: version-update:semver-minor
- dependency-name: io.grpc:grpc-stub
  dependency-type: direct:production
  update-type: version-update:semver-minor
- dependency-name: io.grpc:grpc-grpclb
  dependency-type: direct:production
  update-type: version-update:semver-minor
- dependency-name: io.grpc:grpc-inprocess
  dependency-type: direct:production
  update-type: version-update:semver-minor
- dependency-name: io.grpc:grpc-util
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-10-30 15:06:36 +01:00
dependabot[bot] 8e7ed6aaa6 build(deps): bump org.apache.commons:commons-compress
Bumps org.apache.commons:commons-compress from 1.27.0 to 1.27.1.

---
updated-dependencies:
- dependency-name: org.apache.commons:commons-compress
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-09-14 00:00:29 +02:00
dependabot[bot] fcfe099aab build(deps): bump mockito from 5.12.0 to 5.13.0
Bumps `mockito` from 5.12.0 to 5.13.0.

Updates `org.mockito:mockito-core` from 5.12.0 to 5.13.0
- [Release notes](https://github.com/mockito/mockito/releases)
- [Commits](https://github.com/mockito/mockito/compare/v5.12.0...v5.13.0)

Updates `org.mockito:mockito-junit-jupiter` from 5.12.0 to 5.13.0
- [Release notes](https://github.com/mockito/mockito/releases)
- [Commits](https://github.com/mockito/mockito/compare/v5.12.0...v5.13.0)

---
updated-dependencies:
- dependency-name: org.mockito:mockito-core
  dependency-type: direct:production
  update-type: version-update:semver-minor
- dependency-name: org.mockito:mockito-junit-jupiter
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-09-14 00:00:21 +02:00
dependabot[bot] d1d21b1cdb build(deps): bump io.vertx:vertx-grpc from 4.5.9 to 4.5.10
Bumps io.vertx:vertx-grpc from 4.5.9 to 4.5.10.

---
updated-dependencies:
- dependency-name: io.vertx:vertx-grpc
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-09-05 00:28:47 +02:00
dependabot[bot] 066d92cf95 build(deps): bump com.google.guava:guava from 33.2.1-jre to 33.3.0-jre
Bumps [com.google.guava:guava](https://github.com/google/guava) from 33.2.1-jre to 33.3.0-jre.
- [Release notes](https://github.com/google/guava/releases)
- [Commits](https://github.com/google/guava/commits)

---
updated-dependencies:
- dependency-name: com.google.guava:guava
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-08-20 15:51:32 +02:00
Luca Burgazzoli 676bad3dd5
build(deps): bump axion-release-plugin to v1.18.4 2024-08-16 14:59:57 +02:00
Luca Burgazzoli a8f4ab8f20
chore: update gradle from v8.9 to v8.10 2024-08-16 14:24:12 +02:00
Luca Burgazzoli 195032ee2d
chore: fix quay container image 2024-08-16 14:21:39 +02:00
dependabot[bot] 958ed92b92 build(deps): bump org.junit.jupiter:junit-jupiter from 5.10.3 to 5.11.0
Bumps [org.junit.jupiter:junit-jupiter](https://github.com/junit-team/junit5) from 5.10.3 to 5.11.0.
- [Release notes](https://github.com/junit-team/junit5/releases)
- [Commits](https://github.com/junit-team/junit5/compare/r5.10.3...r5.11.0)

---
updated-dependencies:
- dependency-name: org.junit.jupiter:junit-jupiter
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-08-16 12:18:34 +02:00
dependabot[bot] 9362dc8db3 build(deps): bump org.slf4j:slf4j-api from 2.0.15 to 2.0.16
Bumps org.slf4j:slf4j-api from 2.0.15 to 2.0.16.

---
updated-dependencies:
- dependency-name: org.slf4j:slf4j-api
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-08-16 12:18:17 +02:00
dependabot[bot] a5e1de0a88 build(deps): bump errorprone from 2.29.2 to 2.30.0
Bumps `errorprone` from 2.29.2 to 2.30.0.

Updates `com.google.errorprone:error_prone_core` from 2.29.2 to 2.30.0
- [Release notes](https://github.com/google/error-prone/releases)
- [Commits](https://github.com/google/error-prone/compare/v2.29.2...v2.30.0)

Updates `com.google.errorprone:error_prone_annotations` from 2.29.2 to 2.30.0
- [Release notes](https://github.com/google/error-prone/releases)
- [Commits](https://github.com/google/error-prone/compare/v2.29.2...v2.30.0)

---
updated-dependencies:
- dependency-name: com.google.errorprone:error_prone_core
  dependency-type: direct:production
  update-type: version-update:semver-minor
- dependency-name: com.google.errorprone:error_prone_annotations
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-08-16 12:18:09 +02:00
dependabot[bot] 7c6fbcc8ce build(deps): bump org.apache.commons:commons-compress
Bumps org.apache.commons:commons-compress from 1.26.2 to 1.27.0.

---
updated-dependencies:
- dependency-name: org.apache.commons:commons-compress
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-08-16 12:18:00 +02:00
dependabot[bot] 4bbc3bb65f build(deps): bump org.slf4j:slf4j-api from 2.0.14 to 2.0.15
Bumps org.slf4j:slf4j-api from 2.0.14 to 2.0.15.

---
updated-dependencies:
- dependency-name: org.slf4j:slf4j-api
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-08-09 16:50:35 +02:00
Luca Burgazzoli e78aa2bad2 chore: switch to quay as gcr is deprecated
see https://cloud.google.com/container-registry/docs/deprecations/container-registry-deprecation

Signed-off-by: Luca Burgazzoli <lburgazzoli@gmail.com>
2024-08-09 09:34:35 +02:00
Luca Burgazzoli 3bc741013a
chore(ci): improve stale action 2024-08-08 13:47:25 +02:00
Luca Burgazzoli d70df1c279 chore(ci): improve issue template 2024-08-08 13:21:21 +02:00
Luca Burgazzoli 612ecbb4dd build(deps): bump grpc from 1.65.1 to 1.66.0 2024-08-08 13:21:21 +02:00
Luca Burgazzoli 2e7fdbf264 chore(ci): improve stale action 2024-08-08 13:21:21 +02:00
linghengqian 7fc1e0078b jetcd-launcher: allow starting Etcd Container via non-root user on Linux
For #1310

Signed-off-by: linghengqian <linghengqian@outlook.com>
2024-08-08 12:55:48 +02:00
dependabot[bot] b51258e4a7 build(deps): bump org.awaitility:awaitility from 4.2.1 to 4.2.2
Bumps [org.awaitility:awaitility](https://github.com/awaitility/awaitility) from 4.2.1 to 4.2.2.
- [Changelog](https://github.com/awaitility/awaitility/blob/master/changelog.txt)
- [Commits](https://github.com/awaitility/awaitility/compare/awaitility-4.2.1...awaitility-4.2.2)

---
updated-dependencies:
- dependency-name: org.awaitility:awaitility
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-08-08 08:25:27 +02:00
dependabot[bot] 05d2fda634 build(deps): bump org.slf4j:slf4j-api from 2.0.13 to 2.0.14
Bumps org.slf4j:slf4j-api from 2.0.13 to 2.0.14.

---
updated-dependencies:
- dependency-name: org.slf4j:slf4j-api
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-08-08 08:25:19 +02:00
Luca Burgazzoli 639bb27d21 build(deps): bump axion-release-plugin to v1.18.3 2024-08-05 16:32:35 +02:00
Luca Burgazzoli 43bc2614c2 build(deps): bump testcontainers to v1.20.1 2024-08-05 16:32:35 +02:00
Luca Burgazzoli 7ffe8f6c37 build(deps): bump test-retry-gradle-plugin to v1.5.10 2024-08-05 16:32:35 +02:00
Luca Burgazzoli 548b810883 build(deps): bump vertx to 4.5.9 2024-08-05 16:32:35 +02:00
Luca Burgazzoli 6bbb9836a0 build(deps): bump gradle to v8.9 2024-08-05 16:32:35 +02:00
dependabot[bot] 278d3afb16 build(deps): bump grpc from 1.64.0 to 1.65.1
Bumps `grpc` from 1.64.0 to 1.65.1.

Updates `io.grpc:grpc-core` from 1.64.0 to 1.65.1
- [Release notes](https://github.com/grpc/grpc-java/releases)
- [Commits](https://github.com/grpc/grpc-java/compare/v1.64.0...v1.65.1)

Updates `io.grpc:grpc-netty` from 1.64.0 to 1.65.1
- [Release notes](https://github.com/grpc/grpc-java/releases)
- [Commits](https://github.com/grpc/grpc-java/compare/v1.64.0...v1.65.1)

Updates `io.grpc:grpc-protobuf` from 1.64.0 to 1.65.1
- [Release notes](https://github.com/grpc/grpc-java/releases)
- [Commits](https://github.com/grpc/grpc-java/compare/v1.64.0...v1.65.1)

Updates `io.grpc:grpc-stub` from 1.64.0 to 1.65.1
- [Release notes](https://github.com/grpc/grpc-java/releases)
- [Commits](https://github.com/grpc/grpc-java/compare/v1.64.0...v1.65.1)

Updates `io.grpc:grpc-grpclb` from 1.64.0 to 1.65.1
- [Release notes](https://github.com/grpc/grpc-java/releases)
- [Commits](https://github.com/grpc/grpc-java/compare/v1.64.0...v1.65.1)

Updates `io.grpc:grpc-inprocess` from 1.64.0 to 1.65.1
- [Release notes](https://github.com/grpc/grpc-java/releases)
- [Commits](https://github.com/grpc/grpc-java/compare/v1.64.0...v1.65.1)

Updates `io.grpc:grpc-util` from 1.64.0 to 1.65.1
- [Release notes](https://github.com/grpc/grpc-java/releases)
- [Commits](https://github.com/grpc/grpc-java/compare/v1.64.0...v1.65.1)

---
updated-dependencies:
- dependency-name: io.grpc:grpc-core
  dependency-type: direct:production
  update-type: version-update:semver-minor
- dependency-name: io.grpc:grpc-netty
  dependency-type: direct:production
  update-type: version-update:semver-minor
- dependency-name: io.grpc:grpc-protobuf
  dependency-type: direct:production
  update-type: version-update:semver-minor
- dependency-name: io.grpc:grpc-stub
  dependency-type: direct:production
  update-type: version-update:semver-minor
- dependency-name: io.grpc:grpc-grpclb
  dependency-type: direct:production
  update-type: version-update:semver-minor
- dependency-name: io.grpc:grpc-inprocess
  dependency-type: direct:production
  update-type: version-update:semver-minor
- dependency-name: io.grpc:grpc-util
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-08-05 16:09:02 +02:00
Luca Burgazzoli a2e3015e6e build(deps): bump errorprone from 2.28.0 to 2.29.2
Signed-off-by: Luca Burgazzoli <lburgazzoli@gmail.com>
2024-08-05 15:51:44 +02:00
dependabot[bot] ae02549362 build(deps): bump org.assertj:assertj-core from 3.26.0 to 3.26.3
Bumps [org.assertj:assertj-core](https://github.com/assertj/assertj) from 3.26.0 to 3.26.3.
- [Release notes](https://github.com/assertj/assertj/releases)
- [Commits](https://github.com/assertj/assertj/compare/assertj-build-3.26.0...assertj-build-3.26.3)

---
updated-dependencies:
- dependency-name: org.assertj:assertj-core
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-08-05 15:33:25 +02:00
Lan Liang c008ba5603 Update etcd container version to 3.5.14.
Signed-off-by: Lan Liang <gcslyp@gmail.com>
2024-08-05 14:29:24 +02:00
dependabot[bot] 9cf296c654 build(deps): bump io.rest-assured:rest-assured from 5.4.0 to 5.5.0
Bumps [io.rest-assured:rest-assured](https://github.com/rest-assured/rest-assured) from 5.4.0 to 5.5.0.
- [Changelog](https://github.com/rest-assured/rest-assured/blob/master/changelog.txt)
- [Commits](https://github.com/rest-assured/rest-assured/compare/rest-assured-5.4.0...rest-assured-5.5.0)

---
updated-dependencies:
- dependency-name: io.rest-assured:rest-assured
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-08-05 14:27:28 +02:00
dependabot[bot] 36a5738f8d build(deps): bump org.junit.jupiter:junit-jupiter from 5.10.2 to 5.10.3
Bumps [org.junit.jupiter:junit-jupiter](https://github.com/junit-team/junit5) from 5.10.2 to 5.10.3.
- [Release notes](https://github.com/junit-team/junit5/releases)
- [Commits](https://github.com/junit-team/junit5/compare/r5.10.2...r5.10.3)

---
updated-dependencies:
- dependency-name: org.junit.jupiter:junit-jupiter
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-08-05 14:26:59 +02:00
dependabot[bot] 4d93e3b8fa build(deps): bump errorprone from 2.27.1 to 2.28.0
Bumps `errorprone` from 2.27.1 to 2.28.0.

Updates `com.google.errorprone:error_prone_core` from 2.27.1 to 2.28.0
- [Release notes](https://github.com/google/error-prone/releases)
- [Commits](https://github.com/google/error-prone/compare/v2.27.1...v2.28.0)

Updates `com.google.errorprone:error_prone_annotations` from 2.27.1 to 2.28.0
- [Release notes](https://github.com/google/error-prone/releases)
- [Commits](https://github.com/google/error-prone/compare/v2.27.1...v2.28.0)

---
updated-dependencies:
- dependency-name: com.google.errorprone:error_prone_core
  dependency-type: direct:production
  update-type: version-update:semver-minor
- dependency-name: com.google.errorprone:error_prone_annotations
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-06-12 12:06:30 +02:00
dependabot[bot] 185ee008e0 build(deps): bump com.google.guava:guava from 33.2.0-jre to 33.2.1-jre
Bumps [com.google.guava:guava](https://github.com/google/guava) from 33.2.0-jre to 33.2.1-jre.
- [Release notes](https://github.com/google/guava/releases)
- [Commits](https://github.com/google/guava/commits)

---
updated-dependencies:
- dependency-name: com.google.guava:guava
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-06-03 21:00:53 +02:00
Luca Burgazzoli e878e1d4b1 reproducible build 2024-05-28 20:46:31 +02:00
Luca Burgazzoli 58c80dbbb1 Update deps
Signed-off-by: Luca Burgazzoli <lburgazzoli@gmail.com>
2024-05-28 20:40:43 +02:00
dependabot[bot] aa9ebaa9d4 build(deps): bump org.assertj:assertj-core from 3.25.3 to 3.26.0
Bumps [org.assertj:assertj-core](https://github.com/assertj/assertj) from 3.25.3 to 3.26.0.
- [Release notes](https://github.com/assertj/assertj/releases)
- [Commits](https://github.com/assertj/assertj/compare/assertj-build-3.25.3...assertj-build-3.26.0)

---
updated-dependencies:
- dependency-name: org.assertj:assertj-core
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-05-28 14:30:21 +02:00
dependabot[bot] 26dd155e2f build(deps): bump org.apache.commons:commons-compress
Bumps org.apache.commons:commons-compress from 1.26.1 to 1.26.2.

---
updated-dependencies:
- dependency-name: org.apache.commons:commons-compress
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-05-28 14:30:13 +02:00
dependabot[bot] 8002f5a746 build(deps): bump io.vertx:vertx-grpc from 4.5.7 to 4.5.8
Bumps io.vertx:vertx-grpc from 4.5.7 to 4.5.8.

---
updated-dependencies:
- dependency-name: io.vertx:vertx-grpc
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-05-28 14:29:58 +02:00
dependabot[bot] 6b22bd6770 build(deps): bump grpc from 1.63.0 to 1.64.0
Bumps `grpc` from 1.63.0 to 1.64.0.

Updates `io.grpc:grpc-core` from 1.63.0 to 1.64.0
- [Release notes](https://github.com/grpc/grpc-java/releases)
- [Commits](https://github.com/grpc/grpc-java/compare/v1.63.0...v1.64.0)

Updates `io.grpc:grpc-netty` from 1.63.0 to 1.64.0
- [Release notes](https://github.com/grpc/grpc-java/releases)
- [Commits](https://github.com/grpc/grpc-java/compare/v1.63.0...v1.64.0)

Updates `io.grpc:grpc-protobuf` from 1.63.0 to 1.64.0
- [Release notes](https://github.com/grpc/grpc-java/releases)
- [Commits](https://github.com/grpc/grpc-java/compare/v1.63.0...v1.64.0)

Updates `io.grpc:grpc-stub` from 1.63.0 to 1.64.0
- [Release notes](https://github.com/grpc/grpc-java/releases)
- [Commits](https://github.com/grpc/grpc-java/compare/v1.63.0...v1.64.0)

Updates `io.grpc:grpc-grpclb` from 1.63.0 to 1.64.0
- [Release notes](https://github.com/grpc/grpc-java/releases)
- [Commits](https://github.com/grpc/grpc-java/compare/v1.63.0...v1.64.0)

Updates `io.grpc:grpc-inprocess` from 1.63.0 to 1.64.0
- [Release notes](https://github.com/grpc/grpc-java/releases)
- [Commits](https://github.com/grpc/grpc-java/compare/v1.63.0...v1.64.0)

Updates `io.grpc:grpc-util` from 1.63.0 to 1.64.0
- [Release notes](https://github.com/grpc/grpc-java/releases)
- [Commits](https://github.com/grpc/grpc-java/compare/v1.63.0...v1.64.0)

---
updated-dependencies:
- dependency-name: io.grpc:grpc-core
  dependency-type: direct:production
  update-type: version-update:semver-minor
- dependency-name: io.grpc:grpc-netty
  dependency-type: direct:production
  update-type: version-update:semver-minor
- dependency-name: io.grpc:grpc-protobuf
  dependency-type: direct:production
  update-type: version-update:semver-minor
- dependency-name: io.grpc:grpc-stub
  dependency-type: direct:production
  update-type: version-update:semver-minor
- dependency-name: io.grpc:grpc-grpclb
  dependency-type: direct:production
  update-type: version-update:semver-minor
- dependency-name: io.grpc:grpc-inprocess
  dependency-type: direct:production
  update-type: version-update:semver-minor
- dependency-name: io.grpc:grpc-util
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-05-15 19:25:42 +02:00
dependabot[bot] 25096da986 build(deps): bump mockito from 5.11.0 to 5.12.0
Bumps `mockito` from 5.11.0 to 5.12.0.

Updates `org.mockito:mockito-core` from 5.11.0 to 5.12.0
- [Release notes](https://github.com/mockito/mockito/releases)
- [Commits](https://github.com/mockito/mockito/compare/v5.11.0...v5.12.0)

Updates `org.mockito:mockito-junit-jupiter` from 5.11.0 to 5.12.0
- [Release notes](https://github.com/mockito/mockito/releases)
- [Commits](https://github.com/mockito/mockito/compare/v5.11.0...v5.12.0)

---
updated-dependencies:
- dependency-name: org.mockito:mockito-core
  dependency-type: direct:production
  update-type: version-update:semver-minor
- dependency-name: org.mockito:mockito-junit-jupiter
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-05-14 14:05:40 +02:00
dependabot[bot] f58a8ff98e build(deps): bump org.testcontainers:testcontainers
Bumps [org.testcontainers:testcontainers](https://github.com/testcontainers/testcontainers-java) from 1.19.7 to 1.19.8.
- [Release notes](https://github.com/testcontainers/testcontainers-java/releases)
- [Changelog](https://github.com/testcontainers/testcontainers-java/blob/main/CHANGELOG.md)
- [Commits](https://github.com/testcontainers/testcontainers-java/compare/1.19.7...1.19.8)

---
updated-dependencies:
- dependency-name: org.testcontainers:testcontainers
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-05-14 14:05:30 +02:00
dependabot[bot] d7d6cec501 build(deps): bump info.picocli:picocli from 4.7.5 to 4.7.6
Bumps [info.picocli:picocli](https://github.com/remkop/picocli) from 4.7.5 to 4.7.6.
- [Release notes](https://github.com/remkop/picocli/releases)
- [Changelog](https://github.com/remkop/picocli/blob/main/RELEASE-NOTES.md)
- [Commits](https://github.com/remkop/picocli/compare/v4.7.5...v4.7.6)

---
updated-dependencies:
- dependency-name: info.picocli:picocli
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-05-14 14:05:20 +02:00
dependabot[bot] 83946aabe5 build(deps): bump com.google.guava:guava from 33.1.0-jre to 33.2.0-jre
Bumps [com.google.guava:guava](https://github.com/google/guava) from 33.1.0-jre to 33.2.0-jre.
- [Release notes](https://github.com/google/guava/releases)
- [Commits](https://github.com/google/guava/commits)

---
updated-dependencies:
- dependency-name: com.google.guava:guava
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-05-14 14:05:08 +02:00
dependabot[bot] 84d55279f3 build(deps): bump errorprone from 2.27.0 to 2.27.1
Bumps `errorprone` from 2.27.0 to 2.27.1.

Updates `com.google.errorprone:error_prone_core` from 2.27.0 to 2.27.1
- [Release notes](https://github.com/google/error-prone/releases)
- [Commits](https://github.com/google/error-prone/compare/v2.27.0...v2.27.1)

Updates `com.google.errorprone:error_prone_annotations` from 2.27.0 to 2.27.1
- [Release notes](https://github.com/google/error-prone/releases)
- [Commits](https://github.com/google/error-prone/compare/v2.27.0...v2.27.1)

---
updated-dependencies:
- dependency-name: com.google.errorprone:error_prone_core
  dependency-type: direct:production
  update-type: version-update:semver-patch
- dependency-name: com.google.errorprone:error_prone_annotations
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-05-14 14:04:51 +02:00
Giri Ramasamy 6d375c889d watcher: Expose isClosed method
Signed-off-by: Giri Ramasamy <46867712+giri-vsr@users.noreply.github.com>
2024-05-14 14:04:27 +02:00
dependabot[bot] cdd5cd9e17 build(deps): bump errorprone from 2.26.1 to 2.27.0
Bumps `errorprone` from 2.26.1 to 2.27.0.

Updates `com.google.errorprone:error_prone_core` from 2.26.1 to 2.27.0
- [Release notes](https://github.com/google/error-prone/releases)
- [Commits](https://github.com/google/error-prone/compare/v2.26.1...v2.27.0)

Updates `com.google.errorprone:error_prone_annotations` from 2.26.1 to 2.27.0
- [Release notes](https://github.com/google/error-prone/releases)
- [Commits](https://github.com/google/error-prone/compare/v2.26.1...v2.27.0)

---
updated-dependencies:
- dependency-name: com.google.errorprone:error_prone_core
  dependency-type: direct:production
  update-type: version-update:semver-minor
- dependency-name: com.google.errorprone:error_prone_annotations
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-04-29 11:19:51 +02:00
Luca Burgazzoli ff17ffc43d
chore: update to gradle 8.7 2024-04-17 09:56:39 +02:00
dependabot[bot] 3a00414754 build(deps): bump org.slf4j:slf4j-api from 2.0.12 to 2.0.13
Bumps org.slf4j:slf4j-api from 2.0.12 to 2.0.13.

---
updated-dependencies:
- dependency-name: org.slf4j:slf4j-api
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-04-16 09:10:06 +02:00
dependabot[bot] 5f133eae4d build(deps): bump commons-io:commons-io from 2.16.0 to 2.16.1
Bumps commons-io:commons-io from 2.16.0 to 2.16.1.

---
updated-dependencies:
- dependency-name: commons-io:commons-io
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-04-16 09:09:52 +02:00
dependabot[bot] 64852f4808 build(deps): bump grpc from 1.62.2 to 1.63.0
Bumps `grpc` from 1.62.2 to 1.63.0.

Updates `io.grpc:grpc-core` from 1.62.2 to 1.63.0
- [Release notes](https://github.com/grpc/grpc-java/releases)
- [Commits](https://github.com/grpc/grpc-java/compare/v1.62.2...v1.63.0)

Updates `io.grpc:grpc-netty` from 1.62.2 to 1.63.0
- [Release notes](https://github.com/grpc/grpc-java/releases)
- [Commits](https://github.com/grpc/grpc-java/compare/v1.62.2...v1.63.0)

Updates `io.grpc:grpc-protobuf` from 1.62.2 to 1.63.0
- [Release notes](https://github.com/grpc/grpc-java/releases)
- [Commits](https://github.com/grpc/grpc-java/compare/v1.62.2...v1.63.0)

Updates `io.grpc:grpc-stub` from 1.62.2 to 1.63.0
- [Release notes](https://github.com/grpc/grpc-java/releases)
- [Commits](https://github.com/grpc/grpc-java/compare/v1.62.2...v1.63.0)

Updates `io.grpc:grpc-grpclb` from 1.62.2 to 1.63.0
- [Release notes](https://github.com/grpc/grpc-java/releases)
- [Commits](https://github.com/grpc/grpc-java/compare/v1.62.2...v1.63.0)

Updates `io.grpc:grpc-inprocess` from 1.62.2 to 1.63.0
- [Release notes](https://github.com/grpc/grpc-java/releases)
- [Commits](https://github.com/grpc/grpc-java/compare/v1.62.2...v1.63.0)

Updates `io.grpc:grpc-util` from 1.62.2 to 1.63.0
- [Release notes](https://github.com/grpc/grpc-java/releases)
- [Commits](https://github.com/grpc/grpc-java/compare/v1.62.2...v1.63.0)

---
updated-dependencies:
- dependency-name: io.grpc:grpc-core
  dependency-type: direct:production
  update-type: version-update:semver-minor
- dependency-name: io.grpc:grpc-netty
  dependency-type: direct:production
  update-type: version-update:semver-minor
- dependency-name: io.grpc:grpc-protobuf
  dependency-type: direct:production
  update-type: version-update:semver-minor
- dependency-name: io.grpc:grpc-stub
  dependency-type: direct:production
  update-type: version-update:semver-minor
- dependency-name: io.grpc:grpc-grpclb
  dependency-type: direct:production
  update-type: version-update:semver-minor
- dependency-name: io.grpc:grpc-inprocess
  dependency-type: direct:production
  update-type: version-update:semver-minor
- dependency-name: io.grpc:grpc-util
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-04-08 14:35:29 +02:00
rmarian c7cb8c6657 core: update errors retryable condition.
Format affected source files.

Fixes etcd-io#1344.

Signed-off-by: rmarian <marianradu12@gmail.com>
2024-04-03 08:03:37 +02:00
rmarian 8e1749e116 core: update errors retryable condition.
Retry request in case of auth store revision old error from server

Fixes #1344.

Signed-off-by: rmarian <marianradu12@gmail.com>
2024-04-03 08:03:37 +02:00
dependabot[bot] 8090e42c1e build(deps): bump commons-io:commons-io from 2.15.1 to 2.16.0
Bumps commons-io:commons-io from 2.15.1 to 2.16.0.

---
updated-dependencies:
- dependency-name: commons-io:commons-io
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-03-30 17:32:15 +01:00
dependabot[bot] f233eede35 build(deps): bump io.vertx:vertx-grpc from 4.5.5 to 4.5.7
Bumps io.vertx:vertx-grpc from 4.5.5 to 4.5.7.

---
updated-dependencies:
- dependency-name: io.vertx:vertx-grpc
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-03-30 17:32:06 +01:00
dependabot[bot] 9130dcd292 build(deps): bump org.awaitility:awaitility from 4.2.0 to 4.2.1
Bumps [org.awaitility:awaitility](https://github.com/awaitility/awaitility) from 4.2.0 to 4.2.1.
- [Changelog](https://github.com/awaitility/awaitility/blob/master/changelog.txt)
- [Commits](https://github.com/awaitility/awaitility/compare/awaitility-4.2.0...awaitility-4.2.1)

---
updated-dependencies:
- dependency-name: org.awaitility:awaitility
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-03-17 19:24:12 +01:00
Cristian Ferretti 2398ebd24c Retry auth failures and require leader in ElectionImpl.
Signed-off-by: Cristian Ferretti <jcferretti2020@gmail.com>
2024-03-17 18:59:00 +01:00
dependabot[bot] 2cd129352a build(deps): bump io.vertx:vertx-grpc from 4.5.4 to 4.5.5
Bumps io.vertx:vertx-grpc from 4.5.4 to 4.5.5.

---
updated-dependencies:
- dependency-name: io.vertx:vertx-grpc
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-03-15 16:29:57 +01:00
dependabot[bot] f5d9aa7ba5 build(deps): bump com.google.guava:guava from 33.0.0-jre to 33.1.0-jre
Bumps [com.google.guava:guava](https://github.com/google/guava) from 33.0.0-jre to 33.1.0-jre.
- [Release notes](https://github.com/google/guava/releases)
- [Commits](https://github.com/google/guava/commits)

---
updated-dependencies:
- dependency-name: com.google.guava:guava
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-03-15 08:45:43 +01:00
dependabot[bot] d46860b85e build(deps): bump errorprone from 2.25.0 to 2.26.1
Bumps `errorprone` from 2.25.0 to 2.26.1.

Updates `com.google.errorprone:error_prone_core` from 2.25.0 to 2.26.1
- [Release notes](https://github.com/google/error-prone/releases)
- [Commits](https://github.com/google/error-prone/compare/v2.25.0...v2.26.1)

Updates `com.google.errorprone:error_prone_annotations` from 2.25.0 to 2.26.1
- [Release notes](https://github.com/google/error-prone/releases)
- [Commits](https://github.com/google/error-prone/compare/v2.25.0...v2.26.1)

---
updated-dependencies:
- dependency-name: com.google.errorprone:error_prone_core
  dependency-type: direct:production
  update-type: version-update:semver-minor
- dependency-name: com.google.errorprone:error_prone_annotations
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-03-15 08:44:47 +01:00
dependabot[bot] 51f38b50a1 build(deps): bump org.apache.commons:commons-compress
Bumps org.apache.commons:commons-compress from 1.26.0 to 1.26.1.

---
updated-dependencies:
- dependency-name: org.apache.commons:commons-compress
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-03-12 08:52:27 +01:00
dependabot[bot] 3625d1e505 build(deps): bump log4j from 2.23.0 to 2.23.1
Bumps `log4j` from 2.23.0 to 2.23.1.

Updates `org.apache.logging.log4j:log4j-api` from 2.23.0 to 2.23.1

Updates `org.apache.logging.log4j:log4j-core` from 2.23.0 to 2.23.1

Updates `org.apache.logging.log4j:log4j-slf4j2-impl` from 2.23.0 to 2.23.1

Updates `org.apache.logging.log4j:log4j-1.2-api` from 2.23.0 to 2.23.1

---
updated-dependencies:
- dependency-name: org.apache.logging.log4j:log4j-api
  dependency-type: direct:production
  update-type: version-update:semver-patch
- dependency-name: org.apache.logging.log4j:log4j-core
  dependency-type: direct:production
  update-type: version-update:semver-patch
- dependency-name: org.apache.logging.log4j:log4j-slf4j2-impl
  dependency-type: direct:production
  update-type: version-update:semver-patch
- dependency-name: org.apache.logging.log4j:log4j-1.2-api
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-03-12 08:52:17 +01:00
dependabot[bot] 1054fc22a5 build(deps): bump org.testcontainers:testcontainers
Bumps [org.testcontainers:testcontainers](https://github.com/testcontainers/testcontainers-java) from 1.19.6 to 1.19.7.
- [Release notes](https://github.com/testcontainers/testcontainers-java/releases)
- [Changelog](https://github.com/testcontainers/testcontainers-java/blob/main/CHANGELOG.md)
- [Commits](https://github.com/testcontainers/testcontainers-java/compare/1.19.6...1.19.7)

---
updated-dependencies:
- dependency-name: org.testcontainers:testcontainers
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-03-09 08:59:39 +01:00
tunefun 948aa67cc4 election,lease,maintenance,watch: Register handlers before request
Fixes #1308

Signed-off-by: tunefun <965728225@qq.com>
2024-03-09 08:59:15 +01:00
Cristian Ferretti ae0e54035b Switch default load balancer policy to round_robin 2024-03-09 08:51:03 +01:00
tunefun 10b07f508c lease: Exceptions of lease keepAlive can be perceived
Fixes #1322

Signed-off-by: tunefun <965728225@qq.com>
2024-03-05 14:11:51 +01:00
dependabot[bot] 4274990a7a build(deps): bump mockito from 5.10.0 to 5.11.0
Bumps `mockito` from 5.10.0 to 5.11.0.

Updates `org.mockito:mockito-core` from 5.10.0 to 5.11.0
- [Release notes](https://github.com/mockito/mockito/releases)
- [Commits](https://github.com/mockito/mockito/compare/v5.10.0...v5.11.0)

Updates `org.mockito:mockito-junit-jupiter` from 5.10.0 to 5.11.0
- [Release notes](https://github.com/mockito/mockito/releases)
- [Commits](https://github.com/mockito/mockito/compare/v5.10.0...v5.11.0)

---
updated-dependencies:
- dependency-name: org.mockito:mockito-core
  dependency-type: direct:production
  update-type: version-update:semver-minor
- dependency-name: org.mockito:mockito-junit-jupiter
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-03-05 09:56:06 +01:00
dependabot[bot] 47ca2ba98c build(deps): bump grpc from 1.61.1 to 1.62.2
Bumps `grpc` from 1.61.1 to 1.62.2.

Updates `io.grpc:grpc-core` from 1.61.1 to 1.62.2
- [Release notes](https://github.com/grpc/grpc-java/releases)
- [Commits](https://github.com/grpc/grpc-java/compare/v1.61.1...v1.62.2)

Updates `io.grpc:grpc-netty` from 1.61.1 to 1.62.2
- [Release notes](https://github.com/grpc/grpc-java/releases)
- [Commits](https://github.com/grpc/grpc-java/compare/v1.61.1...v1.62.2)

Updates `io.grpc:grpc-protobuf` from 1.61.1 to 1.62.2
- [Release notes](https://github.com/grpc/grpc-java/releases)
- [Commits](https://github.com/grpc/grpc-java/compare/v1.61.1...v1.62.2)

Updates `io.grpc:grpc-stub` from 1.61.1 to 1.62.2
- [Release notes](https://github.com/grpc/grpc-java/releases)
- [Commits](https://github.com/grpc/grpc-java/compare/v1.61.1...v1.62.2)

Updates `io.grpc:grpc-grpclb` from 1.61.1 to 1.62.2
- [Release notes](https://github.com/grpc/grpc-java/releases)
- [Commits](https://github.com/grpc/grpc-java/compare/v1.61.1...v1.62.2)

Updates `io.grpc:grpc-inprocess` from 1.61.1 to 1.62.2
- [Release notes](https://github.com/grpc/grpc-java/releases)
- [Commits](https://github.com/grpc/grpc-java/compare/v1.61.1...v1.62.2)

Updates `io.grpc:grpc-util` from 1.61.1 to 1.62.2
- [Release notes](https://github.com/grpc/grpc-java/releases)
- [Commits](https://github.com/grpc/grpc-java/compare/v1.61.1...v1.62.2)

---
updated-dependencies:
- dependency-name: io.grpc:grpc-core
  dependency-type: direct:production
  update-type: version-update:semver-minor
- dependency-name: io.grpc:grpc-netty
  dependency-type: direct:production
  update-type: version-update:semver-minor
- dependency-name: io.grpc:grpc-protobuf
  dependency-type: direct:production
  update-type: version-update:semver-minor
- dependency-name: io.grpc:grpc-stub
  dependency-type: direct:production
  update-type: version-update:semver-minor
- dependency-name: io.grpc:grpc-grpclb
  dependency-type: direct:production
  update-type: version-update:semver-minor
- dependency-name: io.grpc:grpc-inprocess
  dependency-type: direct:production
  update-type: version-update:semver-minor
- dependency-name: io.grpc:grpc-util
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-03-05 09:55:57 +01:00
dependabot[bot] c184f37c36 build(deps): bump log4j from 2.22.1 to 2.23.0
Bumps `log4j` from 2.22.1 to 2.23.0.

Updates `org.apache.logging.log4j:log4j-api` from 2.22.1 to 2.23.0

Updates `org.apache.logging.log4j:log4j-core` from 2.22.1 to 2.23.0

Updates `org.apache.logging.log4j:log4j-slf4j2-impl` from 2.22.1 to 2.23.0

Updates `org.apache.logging.log4j:log4j-1.2-api` from 2.22.1 to 2.23.0

---
updated-dependencies:
- dependency-name: org.apache.logging.log4j:log4j-api
  dependency-type: direct:production
  update-type: version-update:semver-minor
- dependency-name: org.apache.logging.log4j:log4j-core
  dependency-type: direct:production
  update-type: version-update:semver-minor
- dependency-name: org.apache.logging.log4j:log4j-slf4j2-impl
  dependency-type: direct:production
  update-type: version-update:semver-minor
- dependency-name: org.apache.logging.log4j:log4j-1.2-api
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-02-22 23:56:23 +01:00
dependabot[bot] dbf9761486 build(deps): bump errorprone from 2.24.1 to 2.25.0
Bumps `errorprone` from 2.24.1 to 2.25.0.

Updates `com.google.errorprone:error_prone_core` from 2.24.1 to 2.25.0
- [Release notes](https://github.com/google/error-prone/releases)
- [Commits](https://github.com/google/error-prone/compare/v2.24.1...v2.25.0)

Updates `com.google.errorprone:error_prone_annotations` from 2.24.1 to 2.25.0
- [Release notes](https://github.com/google/error-prone/releases)
- [Commits](https://github.com/google/error-prone/compare/v2.24.1...v2.25.0)

---
updated-dependencies:
- dependency-name: com.google.errorprone:error_prone_core
  dependency-type: direct:production
  update-type: version-update:semver-minor
- dependency-name: com.google.errorprone:error_prone_annotations
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-02-22 23:56:10 +01:00
dependabot[bot] ee171cd43d build(deps): bump org.apache.commons:commons-compress
Bumps org.apache.commons:commons-compress from 1.25.0 to 1.26.0.

---
updated-dependencies:
- dependency-name: org.apache.commons:commons-compress
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-02-22 23:56:01 +01:00
dependabot[bot] cb77344660 build(deps): bump org.testcontainers:testcontainers
Bumps [org.testcontainers:testcontainers](https://github.com/testcontainers/testcontainers-java) from 1.19.5 to 1.19.6.
- [Release notes](https://github.com/testcontainers/testcontainers-java/releases)
- [Changelog](https://github.com/testcontainers/testcontainers-java/blob/main/CHANGELOG.md)
- [Commits](https://github.com/testcontainers/testcontainers-java/compare/1.19.5...1.19.6)

---
updated-dependencies:
- dependency-name: org.testcontainers:testcontainers
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-02-22 23:54:20 +01:00
dependabot[bot] 77bb3a9afd build(deps): bump org.testcontainers:testcontainers
Bumps [org.testcontainers:testcontainers](https://github.com/testcontainers/testcontainers-java) from 1.19.4 to 1.19.5.
- [Release notes](https://github.com/testcontainers/testcontainers-java/releases)
- [Changelog](https://github.com/testcontainers/testcontainers-java/blob/main/CHANGELOG.md)
- [Commits](https://github.com/testcontainers/testcontainers-java/compare/1.19.4...1.19.5)

---
updated-dependencies:
- dependency-name: org.testcontainers:testcontainers
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-02-09 14:28:34 +01:00
dependabot[bot] 0fa9f1e4e2 build(deps): bump org.junit.jupiter:junit-jupiter from 5.10.1 to 5.10.2
Bumps [org.junit.jupiter:junit-jupiter](https://github.com/junit-team/junit5) from 5.10.1 to 5.10.2.
- [Release notes](https://github.com/junit-team/junit5/releases)
- [Commits](https://github.com/junit-team/junit5/compare/r5.10.1...r5.10.2)

---
updated-dependencies:
- dependency-name: org.junit.jupiter:junit-jupiter
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-02-09 14:08:53 +01:00
dependabot[bot] 25ac1996bd build(deps): bump org.slf4j:slf4j-api from 2.0.11 to 2.0.12
Bumps org.slf4j:slf4j-api from 2.0.11 to 2.0.12.

---
updated-dependencies:
- dependency-name: org.slf4j:slf4j-api
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-02-09 14:08:46 +01:00
dependabot[bot] 5226f2c676 build(deps): bump io.vertx:vertx-grpc from 4.5.1 to 4.5.3
Bumps io.vertx:vertx-grpc from 4.5.1 to 4.5.3.

---
updated-dependencies:
- dependency-name: io.vertx:vertx-grpc
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-02-07 07:44:51 +01:00
dependabot[bot] 163d9504ca build(deps): bump org.assertj:assertj-core from 3.25.1 to 3.25.3
Bumps [org.assertj:assertj-core](https://github.com/assertj/assertj) from 3.25.1 to 3.25.3.
- [Release notes](https://github.com/assertj/assertj/releases)
- [Commits](https://github.com/assertj/assertj/compare/assertj-build-3.25.1...assertj-build-3.25.3)

---
updated-dependencies:
- dependency-name: org.assertj:assertj-core
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-02-07 07:44:43 +01:00
dependabot[bot] 78a4939b02 build(deps): bump grpc from 1.61.0 to 1.61.1
Bumps `grpc` from 1.61.0 to 1.61.1.

Updates `io.grpc:grpc-core` from 1.61.0 to 1.61.1
- [Release notes](https://github.com/grpc/grpc-java/releases)
- [Commits](https://github.com/grpc/grpc-java/compare/v1.61.0...v1.61.1)

Updates `io.grpc:grpc-netty` from 1.61.0 to 1.61.1
- [Release notes](https://github.com/grpc/grpc-java/releases)
- [Commits](https://github.com/grpc/grpc-java/compare/v1.61.0...v1.61.1)

Updates `io.grpc:grpc-protobuf` from 1.61.0 to 1.61.1
- [Release notes](https://github.com/grpc/grpc-java/releases)
- [Commits](https://github.com/grpc/grpc-java/compare/v1.61.0...v1.61.1)

Updates `io.grpc:grpc-stub` from 1.61.0 to 1.61.1
- [Release notes](https://github.com/grpc/grpc-java/releases)
- [Commits](https://github.com/grpc/grpc-java/compare/v1.61.0...v1.61.1)

Updates `io.grpc:grpc-grpclb` from 1.61.0 to 1.61.1
- [Release notes](https://github.com/grpc/grpc-java/releases)
- [Commits](https://github.com/grpc/grpc-java/compare/v1.61.0...v1.61.1)

Updates `io.grpc:grpc-inprocess` from 1.61.0 to 1.61.1
- [Release notes](https://github.com/grpc/grpc-java/releases)
- [Commits](https://github.com/grpc/grpc-java/compare/v1.61.0...v1.61.1)

Updates `io.grpc:grpc-util` from 1.61.0 to 1.61.1
- [Release notes](https://github.com/grpc/grpc-java/releases)
- [Commits](https://github.com/grpc/grpc-java/compare/v1.61.0...v1.61.1)

---
updated-dependencies:
- dependency-name: io.grpc:grpc-core
  dependency-type: direct:production
  update-type: version-update:semver-patch
- dependency-name: io.grpc:grpc-netty
  dependency-type: direct:production
  update-type: version-update:semver-patch
- dependency-name: io.grpc:grpc-protobuf
  dependency-type: direct:production
  update-type: version-update:semver-patch
- dependency-name: io.grpc:grpc-stub
  dependency-type: direct:production
  update-type: version-update:semver-patch
- dependency-name: io.grpc:grpc-grpclb
  dependency-type: direct:production
  update-type: version-update:semver-patch
- dependency-name: io.grpc:grpc-inprocess
  dependency-type: direct:production
  update-type: version-update:semver-patch
- dependency-name: io.grpc:grpc-util
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-02-07 07:44:34 +01:00
dependabot[bot] 8d9e0004e8 build(deps): bump mockito from 5.9.0 to 5.10.0
Bumps `mockito` from 5.9.0 to 5.10.0.

Updates `org.mockito:mockito-core` from 5.9.0 to 5.10.0
- [Release notes](https://github.com/mockito/mockito/releases)
- [Commits](https://github.com/mockito/mockito/compare/v5.9.0...v5.10.0)

Updates `org.mockito:mockito-junit-jupiter` from 5.9.0 to 5.10.0
- [Release notes](https://github.com/mockito/mockito/releases)
- [Commits](https://github.com/mockito/mockito/compare/v5.9.0...v5.10.0)

---
updated-dependencies:
- dependency-name: org.mockito:mockito-core
  dependency-type: direct:production
  update-type: version-update:semver-minor
- dependency-name: org.mockito:mockito-junit-jupiter
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-02-07 07:44:25 +01:00
dependabot[bot] 3ca756983c build(deps): bump org.testcontainers:testcontainers
Bumps [org.testcontainers:testcontainers](https://github.com/testcontainers/testcontainers-java) from 1.19.3 to 1.19.4.
- [Release notes](https://github.com/testcontainers/testcontainers-java/releases)
- [Changelog](https://github.com/testcontainers/testcontainers-java/blob/main/CHANGELOG.md)
- [Commits](https://github.com/testcontainers/testcontainers-java/compare/1.19.3...1.19.4)

---
updated-dependencies:
- dependency-name: org.testcontainers:testcontainers
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-02-07 07:44:14 +01:00
dependabot[bot] 7891e67977 build(deps): bump actions/dependency-review-action from 3 to 4
Bumps [actions/dependency-review-action](https://github.com/actions/dependency-review-action) from 3 to 4.
- [Release notes](https://github.com/actions/dependency-review-action/releases)
- [Commits](https://github.com/actions/dependency-review-action/compare/v3...v4)

---
updated-dependencies:
- dependency-name: actions/dependency-review-action
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-02-07 07:44:02 +01:00
Lan Liang 47598152b3 Update compile version to java11.
Signed-off-by: Lan Liang <gcslyp@gmail.com>
2024-01-16 09:28:22 +01:00
dependabot[bot] c916beff8c build(deps): bump mockito from 5.8.0 to 5.9.0
Bumps `mockito` from 5.8.0 to 5.9.0.

Updates `org.mockito:mockito-core` from 5.8.0 to 5.9.0
- [Release notes](https://github.com/mockito/mockito/releases)
- [Commits](https://github.com/mockito/mockito/compare/v5.8.0...v5.9.0)

Updates `org.mockito:mockito-junit-jupiter` from 5.8.0 to 5.9.0
- [Release notes](https://github.com/mockito/mockito/releases)
- [Commits](https://github.com/mockito/mockito/compare/v5.8.0...v5.9.0)

---
updated-dependencies:
- dependency-name: org.mockito:mockito-core
  dependency-type: direct:production
  update-type: version-update:semver-minor
- dependency-name: org.mockito:mockito-junit-jupiter
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-01-15 21:36:06 +01:00
dependabot[bot] d55aa8923c build(deps): bump grpc from 1.60.1 to 1.61.0
Bumps `grpc` from 1.60.1 to 1.61.0.

Updates `io.grpc:grpc-core` from 1.60.1 to 1.61.0
- [Release notes](https://github.com/grpc/grpc-java/releases)
- [Commits](https://github.com/grpc/grpc-java/compare/v1.60.1...v1.61.0)

Updates `io.grpc:grpc-netty` from 1.60.1 to 1.61.0
- [Release notes](https://github.com/grpc/grpc-java/releases)
- [Commits](https://github.com/grpc/grpc-java/compare/v1.60.1...v1.61.0)

Updates `io.grpc:grpc-protobuf` from 1.60.1 to 1.61.0
- [Release notes](https://github.com/grpc/grpc-java/releases)
- [Commits](https://github.com/grpc/grpc-java/compare/v1.60.1...v1.61.0)

Updates `io.grpc:grpc-stub` from 1.60.1 to 1.61.0
- [Release notes](https://github.com/grpc/grpc-java/releases)
- [Commits](https://github.com/grpc/grpc-java/compare/v1.60.1...v1.61.0)

Updates `io.grpc:grpc-grpclb` from 1.60.1 to 1.61.0
- [Release notes](https://github.com/grpc/grpc-java/releases)
- [Commits](https://github.com/grpc/grpc-java/compare/v1.60.1...v1.61.0)

Updates `io.grpc:grpc-inprocess` from 1.60.1 to 1.61.0
- [Release notes](https://github.com/grpc/grpc-java/releases)
- [Commits](https://github.com/grpc/grpc-java/compare/v1.60.1...v1.61.0)

Updates `io.grpc:grpc-util` from 1.60.1 to 1.61.0
- [Release notes](https://github.com/grpc/grpc-java/releases)
- [Commits](https://github.com/grpc/grpc-java/compare/v1.60.1...v1.61.0)

---
updated-dependencies:
- dependency-name: io.grpc:grpc-core
  dependency-type: direct:production
  update-type: version-update:semver-minor
- dependency-name: io.grpc:grpc-netty
  dependency-type: direct:production
  update-type: version-update:semver-minor
- dependency-name: io.grpc:grpc-protobuf
  dependency-type: direct:production
  update-type: version-update:semver-minor
- dependency-name: io.grpc:grpc-stub
  dependency-type: direct:production
  update-type: version-update:semver-minor
- dependency-name: io.grpc:grpc-grpclb
  dependency-type: direct:production
  update-type: version-update:semver-minor
- dependency-name: io.grpc:grpc-inprocess
  dependency-type: direct:production
  update-type: version-update:semver-minor
- dependency-name: io.grpc:grpc-util
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-01-12 20:14:49 +01:00
dependabot[bot] 85a9a54c3f build(deps): bump errorprone from 2.24.0 to 2.24.1
Bumps `errorprone` from 2.24.0 to 2.24.1.

Updates `com.google.errorprone:error_prone_core` from 2.24.0 to 2.24.1
- [Release notes](https://github.com/google/error-prone/releases)
- [Commits](https://github.com/google/error-prone/compare/v2.24.0...v2.24.1)

Updates `com.google.errorprone:error_prone_annotations` from 2.24.0 to 2.24.1
- [Release notes](https://github.com/google/error-prone/releases)
- [Commits](https://github.com/google/error-prone/compare/v2.24.0...v2.24.1)

---
updated-dependencies:
- dependency-name: com.google.errorprone:error_prone_core
  dependency-type: direct:production
  update-type: version-update:semver-patch
- dependency-name: com.google.errorprone:error_prone_annotations
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-01-09 21:11:58 +01:00
dependabot[bot] 287a62d2db build(deps): bump log4j from 2.22.0 to 2.22.1
Bumps `log4j` from 2.22.0 to 2.22.1.

Updates `org.apache.logging.log4j:log4j-api` from 2.22.0 to 2.22.1

Updates `org.apache.logging.log4j:log4j-core` from 2.22.0 to 2.22.1

Updates `org.apache.logging.log4j:log4j-slf4j2-impl` from 2.22.0 to 2.22.1

Updates `org.apache.logging.log4j:log4j-1.2-api` from 2.22.0 to 2.22.1

---
updated-dependencies:
- dependency-name: org.apache.logging.log4j:log4j-api
  dependency-type: direct:production
  update-type: version-update:semver-patch
- dependency-name: org.apache.logging.log4j:log4j-core
  dependency-type: direct:production
  update-type: version-update:semver-patch
- dependency-name: org.apache.logging.log4j:log4j-slf4j2-impl
  dependency-type: direct:production
  update-type: version-update:semver-patch
- dependency-name: org.apache.logging.log4j:log4j-1.2-api
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-01-08 20:51:09 +01:00
dependabot[bot] c0114ef977 build(deps): bump org.slf4j:slf4j-api from 2.0.9 to 2.0.11
Bumps org.slf4j:slf4j-api from 2.0.9 to 2.0.11.

---
updated-dependencies:
- dependency-name: org.slf4j:slf4j-api
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-01-08 20:36:03 +01:00
dependabot[bot] 312cf24163 build(deps): bump org.assertj:assertj-core from 3.24.2 to 3.25.1
Bumps [org.assertj:assertj-core](https://github.com/assertj/assertj) from 3.24.2 to 3.25.1.
- [Release notes](https://github.com/assertj/assertj/releases)
- [Commits](https://github.com/assertj/assertj/compare/assertj-build-3.24.2...assertj-build-3.25.1)

---
updated-dependencies:
- dependency-name: org.assertj:assertj-core
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-01-08 20:35:06 +01:00
dependabot[bot] 4c9c705731 build(deps): bump grpc from 1.60.0 to 1.60.1
Bumps `grpc` from 1.60.0 to 1.60.1.

Updates `io.grpc:grpc-core` from 1.60.0 to 1.60.1
- [Release notes](https://github.com/grpc/grpc-java/releases)
- [Commits](https://github.com/grpc/grpc-java/compare/v1.60.0...v1.60.1)

Updates `io.grpc:grpc-netty` from 1.60.0 to 1.60.1
- [Release notes](https://github.com/grpc/grpc-java/releases)
- [Commits](https://github.com/grpc/grpc-java/compare/v1.60.0...v1.60.1)

Updates `io.grpc:grpc-protobuf` from 1.60.0 to 1.60.1
- [Release notes](https://github.com/grpc/grpc-java/releases)
- [Commits](https://github.com/grpc/grpc-java/compare/v1.60.0...v1.60.1)

Updates `io.grpc:grpc-stub` from 1.60.0 to 1.60.1
- [Release notes](https://github.com/grpc/grpc-java/releases)
- [Commits](https://github.com/grpc/grpc-java/compare/v1.60.0...v1.60.1)

Updates `io.grpc:grpc-grpclb` from 1.60.0 to 1.60.1
- [Release notes](https://github.com/grpc/grpc-java/releases)
- [Commits](https://github.com/grpc/grpc-java/compare/v1.60.0...v1.60.1)

Updates `io.grpc:grpc-inprocess` from 1.60.0 to 1.60.1
- [Release notes](https://github.com/grpc/grpc-java/releases)
- [Commits](https://github.com/grpc/grpc-java/compare/v1.60.0...v1.60.1)

Updates `io.grpc:grpc-util` from 1.60.0 to 1.60.1
- [Release notes](https://github.com/grpc/grpc-java/releases)
- [Commits](https://github.com/grpc/grpc-java/compare/v1.60.0...v1.60.1)

---
updated-dependencies:
- dependency-name: io.grpc:grpc-core
  dependency-type: direct:production
  update-type: version-update:semver-patch
- dependency-name: io.grpc:grpc-netty
  dependency-type: direct:production
  update-type: version-update:semver-patch
- dependency-name: io.grpc:grpc-protobuf
  dependency-type: direct:production
  update-type: version-update:semver-patch
- dependency-name: io.grpc:grpc-stub
  dependency-type: direct:production
  update-type: version-update:semver-patch
- dependency-name: io.grpc:grpc-grpclb
  dependency-type: direct:production
  update-type: version-update:semver-patch
- dependency-name: io.grpc:grpc-inprocess
  dependency-type: direct:production
  update-type: version-update:semver-patch
- dependency-name: io.grpc:grpc-util
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-01-08 20:34:42 +01:00
dependabot[bot] 3820950960 build(deps): bump errorprone from 2.23.0 to 2.24.0
Bumps `errorprone` from 2.23.0 to 2.24.0.

Updates `com.google.errorprone:error_prone_core` from 2.23.0 to 2.24.0
- [Release notes](https://github.com/google/error-prone/releases)
- [Commits](https://github.com/google/error-prone/compare/v2.23.0...v2.24.0)

Updates `com.google.errorprone:error_prone_annotations` from 2.23.0 to 2.24.0
- [Release notes](https://github.com/google/error-prone/releases)
- [Commits](https://github.com/google/error-prone/compare/v2.23.0...v2.24.0)

---
updated-dependencies:
- dependency-name: com.google.errorprone:error_prone_core
  dependency-type: direct:production
  update-type: version-update:semver-minor
- dependency-name: com.google.errorprone:error_prone_annotations
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-01-08 20:34:00 +01:00
Luca Burgazzoli 4bd5d5a21c
Update README 2023-12-19 20:47:32 +01:00
dependabot[bot] 93ca59af7d build(deps): bump com.google.guava:guava from 32.1.3-jre to 33.0.0-jre
Bumps [com.google.guava:guava](https://github.com/google/guava) from 32.1.3-jre to 33.0.0-jre.
- [Release notes](https://github.com/google/guava/releases)
- [Commits](https://github.com/google/guava/commits)

---
updated-dependencies:
- dependency-name: com.google.guava:guava
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-12-19 20:24:30 +01:00
Luca Burgazzoli 9411dc2dc1 update dependencies
Signed-off-by: Luca Burgazzoli <lburgazzoli@gmail.com>
2023-12-15 09:11:41 +01:00
dependabot[bot] ca13d1a205 build(deps): bump io.rest-assured:rest-assured from 5.3.2 to 5.4.0
Bumps [io.rest-assured:rest-assured](https://github.com/rest-assured/rest-assured) from 5.3.2 to 5.4.0.
- [Changelog](https://github.com/rest-assured/rest-assured/blob/master/changelog.txt)
- [Commits](https://github.com/rest-assured/rest-assured/commits/rest-assured-5.4.0)

---
updated-dependencies:
- dependency-name: io.rest-assured:rest-assured
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-12-14 09:20:14 +01:00
dependabot[bot] 433ea80345 build(deps): bump actions/stale from 8 to 9
Bumps [actions/stale](https://github.com/actions/stale) from 8 to 9.
- [Release notes](https://github.com/actions/stale/releases)
- [Changelog](https://github.com/actions/stale/blob/main/CHANGELOG.md)
- [Commits](https://github.com/actions/stale/compare/v8...v9)

---
updated-dependencies:
- dependency-name: actions/stale
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-12-14 08:59:12 +01:00
Giri Ramasamy 3d662958c5 watcher: Register Exception Handler before watch request
Signed-off-by: Giri Ramasamy <46867712+giri-vsr@users.noreply.github.com>
2023-12-14 08:44:31 +01:00
John Jiang e3c0a46349 build: Upgrade Gradle to 8.5
Signed-off-by: John Jiang <john.sha.jiang@gmail.com>
2023-12-06 09:45:17 +01:00
dependabot[bot] edec87e344 build(deps): bump commons-io:commons-io from 2.15.0 to 2.15.1
Bumps commons-io:commons-io from 2.15.0 to 2.15.1.

---
updated-dependencies:
- dependency-name: commons-io:commons-io
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-12-06 09:25:50 +01:00
dependabot[bot] 670b6e48a8 build(deps): bump mockito from 5.7.0 to 5.8.0
Bumps `mockito` from 5.7.0 to 5.8.0.

Updates `org.mockito:mockito-core` from 5.7.0 to 5.8.0
- [Release notes](https://github.com/mockito/mockito/releases)
- [Commits](https://github.com/mockito/mockito/compare/v5.7.0...v5.8.0)

Updates `org.mockito:mockito-junit-jupiter` from 5.7.0 to 5.8.0
- [Release notes](https://github.com/mockito/mockito/releases)
- [Commits](https://github.com/mockito/mockito/compare/v5.7.0...v5.8.0)

---
updated-dependencies:
- dependency-name: org.mockito:mockito-core
  dependency-type: direct:production
  update-type: version-update:semver-minor
- dependency-name: org.mockito:mockito-junit-jupiter
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-12-06 09:25:43 +01:00
dependabot[bot] 60eb6b2ccb build(deps): bump grpc from 1.59.0 to 1.60.0
Bumps `grpc` from 1.59.0 to 1.60.0.

Updates `io.grpc:grpc-core` from 1.59.0 to 1.60.0
- [Release notes](https://github.com/grpc/grpc-java/releases)
- [Commits](https://github.com/grpc/grpc-java/compare/v1.59.0...v1.60.0)

Updates `io.grpc:grpc-netty` from 1.59.0 to 1.60.0
- [Release notes](https://github.com/grpc/grpc-java/releases)
- [Commits](https://github.com/grpc/grpc-java/compare/v1.59.0...v1.60.0)

Updates `io.grpc:grpc-protobuf` from 1.59.0 to 1.60.0
- [Release notes](https://github.com/grpc/grpc-java/releases)
- [Commits](https://github.com/grpc/grpc-java/compare/v1.59.0...v1.60.0)

Updates `io.grpc:grpc-stub` from 1.59.0 to 1.60.0
- [Release notes](https://github.com/grpc/grpc-java/releases)
- [Commits](https://github.com/grpc/grpc-java/compare/v1.59.0...v1.60.0)

Updates `io.grpc:grpc-grpclb` from 1.59.0 to 1.60.0
- [Release notes](https://github.com/grpc/grpc-java/releases)
- [Commits](https://github.com/grpc/grpc-java/compare/v1.59.0...v1.60.0)

Updates `io.grpc:grpc-inprocess` from 1.59.0 to 1.60.0
- [Release notes](https://github.com/grpc/grpc-java/releases)
- [Commits](https://github.com/grpc/grpc-java/compare/v1.59.0...v1.60.0)

Updates `io.grpc:grpc-util` from 1.59.0 to 1.60.0
- [Release notes](https://github.com/grpc/grpc-java/releases)
- [Commits](https://github.com/grpc/grpc-java/compare/v1.59.0...v1.60.0)

---
updated-dependencies:
- dependency-name: io.grpc:grpc-core
  dependency-type: direct:production
  update-type: version-update:semver-minor
- dependency-name: io.grpc:grpc-netty
  dependency-type: direct:production
  update-type: version-update:semver-minor
- dependency-name: io.grpc:grpc-protobuf
  dependency-type: direct:production
  update-type: version-update:semver-minor
- dependency-name: io.grpc:grpc-stub
  dependency-type: direct:production
  update-type: version-update:semver-minor
- dependency-name: io.grpc:grpc-grpclb
  dependency-type: direct:production
  update-type: version-update:semver-minor
- dependency-name: io.grpc:grpc-inprocess
  dependency-type: direct:production
  update-type: version-update:semver-minor
- dependency-name: io.grpc:grpc-util
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-12-06 09:25:27 +01:00
dependabot[bot] 4f7c486dcc build(deps): bump actions/setup-java from 3 to 4
Bumps [actions/setup-java](https://github.com/actions/setup-java) from 3 to 4.
- [Release notes](https://github.com/actions/setup-java/releases)
- [Commits](https://github.com/actions/setup-java/compare/v3...v4)

---
updated-dependencies:
- dependency-name: actions/setup-java
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-11-29 20:08:36 +01:00
Nikita Sokolov 436b61ce42 launcher.Etcd.builder().build() should leak no Network.newNetwork()
https://github.com/etcd-io/jetcd/issues/1271
Signed-off-by: Nikita Sokolov <faucct@gmail.com>
2023-11-23 09:11:32 +01:00
dependabot[bot] d20cdf61cf build(deps): bump org.testcontainers:testcontainers
Bumps [org.testcontainers:testcontainers](https://github.com/testcontainers/testcontainers-java) from 1.19.2 to 1.19.3.
- [Release notes](https://github.com/testcontainers/testcontainers-java/releases)
- [Changelog](https://github.com/testcontainers/testcontainers-java/blob/main/CHANGELOG.md)
- [Commits](https://github.com/testcontainers/testcontainers-java/compare/1.19.2...1.19.3)

---
updated-dependencies:
- dependency-name: org.testcontainers:testcontainers
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-11-21 21:52:24 +01:00
dependabot[bot] ff57964889 build(deps): bump org.apache.commons:commons-compress
Bumps org.apache.commons:commons-compress from 1.24.0 to 1.25.0.

---
updated-dependencies:
- dependency-name: org.apache.commons:commons-compress
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-11-20 19:40:03 +01:00
dependabot[bot] 68ec7eea55 build(deps): bump io.vertx:vertx-grpc from 4.4.6 to 4.5.0
Bumps io.vertx:vertx-grpc from 4.4.6 to 4.5.0.

---
updated-dependencies:
- dependency-name: io.vertx:vertx-grpc
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-11-20 19:39:55 +01:00
dependabot[bot] b825daaab2 build(deps): bump org.testcontainers:testcontainers
Bumps [org.testcontainers:testcontainers](https://github.com/testcontainers/testcontainers-java) from 1.19.1 to 1.19.2.
- [Release notes](https://github.com/testcontainers/testcontainers-java/releases)
- [Changelog](https://github.com/testcontainers/testcontainers-java/blob/main/CHANGELOG.md)
- [Commits](https://github.com/testcontainers/testcontainers-java/compare/1.19.1...1.19.2)

---
updated-dependencies:
- dependency-name: org.testcontainers:testcontainers
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-11-20 19:39:44 +01:00
dependabot[bot] 40c7a2a6f7 build(deps): bump log4j from 2.21.1 to 2.22.0
Bumps `log4j` from 2.21.1 to 2.22.0.

Updates `org.apache.logging.log4j:log4j-api` from 2.21.1 to 2.22.0

Updates `org.apache.logging.log4j:log4j-core` from 2.21.1 to 2.22.0

Updates `org.apache.logging.log4j:log4j-slf4j2-impl` from 2.21.1 to 2.22.0

Updates `org.apache.logging.log4j:log4j-1.2-api` from 2.21.1 to 2.22.0

---
updated-dependencies:
- dependency-name: org.apache.logging.log4j:log4j-api
  dependency-type: direct:production
  update-type: version-update:semver-minor
- dependency-name: org.apache.logging.log4j:log4j-core
  dependency-type: direct:production
  update-type: version-update:semver-minor
- dependency-name: org.apache.logging.log4j:log4j-slf4j2-impl
  dependency-type: direct:production
  update-type: version-update:semver-minor
- dependency-name: org.apache.logging.log4j:log4j-1.2-api
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-11-20 19:39:37 +01:00
dependabot[bot] 9a7a98a2ba build(deps): bump mockito from 5.6.0 to 5.7.0
Bumps `mockito` from 5.6.0 to 5.7.0.

Updates `org.mockito:mockito-core` from 5.6.0 to 5.7.0
- [Release notes](https://github.com/mockito/mockito/releases)
- [Commits](https://github.com/mockito/mockito/compare/v5.6.0...v5.7.0)

Updates `org.mockito:mockito-junit-jupiter` from 5.6.0 to 5.7.0
- [Release notes](https://github.com/mockito/mockito/releases)
- [Commits](https://github.com/mockito/mockito/compare/v5.6.0...v5.7.0)

---
updated-dependencies:
- dependency-name: org.mockito:mockito-core
  dependency-type: direct:production
  update-type: version-update:semver-minor
- dependency-name: org.mockito:mockito-junit-jupiter
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-11-06 20:26:21 +01:00
Lan Liang 20815675e0 etcd: update to 3.5.10
Signed-off-by: Lan Liang <gcslyp@gmail.com>
2023-11-06 20:26:12 +01:00
dependabot[bot] 2c3027e23a build(deps): bump org.junit.jupiter:junit-jupiter from 5.10.0 to 5.10.1
Bumps [org.junit.jupiter:junit-jupiter](https://github.com/junit-team/junit5) from 5.10.0 to 5.10.1.
- [Release notes](https://github.com/junit-team/junit5/releases)
- [Commits](https://github.com/junit-team/junit5/compare/r5.10.0...r5.10.1)

---
updated-dependencies:
- dependency-name: org.junit.jupiter:junit-jupiter
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-11-06 20:25:58 +01:00
dependabot[bot] ce674679bc build(deps): bump commons-io:commons-io from 2.14.0 to 2.15.0
Bumps commons-io:commons-io from 2.14.0 to 2.15.0.

---
updated-dependencies:
- dependency-name: commons-io:commons-io
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-10-26 20:37:25 +02:00
dependabot[bot] c51adfb748 build(deps): bump log4j from 2.21.0 to 2.21.1
Bumps `log4j` from 2.21.0 to 2.21.1.

Updates `org.apache.logging.log4j:log4j-api` from 2.21.0 to 2.21.1

Updates `org.apache.logging.log4j:log4j-core` from 2.21.0 to 2.21.1

Updates `org.apache.logging.log4j:log4j-slf4j2-impl` from 2.21.0 to 2.21.1

Updates `org.apache.logging.log4j:log4j-1.2-api` from 2.21.0 to 2.21.1

---
updated-dependencies:
- dependency-name: org.apache.logging.log4j:log4j-api
  dependency-type: direct:production
  update-type: version-update:semver-patch
- dependency-name: org.apache.logging.log4j:log4j-core
  dependency-type: direct:production
  update-type: version-update:semver-patch
- dependency-name: org.apache.logging.log4j:log4j-slf4j2-impl
  dependency-type: direct:production
  update-type: version-update:semver-patch
- dependency-name: org.apache.logging.log4j:log4j-1.2-api
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-10-24 20:13:03 +02:00
Luca Burgazzoli 31a60ae3cd The 0.7.6 version does not throw an exception when keepAliveOnce failed #1254
Signed-off-by: Luca Burgazzoli <lburgazzoli@gmail.com>
2023-10-23 14:26:17 +02:00
dependabot[bot] 838b69c61d build(deps): bump grpc from 1.58.0 to 1.59.0
Bumps `grpc` from 1.58.0 to 1.59.0.

Updates `io.grpc:grpc-core` from 1.58.0 to 1.59.0
- [Release notes](https://github.com/grpc/grpc-java/releases)
- [Commits](https://github.com/grpc/grpc-java/compare/v1.58.0...v1.59.0)

Updates `io.grpc:grpc-netty` from 1.58.0 to 1.59.0
- [Release notes](https://github.com/grpc/grpc-java/releases)
- [Commits](https://github.com/grpc/grpc-java/compare/v1.58.0...v1.59.0)

Updates `io.grpc:grpc-protobuf` from 1.58.0 to 1.59.0
- [Release notes](https://github.com/grpc/grpc-java/releases)
- [Commits](https://github.com/grpc/grpc-java/compare/v1.58.0...v1.59.0)

Updates `io.grpc:grpc-stub` from 1.58.0 to 1.59.0
- [Release notes](https://github.com/grpc/grpc-java/releases)
- [Commits](https://github.com/grpc/grpc-java/compare/v1.58.0...v1.59.0)

Updates `io.grpc:grpc-grpclb` from 1.58.0 to 1.59.0
- [Release notes](https://github.com/grpc/grpc-java/releases)
- [Commits](https://github.com/grpc/grpc-java/compare/v1.58.0...v1.59.0)

Updates `io.grpc:grpc-inprocess` from 1.58.0 to 1.59.0
- [Release notes](https://github.com/grpc/grpc-java/releases)
- [Commits](https://github.com/grpc/grpc-java/compare/v1.58.0...v1.59.0)

Updates `io.grpc:grpc-util` from 1.58.0 to 1.59.0
- [Release notes](https://github.com/grpc/grpc-java/releases)
- [Commits](https://github.com/grpc/grpc-java/compare/v1.58.0...v1.59.0)

---
updated-dependencies:
- dependency-name: io.grpc:grpc-core
  dependency-type: direct:production
  update-type: version-update:semver-minor
- dependency-name: io.grpc:grpc-netty
  dependency-type: direct:production
  update-type: version-update:semver-minor
- dependency-name: io.grpc:grpc-protobuf
  dependency-type: direct:production
  update-type: version-update:semver-minor
- dependency-name: io.grpc:grpc-stub
  dependency-type: direct:production
  update-type: version-update:semver-minor
- dependency-name: io.grpc:grpc-grpclb
  dependency-type: direct:production
  update-type: version-update:semver-minor
- dependency-name: io.grpc:grpc-inprocess
  dependency-type: direct:production
  update-type: version-update:semver-minor
- dependency-name: io.grpc:grpc-util
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-10-21 12:35:07 +02:00
dependabot[bot] e02e39cc12 build(deps): bump errorprone from 2.22.0 to 2.23.0
Bumps `errorprone` from 2.22.0 to 2.23.0.

Updates `com.google.errorprone:error_prone_core` from 2.22.0 to 2.23.0
- [Release notes](https://github.com/google/error-prone/releases)
- [Commits](https://github.com/google/error-prone/compare/v2.22.0...v2.23.0)

Updates `com.google.errorprone:error_prone_annotations` from 2.22.0 to 2.23.0
- [Release notes](https://github.com/google/error-prone/releases)
- [Commits](https://github.com/google/error-prone/compare/v2.22.0...v2.23.0)

---
updated-dependencies:
- dependency-name: com.google.errorprone:error_prone_core
  dependency-type: direct:production
  update-type: version-update:semver-minor
- dependency-name: com.google.errorprone:error_prone_annotations
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-10-21 12:35:00 +02:00
Luca Burgazzoli 71315d7fac chore(deps): bump plugin dependencies
Signed-off-by: Luca Burgazzoli <lburgazzoli@gmail.com>
2023-10-18 19:30:41 +02:00
James Blair 542eb4b84b Complete migration to owners file.
Signed-off-by: James Blair <mail@jamesblair.net>
2023-10-18 08:03:39 +02:00
dependabot[bot] 9101ac8ded build(deps): bump log4j from 2.20.0 to 2.21.0
Bumps `log4j` from 2.20.0 to 2.21.0.

Updates `org.apache.logging.log4j:log4j-api` from 2.20.0 to 2.21.0

Updates `org.apache.logging.log4j:log4j-core` from 2.20.0 to 2.21.0

Updates `org.apache.logging.log4j:log4j-slf4j2-impl` from 2.20.0 to 2.21.0

Updates `org.apache.logging.log4j:log4j-1.2-api` from 2.20.0 to 2.21.0

---
updated-dependencies:
- dependency-name: org.apache.logging.log4j:log4j-api
  dependency-type: direct:production
  update-type: version-update:semver-minor
- dependency-name: org.apache.logging.log4j:log4j-core
  dependency-type: direct:production
  update-type: version-update:semver-minor
- dependency-name: org.apache.logging.log4j:log4j-slf4j2-impl
  dependency-type: direct:production
  update-type: version-update:semver-minor
- dependency-name: org.apache.logging.log4j:log4j-1.2-api
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-10-17 20:46:08 +02:00
Luca Burgazzoli 4a95c1c8ab chore(deps): replace the old net.jodah:failsafe with dev.failsafe:failsafe
Signed-off-by: Luca Burgazzoli <lburgazzoli@gmail.com>
2023-10-16 18:13:46 +02:00
Luca Burgazzoli 9c44c72cfc replace usage of guava with standard java #1207
Signed-off-by: Luca Burgazzoli <lburgazzoli@gmail.com>
2023-10-16 13:03:21 +02:00
Andreas Skoog 461346e7f4 replace usage of guava with standard java
Avoid adding extra third party dependency 'guava' by replacing methods with equivalent alternatives in standard jdk.

This helps users of etcd since every transitive third party dependency requires more code to be downloaded and might result in dependency conflicts.

fixes #1207

Signed-off-by: Andreas Skoog <andreas.skoog@avanza.se>
2023-10-16 13:03:21 +02:00
Luca Burgazzoli 85b61dff25 temporary disable LeaseMemoryLeakTest::testKeepAliveOnceMemoryLeak as it is flaky 2023-10-16 12:01:31 +02:00
Luca Burgazzoli 26762faa94 Etcd memory leak when using jetcd-core 0.7.6 #1236
Signed-off-by: Luca Burgazzoli <lburgazzoli@gmail.com>
2023-10-16 10:16:28 +02:00
Luca Burgazzoli 755a69753b chore(launcher): set a writable data dir
Signed-off-by: Luca Burgazzoli <lburgazzoli@gmail.com>
2023-10-12 15:49:27 +02:00
Luca Burgazzoli e5ff902efa chore(launcher): use health endpoint to wait for continaer to start
Signed-off-by: Luca Burgazzoli <lburgazzoli@gmail.com>
2023-10-12 15:49:27 +02:00
Luca Burgazzoli 38f3c89b20 chore(launcher): fix deprecated '--logger=capnslog' flag warning
Signed-off-by: Luca Burgazzoli <lburgazzoli@gmail.com>
2023-10-12 15:49:27 +02:00
Luca Burgazzoli d1c93ceec8 chore(ci): execute actions/dependency-review-action only for PRs
Signed-off-by: Luca Burgazzoli <lburgazzoli@gmail.com>
2023-10-12 15:49:16 +02:00
Luca Burgazzoli fae598b05b chore: improve ci workflows
- split main and pr workflow
- introduces reusable workflows (build, checks)
- add support for testing agains java 21
- update etcd container to v3.4.27
- update gradle to 8.4.x

Signed-off-by: Luca Burgazzoli <lburgazzoli@gmail.com>
2023-10-12 11:09:42 +02:00
Lan Liang 485b67bd8c chore: fix CI for javadoc and check javadoc at CI
Signed-off-by: Lan Liang <gcslyp@gmail.com>
2023-10-12 11:09:33 +02:00
dependabot[bot] da5333dfae build(deps): bump io.vertx:vertx-grpc from 4.4.5 to 4.4.6
Bumps io.vertx:vertx-grpc from 4.4.5 to 4.4.6.

---
updated-dependencies:
- dependency-name: io.vertx:vertx-grpc
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-10-12 10:10:34 +02:00
dependabot[bot] daeec91226 build(deps): bump com.google.guava:guava from 32.1.2-jre to 32.1.3-jre
Bumps [com.google.guava:guava](https://github.com/google/guava) from 32.1.2-jre to 32.1.3-jre.
- [Release notes](https://github.com/google/guava/releases)
- [Commits](https://github.com/google/guava/commits)

---
updated-dependencies:
- dependency-name: com.google.guava:guava
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-10-12 10:10:26 +02:00
Lan Liang 06711666ec Clean up deprecated method of maintenance
Signed-off-by: Lan Liang <gcslyp@gmail.com>
2023-10-11 15:30:49 +02:00
dependabot[bot] 3bc6e78446 build(deps): bump errorprone from 2.21.1 to 2.22.0
Bumps `errorprone` from 2.21.1 to 2.22.0.

Updates `com.google.errorprone:error_prone_core` from 2.21.1 to 2.22.0
- [Release notes](https://github.com/google/error-prone/releases)
- [Commits](https://github.com/google/error-prone/compare/v2.21.1...v2.22.0)

Updates `com.google.errorprone:error_prone_annotations` from 2.21.1 to 2.22.0
- [Release notes](https://github.com/google/error-prone/releases)
- [Commits](https://github.com/google/error-prone/compare/v2.21.1...v2.22.0)

---
updated-dependencies:
- dependency-name: com.google.errorprone:error_prone_core
  dependency-type: direct:production
  update-type: version-update:semver-minor
- dependency-name: com.google.errorprone:error_prone_annotations
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-10-11 12:00:36 +02:00
dependabot[bot] 189f754ade build(deps): bump mockito from 5.5.0 to 5.6.0
Bumps `mockito` from 5.5.0 to 5.6.0.

Updates `org.mockito:mockito-core` from 5.5.0 to 5.6.0
- [Release notes](https://github.com/mockito/mockito/releases)
- [Commits](https://github.com/mockito/mockito/compare/v5.5.0...v5.6.0)

Updates `org.mockito:mockito-junit-jupiter` from 5.5.0 to 5.6.0
- [Release notes](https://github.com/mockito/mockito/releases)
- [Commits](https://github.com/mockito/mockito/compare/v5.5.0...v5.6.0)

---
updated-dependencies:
- dependency-name: org.mockito:mockito-core
  dependency-type: direct:production
  update-type: version-update:semver-minor
- dependency-name: org.mockito:mockito-junit-jupiter
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-10-11 09:43:55 +02:00
dependabot[bot] 81b8cf85e9 build(deps): bump org.testcontainers:testcontainers
Bumps [org.testcontainers:testcontainers](https://github.com/testcontainers/testcontainers-java) from 1.19.0 to 1.19.1.
- [Release notes](https://github.com/testcontainers/testcontainers-java/releases)
- [Changelog](https://github.com/testcontainers/testcontainers-java/blob/main/CHANGELOG.md)
- [Commits](https://github.com/testcontainers/testcontainers-java/compare/1.19.0...1.19.1)

---
updated-dependencies:
- dependency-name: org.testcontainers:testcontainers
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-10-11 09:43:46 +02:00
dependabot[bot] 5deb9b7cbc build(deps): bump commons-io:commons-io from 2.13.0 to 2.14.0
Bumps commons-io:commons-io from 2.13.0 to 2.14.0.

---
updated-dependencies:
- dependency-name: commons-io:commons-io
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-10-11 09:43:37 +02:00
Lan Liang 226c59b705 Update the code of conduct to cncf, same with etcd.
Signed-off-by: Lan Liang <gcslyp@gmail.com>
2023-10-11 08:59:47 +02:00
Lan Liang 204eb1249e Skip exec chmod command when not mount data directory
Signed-off-by: Lan Liang <gcslyp@gmail.com>
2023-10-11 08:56:28 +02:00
James Blair dff1e79130 Add OWNERS file for jetcd.
Signed-off-by: James Blair <mail@jamesblair.net>
2023-09-20 07:56:12 +02:00
dependabot[bot] 58a4fa5366 build(deps): bump org.apache.commons:commons-compress
Bumps org.apache.commons:commons-compress from 1.23.0 to 1.24.0.

---
updated-dependencies:
- dependency-name: org.apache.commons:commons-compress
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-09-11 20:50:40 +02:00
John Jiang f1bfe5676b fix: README.MD -> README.md; ube -> uber
Signed-off-by: John Jiang <john.sha.jiang@gmail.com>
2023-09-11 09:12:43 +02:00
John Jiang 38b34a9a99 feat(ci): check trailing whitespace and newline
Signed-off-by: John Jiang <john.sha.jiang@gmail.com>
2023-09-11 09:12:13 +02:00
John Jiang 0450daca63 build: support OpenJDK 17 for buid-main.yml
Signed-off-by: John Jiang <john.sha.jiang@gmail.com>
2023-09-08 08:50:58 +02:00
John Jiang 3e5e1466e9 build: test with OpenJDK 17 on PR
Signed-off-by: John Jiang <john.sha.jiang@gmail.com>
2023-09-08 08:50:58 +02:00
Luca Burgazzoli cb5cf70429 chore: re-format enum definitions
Signed-off-by: Luca Burgazzoli <lburgazzoli@gmail.com>
2023-09-08 08:43:43 +02:00
Luca Burgazzoli 5e3cb9194e chore: remove deprecated method 2023-09-08 08:43:43 +02:00
Luca Burgazzoli 9c91b56b3c build(deps): bump grpc from 1.57.2 to 1.58.0 2023-09-08 08:43:43 +02:00
John Jiang 471c5690d0 chore: remove trailing spaces and add newlines for non-Java files
Signed-off-by: John Jiang <john.sha.jiang@gmail.com>
2023-09-06 11:17:40 +02:00
John Jiang bcf99363c0 fix(javadoc): type headings should begin at <h2>
Signed-off-by: John Jiang <john.sha.jiang@gmail.com>
2023-09-05 12:29:23 +02:00
dependabot[bot] 84edb66b16 build(deps): bump actions/checkout from 3 to 4
Bumps [actions/checkout](https://github.com/actions/checkout) from 3 to 4.
- [Release notes](https://github.com/actions/checkout/releases)
- [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md)
- [Commits](https://github.com/actions/checkout/compare/v3...v4)

---
updated-dependencies:
- dependency-name: actions/checkout
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-09-04 20:15:25 +02:00
dependabot[bot] 19ba6865f1 build(deps): bump org.slf4j:slf4j-api from 2.0.7 to 2.0.9
Bumps org.slf4j:slf4j-api from 2.0.7 to 2.0.9.

---
updated-dependencies:
- dependency-name: org.slf4j:slf4j-api
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-09-04 19:59:00 +02:00
John Jiang c88e161bd4 fix: wile should be while
Signed-off-by: John Jiang <john.sha.jiang@gmail.com>
2023-09-04 09:38:57 +02:00
dependabot[bot] 7de06aeee3 build(deps): bump info.picocli:picocli from 4.7.4 to 4.7.5
Bumps [info.picocli:picocli](https://github.com/remkop/picocli) from 4.7.4 to 4.7.5.
- [Release notes](https://github.com/remkop/picocli/releases)
- [Changelog](https://github.com/remkop/picocli/blob/main/RELEASE-NOTES.md)
- [Commits](https://github.com/remkop/picocli/compare/v4.7.4...v4.7.5)

---
updated-dependencies:
- dependency-name: info.picocli:picocli
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-09-01 10:02:10 +02:00
dependabot[bot] 4dbca648ba build(deps): bump io.vertx:vertx-grpc from 4.4.4 to 4.4.5
Bumps io.vertx:vertx-grpc from 4.4.4 to 4.4.5.

---
updated-dependencies:
- dependency-name: io.vertx:vertx-grpc
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-08-30 22:23:16 +02:00
Luca Burgazzoli 04a3b7528b add watch test with restart delay
Signed-off-by: Luca Burgazzoli <lburgazzoli@gmail.com>
2023-08-28 12:52:22 +02:00
dependabot[bot] aa9e8a0214 build(deps): bump org.testcontainers:testcontainers
Bumps [org.testcontainers:testcontainers](https://github.com/testcontainers/testcontainers-java) from 1.18.3 to 1.19.0.
- [Release notes](https://github.com/testcontainers/testcontainers-java/releases)
- [Changelog](https://github.com/testcontainers/testcontainers-java/blob/main/CHANGELOG.md)
- [Commits](https://github.com/testcontainers/testcontainers-java/compare/1.18.3...1.19.0)

---
updated-dependencies:
- dependency-name: org.testcontainers:testcontainers
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-08-23 00:38:04 +02:00
dependabot[bot] a0aa568e40 build(deps): bump mockito from 5.4.0 to 5.5.0
Bumps `mockito` from 5.4.0 to 5.5.0.

Updates `org.mockito:mockito-core` from 5.4.0 to 5.5.0
- [Release notes](https://github.com/mockito/mockito/releases)
- [Commits](https://github.com/mockito/mockito/compare/v5.4.0...v5.5.0)

Updates `org.mockito:mockito-junit-jupiter` from 5.4.0 to 5.5.0
- [Release notes](https://github.com/mockito/mockito/releases)
- [Commits](https://github.com/mockito/mockito/compare/v5.4.0...v5.5.0)

---
updated-dependencies:
- dependency-name: org.mockito:mockito-core
  dependency-type: direct:production
  update-type: version-update:semver-minor
- dependency-name: org.mockito:mockito-junit-jupiter
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-08-23 00:37:56 +02:00
Xuan Nguyen 4d5ce0520c etcd-io/jetcd #479 Use new and better canonical link to Google Groups
Signed-off-by: Xuan Nguyen <nguyenxndaidev@gmail.com>
2023-08-20 17:15:52 +02:00
dependabot[bot] 31749a9945 build(deps): bump grpc from 1.57.1 to 1.57.2
Bumps `grpc` from 1.57.1 to 1.57.2.

Updates `io.grpc:grpc-core` from 1.57.1 to 1.57.2
- [Release notes](https://github.com/grpc/grpc-java/releases)
- [Commits](https://github.com/grpc/grpc-java/compare/v1.57.1...v1.57.2)

Updates `io.grpc:grpc-netty` from 1.57.1 to 1.57.2
- [Release notes](https://github.com/grpc/grpc-java/releases)
- [Commits](https://github.com/grpc/grpc-java/compare/v1.57.1...v1.57.2)

Updates `io.grpc:grpc-protobuf` from 1.57.1 to 1.57.2
- [Release notes](https://github.com/grpc/grpc-java/releases)
- [Commits](https://github.com/grpc/grpc-java/compare/v1.57.1...v1.57.2)

Updates `io.grpc:grpc-stub` from 1.57.1 to 1.57.2
- [Release notes](https://github.com/grpc/grpc-java/releases)
- [Commits](https://github.com/grpc/grpc-java/compare/v1.57.1...v1.57.2)

Updates `io.grpc:grpc-grpclb` from 1.57.1 to 1.57.2
- [Release notes](https://github.com/grpc/grpc-java/releases)
- [Commits](https://github.com/grpc/grpc-java/compare/v1.57.1...v1.57.2)

---
updated-dependencies:
- dependency-name: io.grpc:grpc-core
  dependency-type: direct:production
  update-type: version-update:semver-patch
- dependency-name: io.grpc:grpc-netty
  dependency-type: direct:production
  update-type: version-update:semver-patch
- dependency-name: io.grpc:grpc-protobuf
  dependency-type: direct:production
  update-type: version-update:semver-patch
- dependency-name: io.grpc:grpc-stub
  dependency-type: direct:production
  update-type: version-update:semver-patch
- dependency-name: io.grpc:grpc-grpclb
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-08-16 23:30:25 +02:00
dependabot[bot] b95fc68fb3 build(deps): bump errorprone from 2.21.0 to 2.21.1
Bumps `errorprone` from 2.21.0 to 2.21.1.

Updates `com.google.errorprone:error_prone_core` from 2.21.0 to 2.21.1
- [Release notes](https://github.com/google/error-prone/releases)
- [Commits](https://github.com/google/error-prone/compare/v2.21.0...v2.21.1)

Updates `com.google.errorprone:error_prone_annotations` from 2.21.0 to 2.21.1
- [Release notes](https://github.com/google/error-prone/releases)
- [Commits](https://github.com/google/error-prone/compare/v2.21.0...v2.21.1)

---
updated-dependencies:
- dependency-name: com.google.errorprone:error_prone_core
  dependency-type: direct:production
  update-type: version-update:semver-patch
- dependency-name: com.google.errorprone:error_prone_annotations
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-08-07 20:07:06 +02:00
Luca Burgazzoli 9c402e507e
feat(ci): add initial release workflow 2023-08-02 21:19:09 +02:00
Luca Burgazzoli 3aaa21aea5
feat(ci): add initial release workflow 2023-08-02 21:00:14 +02:00
Luca Burgazzoli c74101f3a5
feat(ci): add initial release workflow 2023-08-02 20:56:07 +02:00
Luca Burgazzoli b86db3296a
feat(ci): add initial release workflow 2023-08-02 20:47:28 +02:00
Luca Burgazzoli 0f42523da3
feat(ci): add initial release workflow 2023-08-02 20:35:54 +02:00
dependabot[bot] 66123d9bd3 build(deps): bump errorprone from 2.20.0 to 2.21.0
Bumps `errorprone` from 2.20.0 to 2.21.0.

Updates `com.google.errorprone:error_prone_core` from 2.20.0 to 2.21.0
- [Release notes](https://github.com/google/error-prone/releases)
- [Commits](https://github.com/google/error-prone/compare/v2.20.0...v2.21.0)

Updates `com.google.errorprone:error_prone_annotations` from 2.20.0 to 2.21.0
- [Release notes](https://github.com/google/error-prone/releases)
- [Commits](https://github.com/google/error-prone/compare/v2.20.0...v2.21.0)

---
updated-dependencies:
- dependency-name: com.google.errorprone:error_prone_core
  dependency-type: direct:production
  update-type: version-update:semver-minor
- dependency-name: com.google.errorprone:error_prone_annotations
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-08-02 19:46:45 +02:00
dependabot[bot] 53217d9899 build(deps): bump grpc from 1.57.0 to 1.57.1
Bumps `grpc` from 1.57.0 to 1.57.1.

Updates `io.grpc:grpc-core` from 1.57.0 to 1.57.1
- [Release notes](https://github.com/grpc/grpc-java/releases)
- [Commits](https://github.com/grpc/grpc-java/compare/v1.57.0...v1.57.1)

Updates `io.grpc:grpc-netty` from 1.57.0 to 1.57.1
- [Release notes](https://github.com/grpc/grpc-java/releases)
- [Commits](https://github.com/grpc/grpc-java/compare/v1.57.0...v1.57.1)

Updates `io.grpc:grpc-protobuf` from 1.57.0 to 1.57.1
- [Release notes](https://github.com/grpc/grpc-java/releases)
- [Commits](https://github.com/grpc/grpc-java/compare/v1.57.0...v1.57.1)

Updates `io.grpc:grpc-stub` from 1.57.0 to 1.57.1
- [Release notes](https://github.com/grpc/grpc-java/releases)
- [Commits](https://github.com/grpc/grpc-java/compare/v1.57.0...v1.57.1)

Updates `io.grpc:grpc-grpclb` from 1.57.0 to 1.57.1
- [Release notes](https://github.com/grpc/grpc-java/releases)
- [Commits](https://github.com/grpc/grpc-java/compare/v1.57.0...v1.57.1)

---
updated-dependencies:
- dependency-name: io.grpc:grpc-core
  dependency-type: direct:production
  update-type: version-update:semver-patch
- dependency-name: io.grpc:grpc-netty
  dependency-type: direct:production
  update-type: version-update:semver-patch
- dependency-name: io.grpc:grpc-protobuf
  dependency-type: direct:production
  update-type: version-update:semver-patch
- dependency-name: io.grpc:grpc-stub
  dependency-type: direct:production
  update-type: version-update:semver-patch
- dependency-name: io.grpc:grpc-grpclb
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-08-02 19:46:28 +02:00
John Jiang 67aab8aaaf fix: unnecessary transient in MemorizingClientSupplier
Signed-off-by: John Jiang <john.sha.jiang@gmail.com>
2023-08-02 13:38:12 +02:00
dependabot[bot] e2f138b910 build(deps): bump com.google.guava:guava from 32.1.1-jre to 32.1.2-jre
Bumps [com.google.guava:guava](https://github.com/google/guava) from 32.1.1-jre to 32.1.2-jre.
- [Release notes](https://github.com/google/guava/releases)
- [Commits](https://github.com/google/guava/commits)

---
updated-dependencies:
- dependency-name: com.google.guava:guava
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-08-01 22:16:39 +02:00
dependabot[bot] 50e25af43b build(deps): bump grpc from 1.56.1 to 1.57.0
Bumps `grpc` from 1.56.1 to 1.57.0.

Updates `io.grpc:grpc-core` from 1.56.1 to 1.57.0
- [Release notes](https://github.com/grpc/grpc-java/releases)
- [Commits](https://github.com/grpc/grpc-java/compare/v1.56.1...v1.57.0)

Updates `io.grpc:grpc-netty` from 1.56.1 to 1.57.0
- [Release notes](https://github.com/grpc/grpc-java/releases)
- [Commits](https://github.com/grpc/grpc-java/compare/v1.56.1...v1.57.0)

Updates `io.grpc:grpc-protobuf` from 1.56.1 to 1.57.0
- [Release notes](https://github.com/grpc/grpc-java/releases)
- [Commits](https://github.com/grpc/grpc-java/compare/v1.56.1...v1.57.0)

Updates `io.grpc:grpc-stub` from 1.56.1 to 1.57.0
- [Release notes](https://github.com/grpc/grpc-java/releases)
- [Commits](https://github.com/grpc/grpc-java/compare/v1.56.1...v1.57.0)

Updates `io.grpc:grpc-grpclb` from 1.56.1 to 1.57.0
- [Release notes](https://github.com/grpc/grpc-java/releases)
- [Commits](https://github.com/grpc/grpc-java/compare/v1.56.1...v1.57.0)

---
updated-dependencies:
- dependency-name: io.grpc:grpc-core
  dependency-type: direct:production
  update-type: version-update:semver-minor
- dependency-name: io.grpc:grpc-netty
  dependency-type: direct:production
  update-type: version-update:semver-minor
- dependency-name: io.grpc:grpc-protobuf
  dependency-type: direct:production
  update-type: version-update:semver-minor
- dependency-name: io.grpc:grpc-stub
  dependency-type: direct:production
  update-type: version-update:semver-minor
- dependency-name: io.grpc:grpc-grpclb
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-07-31 08:46:35 +02:00
dependabot[bot] eb7fbe46d8 build(deps): bump org.junit.jupiter:junit-jupiter from 5.9.3 to 5.10.0
Bumps [org.junit.jupiter:junit-jupiter](https://github.com/junit-team/junit5) from 5.9.3 to 5.10.0.
- [Release notes](https://github.com/junit-team/junit5/releases)
- [Commits](https://github.com/junit-team/junit5/compare/r5.9.3...r5.10.0)

---
updated-dependencies:
- dependency-name: org.junit.jupiter:junit-jupiter
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-07-25 15:26:10 +02:00
dependabot[bot] 2ff3fc2255 build(deps): bump com.google.protobuf from 0.9.3 to 0.9.4
Bumps com.google.protobuf from 0.9.3 to 0.9.4.

---
updated-dependencies:
- dependency-name: com.google.protobuf
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-07-18 00:21:27 +02:00
Giridharan Ramasamy 151c1d7b51 watcher: Added WithCreatedNotify Option for receiving created event
This adds WatchOption to receive watch created event

Fixes #1186

Signed-off-by: Giridharan Ramasamy <46867712+giri-vsr@users.noreply.github.com>
2023-07-08 21:37:26 +02:00
dependabot[bot] ec48303a20 build(deps): bump grpc from 1.56.0 to 1.56.1
Bumps `grpc` from 1.56.0 to 1.56.1.

Updates `io.grpc:grpc-core` from 1.56.0 to 1.56.1
- [Release notes](https://github.com/grpc/grpc-java/releases)
- [Commits](https://github.com/grpc/grpc-java/compare/v1.56.0...v1.56.1)

Updates `io.grpc:grpc-netty` from 1.56.0 to 1.56.1
- [Release notes](https://github.com/grpc/grpc-java/releases)
- [Commits](https://github.com/grpc/grpc-java/compare/v1.56.0...v1.56.1)

Updates `io.grpc:grpc-protobuf` from 1.56.0 to 1.56.1
- [Release notes](https://github.com/grpc/grpc-java/releases)
- [Commits](https://github.com/grpc/grpc-java/compare/v1.56.0...v1.56.1)

Updates `io.grpc:grpc-stub` from 1.56.0 to 1.56.1
- [Release notes](https://github.com/grpc/grpc-java/releases)
- [Commits](https://github.com/grpc/grpc-java/compare/v1.56.0...v1.56.1)

Updates `io.grpc:grpc-grpclb` from 1.56.0 to 1.56.1
- [Release notes](https://github.com/grpc/grpc-java/releases)
- [Commits](https://github.com/grpc/grpc-java/compare/v1.56.0...v1.56.1)

---
updated-dependencies:
- dependency-name: io.grpc:grpc-core
  dependency-type: direct:production
  update-type: version-update:semver-patch
- dependency-name: io.grpc:grpc-netty
  dependency-type: direct:production
  update-type: version-update:semver-patch
- dependency-name: io.grpc:grpc-protobuf
  dependency-type: direct:production
  update-type: version-update:semver-patch
- dependency-name: io.grpc:grpc-stub
  dependency-type: direct:production
  update-type: version-update:semver-patch
- dependency-name: io.grpc:grpc-grpclb
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-07-03 20:34:38 +02:00
dependabot[bot] b3175ebf07 build(deps): bump com.google.guava:guava from 32.0.1-jre to 32.1.1-jre
Bumps [com.google.guava:guava](https://github.com/google/guava) from 32.0.1-jre to 32.1.1-jre.
- [Release notes](https://github.com/google/guava/releases)
- [Commits](https://github.com/google/guava/commits)

---
updated-dependencies:
- dependency-name: com.google.guava:guava
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-06-30 20:20:51 +02:00
Luca Burgazzoli 9454705c8c
fix(ci): split main build an publish jobs 2023-06-30 12:34:10 +02:00
Luca Burgazzoli e5a8e87224
fix(ci): add matric to main workflow 2023-06-30 12:30:59 +02:00
Luca Burgazzoli 3fd947f4cf
fix(ci): print current version before publish 2023-06-30 12:21:54 +02:00
Lan Liang ca95a0a33f [ghaction] martix CI for etcd version
Signed-off-by: Lan Liang <gcslyp@gmail.com>
2023-06-30 12:18:54 +02:00
Lan 5c150ac1e4 Add cache and schedule for ghaction
Signed-off-by: Lan Liang <gcslyp@gmail.com>
2023-06-30 12:04:21 +02:00
Luca Burgazzoli 156df8a0bc chore(doc): fix snapshot link 2023-06-30 11:29:43 +02:00
Luca Burgazzoli 38dd03c334 fix(ci): print current version before publish 2023-06-30 11:28:26 +02:00
Luca Burgazzoli 32fc5a0c2c fix(ci): fetch all tags and refs 2023-06-30 11:27:45 +02:00
dependabot[bot] f643a52081 build(deps): bump mockito from 5.3.1 to 5.4.0
Bumps `mockito` from 5.3.1 to 5.4.0.

Updates `org.mockito:mockito-core` from 5.3.1 to 5.4.0
- [Release notes](https://github.com/mockito/mockito/releases)
- [Commits](https://github.com/mockito/mockito/compare/v5.3.1...v5.4.0)

Updates `org.mockito:mockito-junit-jupiter` from 5.3.1 to 5.4.0
- [Release notes](https://github.com/mockito/mockito/releases)
- [Commits](https://github.com/mockito/mockito/compare/v5.3.1...v5.4.0)

---
updated-dependencies:
- dependency-name: org.mockito:mockito-core
  dependency-type: direct:production
  update-type: version-update:semver-minor
- dependency-name: org.mockito:mockito-junit-jupiter
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-06-28 17:04:30 +02:00
Cheng Pan f6b94488a7 Remove quote from properties' values
Signed-off-by: Cheng Pan <chengpan@apache.org>
2023-06-28 16:51:36 +02:00
dependabot[bot] 1dea66df1f build(deps): bump io.vertx:vertx-grpc from 4.4.3 to 4.4.4
Bumps io.vertx:vertx-grpc from 4.4.3 to 4.4.4.

---
updated-dependencies:
- dependency-name: io.vertx:vertx-grpc
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-06-22 20:37:51 +02:00
dependabot[bot] e956deab04 build(deps): bump errorprone from 2.19.1 to 2.20.0
Bumps `errorprone` from 2.19.1 to 2.20.0.

Updates `com.google.errorprone:error_prone_core` from 2.19.1 to 2.20.0
- [Release notes](https://github.com/google/error-prone/releases)
- [Commits](https://github.com/google/error-prone/compare/v2.19.1...v2.20.0)

Updates `com.google.errorprone:error_prone_annotations` from 2.19.1 to 2.20.0
- [Release notes](https://github.com/google/error-prone/releases)
- [Commits](https://github.com/google/error-prone/compare/v2.19.1...v2.20.0)

---
updated-dependencies:
- dependency-name: com.google.errorprone:error_prone_core
  dependency-type: direct:production
  update-type: version-update:semver-minor
- dependency-name: com.google.errorprone:error_prone_annotations
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-06-17 08:03:27 +02:00
dependabot[bot] 39b1ca4d9a build(deps): bump grpc from 1.55.1 to 1.56.0
Bumps `grpc` from 1.55.1 to 1.56.0.

Updates `io.grpc:grpc-core` from 1.55.1 to 1.56.0
- [Release notes](https://github.com/grpc/grpc-java/releases)
- [Commits](https://github.com/grpc/grpc-java/compare/v1.55.1...v1.56.0)

Updates `io.grpc:grpc-netty` from 1.55.1 to 1.56.0
- [Release notes](https://github.com/grpc/grpc-java/releases)
- [Commits](https://github.com/grpc/grpc-java/compare/v1.55.1...v1.56.0)

Updates `io.grpc:grpc-protobuf` from 1.55.1 to 1.56.0
- [Release notes](https://github.com/grpc/grpc-java/releases)
- [Commits](https://github.com/grpc/grpc-java/compare/v1.55.1...v1.56.0)

Updates `io.grpc:grpc-stub` from 1.55.1 to 1.56.0
- [Release notes](https://github.com/grpc/grpc-java/releases)
- [Commits](https://github.com/grpc/grpc-java/compare/v1.55.1...v1.56.0)

Updates `io.grpc:grpc-grpclb` from 1.55.1 to 1.56.0
- [Release notes](https://github.com/grpc/grpc-java/releases)
- [Commits](https://github.com/grpc/grpc-java/compare/v1.55.1...v1.56.0)

---
updated-dependencies:
- dependency-name: io.grpc:grpc-core
  dependency-type: direct:production
  update-type: version-update:semver-minor
- dependency-name: io.grpc:grpc-netty
  dependency-type: direct:production
  update-type: version-update:semver-minor
- dependency-name: io.grpc:grpc-protobuf
  dependency-type: direct:production
  update-type: version-update:semver-minor
- dependency-name: io.grpc:grpc-stub
  dependency-type: direct:production
  update-type: version-update:semver-minor
- dependency-name: io.grpc:grpc-grpclb
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-06-15 09:23:47 +02:00
dependabot[bot] 040d6e49df build(deps): bump autoService from 1.1.0 to 1.1.1
Bumps `autoService` from 1.1.0 to 1.1.1.

Updates `com.google.auto.service:auto-service-annotations` from 1.1.0 to 1.1.1
- [Release notes](https://github.com/google/auto/releases)
- [Commits](https://github.com/google/auto/compare/auto-value-1.1...auto-service-1.1.1)

Updates `com.google.auto.service:auto-service` from 1.1.0 to 1.1.1
- [Release notes](https://github.com/google/auto/releases)
- [Commits](https://github.com/google/auto/compare/auto-value-1.1...auto-service-1.1.1)

---
updated-dependencies:
- dependency-name: com.google.auto.service:auto-service-annotations
  dependency-type: direct:production
  update-type: version-update:semver-patch
- dependency-name: com.google.auto.service:auto-service
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-06-12 20:27:46 +02:00
Luca Burgazzoli 23aeac541f Add test for #1161
Signed-off-by: Luca Burgazzoli <lburgazzoli@gmail.com>
2023-06-10 19:40:01 +02:00
Luca Burgazzoli 73c7120e04 misc cleanup
Signed-off-by: Luca Burgazzoli <lburgazzoli@gmail.com>
2023-06-10 15:16:19 +02:00
Luca Burgazzoli 36f34219b2 updates deps and test cleanup
Signed-off-by: Luca Burgazzoli <lburgazzoli@gmail.com>
2023-06-10 12:50:06 +02:00
Luca Burgazzoli dbd35a5305 Add test for #1132
Signed-off-by: Luca Burgazzoli <lburgazzoli@gmail.com>
2023-06-10 12:29:48 +02:00
Luca Burgazzoli a203276502 chore(deps): replace jcommander with picocli
Signed-off-by: Luca Burgazzoli <lburgazzoli@gmail.com>
2023-06-10 12:19:06 +02:00
Luca Burgazzoli bdf5c17ed7 The keepAliveOnce delay increases after the jetcd version is upgraded to 0.7.3 #1119
Signed-off-by: Luca Burgazzoli <lburgazzoli@gmail.com>
2023-06-10 11:06:42 +02:00
dependabot[bot] 40cd1a1d10 build(deps): bump com.google.guava:guava from 32.0.0-jre to 32.0.1-jre
Bumps [com.google.guava:guava](https://github.com/google/guava) from 32.0.0-jre to 32.0.1-jre.
- [Release notes](https://github.com/google/guava/releases)
- [Commits](https://github.com/google/guava/commits)

---
updated-dependencies:
- dependency-name: com.google.guava:guava
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-06-09 20:33:43 +02:00
dependabot[bot] b87ceb7bad build(deps): bump commons-io:commons-io from 2.12.0 to 2.13.0
Bumps commons-io:commons-io from 2.12.0 to 2.13.0.

---
updated-dependencies:
- dependency-name: commons-io:commons-io
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-06-08 23:16:59 +02:00
dependabot[bot] e80103f25d build(deps): bump io.vertx:vertx-grpc from 4.4.2 to 4.4.3
Bumps io.vertx:vertx-grpc from 4.4.2 to 4.4.3.

---
updated-dependencies:
- dependency-name: io.vertx:vertx-grpc
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-06-08 09:35:59 +02:00
dependabot[bot] 2a5a1574de build(deps): bump org.testcontainers:testcontainers
Bumps [org.testcontainers:testcontainers](https://github.com/testcontainers/testcontainers-java) from 1.18.2 to 1.18.3.
- [Release notes](https://github.com/testcontainers/testcontainers-java/releases)
- [Changelog](https://github.com/testcontainers/testcontainers-java/blob/main/CHANGELOG.md)
- [Commits](https://github.com/testcontainers/testcontainers-java/compare/1.18.2...1.18.3)

---
updated-dependencies:
- dependency-name: org.testcontainers:testcontainers
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-06-08 09:35:43 +02:00
dependabot[bot] f2733061ac build(deps): bump org.jooq:jool-java-8 from 0.9.14 to 0.9.15
Bumps [org.jooq:jool-java-8](https://github.com/jOOQ/jOOL) from 0.9.14 to 0.9.15.
- [Commits](https://github.com/jOOQ/jOOL/compare/version-0.9.14...version-0.9.15)

---
updated-dependencies:
- dependency-name: org.jooq:jool-java-8
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-05-31 20:14:22 +02:00
dependabot[bot] 1ea5639c0e build(deps): bump org.junit.jupiter:junit-jupiter from 5.9.2 to 5.9.3
Bumps [org.junit.jupiter:junit-jupiter](https://github.com/junit-team/junit5) from 5.9.2 to 5.9.3.
- [Release notes](https://github.com/junit-team/junit5/releases)
- [Commits](https://github.com/junit-team/junit5/compare/r5.9.2...r5.9.3)

---
updated-dependencies:
- dependency-name: org.junit.jupiter:junit-jupiter
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-05-31 08:14:52 +02:00
dependabot[bot] 2558a89c0c build(deps): bump com.google.errorprone:javac
Bumps [com.google.errorprone:javac](https://github.com/google/error-prone-javac) from 9+181-r4173-1 to 1.8.0-u20.
- [Commits](https://github.com/google/error-prone-javac/commits)

---
updated-dependencies:
- dependency-name: com.google.errorprone:javac
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-05-31 08:04:47 +02:00
dependabot[bot] 100b2a42a9 build(deps): bump org.apache.commons:commons-compress
Bumps org.apache.commons:commons-compress from 1.22 to 1.23.0.

---
updated-dependencies:
- dependency-name: org.apache.commons:commons-compress
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-05-31 08:04:35 +02:00
dependabot[bot] fd65e2772a build(deps): bump com.google.protobuf from 0.9.2 to 0.9.3
Bumps com.google.protobuf from 0.9.2 to 0.9.3.

---
updated-dependencies:
- dependency-name: com.google.protobuf
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-05-31 08:04:25 +02:00
dependabot[bot] d736ac4872 build(deps): bump org.testcontainers:testcontainers
Bumps [org.testcontainers:testcontainers](https://github.com/testcontainers/testcontainers-java) from 1.18.1 to 1.18.2.
- [Release notes](https://github.com/testcontainers/testcontainers-java/releases)
- [Changelog](https://github.com/testcontainers/testcontainers-java/blob/main/CHANGELOG.md)
- [Commits](https://github.com/testcontainers/testcontainers-java/compare/1.18.1...1.18.2)

---
updated-dependencies:
- dependency-name: org.testcontainers:testcontainers
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-05-31 08:04:13 +02:00
Luca Burgazzoli 9cd1e98911 refactor: use vertx executor service
Signed-off-by: Luca Burgazzoli <lburgazzoli@gmail.com>
2023-05-31 08:03:58 +02:00
Luca Burgazzoli 879bb221c7 etcd: update to v3.5.9
Signed-off-by: Luca Burgazzoli <lburgazzoli@gmail.com>
2023-05-30 14:04:33 +02:00
Cristian Ferretti 6c59cf6569 Ensure any service threads are created as daemon threads (redo).
Signed-off-by: Cristian Ferretti <cristianferretti@deephaven.io>
2023-05-30 09:31:45 +02:00
dependabot[bot] 80e2b38c22 build(deps): bump mockito from 5.1.1 to 5.3.1
Bumps `mockito` from 5.1.1 to 5.3.1.

Updates `org.mockito:mockito-core` from 5.1.1 to 5.3.1
- [Release notes](https://github.com/mockito/mockito/releases)
- [Commits](https://github.com/mockito/mockito/compare/v5.1.1...v5.3.1)

Updates `org.mockito:mockito-junit-jupiter` from 5.1.1 to 5.3.1
- [Release notes](https://github.com/mockito/mockito/releases)
- [Commits](https://github.com/mockito/mockito/compare/v5.1.1...v5.3.1)

---
updated-dependencies:
- dependency-name: org.mockito:mockito-core
  dependency-type: direct:production
  update-type: version-update:semver-minor
- dependency-name: org.mockito:mockito-junit-jupiter
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-05-29 20:44:58 +02:00
dependabot[bot] 198fe32947 build(deps): bump com.github.johnrengelman.shadow from 8.1.0 to 8.1.1
Bumps com.github.johnrengelman.shadow from 8.1.0 to 8.1.1.

---
updated-dependencies:
- dependency-name: com.github.johnrengelman.shadow
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-05-29 20:23:56 +02:00
dependabot[bot] c886569a9e build(deps): bump com.google.guava:guava from 31.1-jre to 32.0.0-jre
Bumps [com.google.guava:guava](https://github.com/google/guava) from 31.1-jre to 32.0.0-jre.
- [Release notes](https://github.com/google/guava/releases)
- [Commits](https://github.com/google/guava/commits)

---
updated-dependencies:
- dependency-name: com.google.guava:guava
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-05-29 20:18:29 +02:00
dependabot[bot] 00425bd26c build(deps): bump org.testcontainers:testcontainers
Bumps [org.testcontainers:testcontainers](https://github.com/testcontainers/testcontainers-java) from 1.17.6 to 1.18.1.
- [Release notes](https://github.com/testcontainers/testcontainers-java/releases)
- [Changelog](https://github.com/testcontainers/testcontainers-java/blob/main/CHANGELOG.md)
- [Commits](https://github.com/testcontainers/testcontainers-java/compare/1.17.6...1.18.1)

---
updated-dependencies:
- dependency-name: org.testcontainers:testcontainers
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-05-29 20:18:15 +02:00
dependabot[bot] 403ea94314 build(deps): bump commons-io:commons-io from 2.11.0 to 2.12.0
Bumps commons-io:commons-io from 2.11.0 to 2.12.0.

---
updated-dependencies:
- dependency-name: commons-io:commons-io
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-05-29 20:18:04 +02:00
dependabot[bot] 73749064e8 build(deps): bump errorprone from 2.18.0 to 2.19.1
Bumps `errorprone` from 2.18.0 to 2.19.1.

Updates `com.google.errorprone:error_prone_core` from 2.18.0 to 2.19.1
- [Release notes](https://github.com/google/error-prone/releases)
- [Commits](https://github.com/google/error-prone/compare/v2.18.0...v2.19.1)

Updates `com.google.errorprone:error_prone_annotations` from 2.18.0 to 2.19.1
- [Release notes](https://github.com/google/error-prone/releases)
- [Commits](https://github.com/google/error-prone/compare/v2.18.0...v2.19.1)

---
updated-dependencies:
- dependency-name: com.google.errorprone:error_prone_core
  dependency-type: direct:production
  update-type: version-update:semver-minor
- dependency-name: com.google.errorprone:error_prone_annotations
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-05-28 16:17:13 +02:00
Luca Burgazzoli 20e83785e0 chore(deps): add dependency-review-action 2023-05-28 16:16:33 +02:00
dependabot[bot] 272c14343d build(deps): bump autoService from 1.0.1 to 1.1.0
Bumps `autoService` from 1.0.1 to 1.1.0.

Updates `com.google.auto.service:auto-service-annotations` from 1.0.1 to 1.1.0
- [Release notes](https://github.com/google/auto/releases)
- [Commits](https://github.com/google/auto/compare/auto-common-1.0.1...auto-value-1.1)

Updates `com.google.auto.service:auto-service` from 1.0.1 to 1.1.0
- [Release notes](https://github.com/google/auto/releases)
- [Commits](https://github.com/google/auto/compare/auto-common-1.0.1...auto-value-1.1)

---
updated-dependencies:
- dependency-name: com.google.auto.service:auto-service-annotations
  dependency-type: direct:production
  update-type: version-update:semver-minor
- dependency-name: com.google.auto.service:auto-service
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-05-28 16:09:16 +02:00
dependabot[bot] f4006a496f build(deps): bump org.slf4j:slf4j-api from 2.0.6 to 2.0.7
Bumps [org.slf4j:slf4j-api](https://github.com/qos-ch/slf4j) from 2.0.6 to 2.0.7.
- [Commits](https://github.com/qos-ch/slf4j/compare/v_2.0.6...v_2.0.7)

---
updated-dependencies:
- dependency-name: org.slf4j:slf4j-api
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-05-28 16:09:06 +02:00
dependabot[bot] d25a7cd578 build(deps): bump grpc from 1.53.0 to 1.55.1
Bumps `grpc` from 1.53.0 to 1.55.1.

Updates `io.grpc:grpc-core` from 1.53.0 to 1.55.1
- [Release notes](https://github.com/grpc/grpc-java/releases)
- [Commits](https://github.com/grpc/grpc-java/compare/v1.53.0...v1.55.1)

Updates `io.grpc:grpc-netty` from 1.53.0 to 1.55.1
- [Release notes](https://github.com/grpc/grpc-java/releases)
- [Commits](https://github.com/grpc/grpc-java/compare/v1.53.0...v1.55.1)

Updates `io.grpc:grpc-protobuf` from 1.53.0 to 1.55.1
- [Release notes](https://github.com/grpc/grpc-java/releases)
- [Commits](https://github.com/grpc/grpc-java/compare/v1.53.0...v1.55.1)

Updates `io.grpc:grpc-stub` from 1.53.0 to 1.55.1
- [Release notes](https://github.com/grpc/grpc-java/releases)
- [Commits](https://github.com/grpc/grpc-java/compare/v1.53.0...v1.55.1)

Updates `io.grpc:grpc-grpclb` from 1.53.0 to 1.55.1
- [Release notes](https://github.com/grpc/grpc-java/releases)
- [Commits](https://github.com/grpc/grpc-java/compare/v1.53.0...v1.55.1)

---
updated-dependencies:
- dependency-name: io.grpc:grpc-core
  dependency-type: direct:production
  update-type: version-update:semver-minor
- dependency-name: io.grpc:grpc-netty
  dependency-type: direct:production
  update-type: version-update:semver-minor
- dependency-name: io.grpc:grpc-protobuf
  dependency-type: direct:production
  update-type: version-update:semver-minor
- dependency-name: io.grpc:grpc-stub
  dependency-type: direct:production
  update-type: version-update:semver-minor
- dependency-name: io.grpc:grpc-grpclb
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-05-28 16:08:55 +02:00
dependabot[bot] 8a448151a9 build(deps): bump io.vertx:vertx-grpc from 4.4.0 to 4.4.2
Bumps io.vertx:vertx-grpc from 4.4.0 to 4.4.2.

---
updated-dependencies:
- dependency-name: io.vertx:vertx-grpc
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-05-28 16:08:44 +02:00
Luca Burgazzoli 938e745ba0 chore(test): re-generate ssl certs 2023-05-28 15:55:49 +02:00
Luca Burgazzoli 47c8e7578d chore(deps): configure dependabot to ignore protoc 2023-05-28 15:43:36 +02:00
Luca Burgazzoli 5445564688 chore(deps): enable depndabot 2023-05-28 15:38:26 +02:00
Luca Burgazzoli 389b2c137b chore(deps): update gradle 2023-05-28 15:38:14 +02:00
iamthinh 0790996723 Update Lease.md 2023-04-18 08:22:02 +02:00
dependabot[bot] 275aea177a build(deps): bump actions/stale from 7 to 8
Bumps [actions/stale](https://github.com/actions/stale) from 7 to 8.
- [Release notes](https://github.com/actions/stale/releases)
- [Changelog](https://github.com/actions/stale/blob/main/CHANGELOG.md)
- [Commits](https://github.com/actions/stale/compare/v7...v8)

---
updated-dependencies:
- dependency-name: actions/stale
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-03-27 09:04:39 +02:00
Luca Burgazzoli ebf983b811 fix: build is failing due to PMD #1126
Signed-off-by: Luca Burgazzoli <lburgazzoli@gmail.com>
2023-03-08 09:20:18 +01:00
Luca Burgazzoli 64fe54aced chore: update deps
Signed-off-by: Luca Burgazzoli <lburgazzoli@gmail.com>
2023-03-08 09:20:18 +01:00
Jean-Baptiste Onofré 0f35c8aa40 1124: upgrade to slf4j 2.0.6 and log4j 2.20.0
Signed-off-by: Jean-Baptiste Onofré <jbonofre@apache.org>
2023-03-06 08:52:03 +01:00
dependabot[bot] 7639c8161f build(deps): bump actions/stale from 6 to 7
Bumps [actions/stale](https://github.com/actions/stale) from 6 to 7.
- [Release notes](https://github.com/actions/stale/releases)
- [Changelog](https://github.com/actions/stale/blob/main/CHANGELOG.md)
- [Commits](https://github.com/actions/stale/compare/v6...v7)

---
updated-dependencies:
- dependency-name: actions/stale
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-02-24 07:47:55 +01:00
Ilia Ilinykh 822032bb78 extension: EtcdClusterExtension
Added ability to use settings in EtcdClusterExtension.

Signed-off-by: Ilia Ilinykh <ilyasyoy@gmail.com>
2023-01-30 07:54:39 +01:00
Ilia Ilinykh 4441c2b742 launcher: mounting data directory
added settings to turn-off mounting of data directory.

Signed-off-by: Ilia Ilinykh <ilyasyoy@gmail.com>
2023-01-30 07:54:39 +01:00
Ilia Ilinykh 061e3de023 documentation: CONTRIBUTING.md
Fixed formatting command.

Signed-off-by: Ilia Ilinykh <ilyasyoy@gmail.com>
2023-01-30 07:54:39 +01:00
ponfee.fu f6afc20a49 fix spelled mistake method name "getTTl" (#1112) 2022-12-07 09:39:20 +01:00
Luca Burgazzoli 2247c1e2ba
chore: add release doc 2022-12-07 09:13:40 +01:00
138 changed files with 3091 additions and 1799 deletions

View File

@ -15,13 +15,11 @@ assignees: ''
A clear and concise description of what the bug is.
**To Reproduce**
Steps or reproducer to reproduce the behavior.
This section *must* be provided, if not, the issue may not get attention.
Steps or reproducer to reproduce the behavior in a form of a unit test.
This section *must* be provided, if not, the issue may not get attention since the maintainers have very limited capacity.
**Expected behavior**
A clear and concise description of what you expected to happen.
**Additional context**
Add any other context about the problem here.

View File

@ -6,3 +6,13 @@ updates:
interval: daily
time: "19:30"
timezone: Europe/Paris
- package-ecosystem: "gradle"
directory: "/"
schedule:
interval: daily
time: "19:30"
timezone: Europe/Paris
labels:
- area/dependencies
ignore:
- dependency-name: com.google.protobuf:protoc

View File

@ -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.
@ -14,10 +14,10 @@
# limitations under the License.
#
name: Build and Publish
name: Build and Publish (Snapshot)
concurrency:
group: ${{ github.ref }}-${{ github.workflow }}
group: ${{ github.workflow }}-${{ github.sha }}
cancel-in-progress: true
on:
@ -25,23 +25,52 @@ on:
branches:
- main
workflow_dispatch:
schedule:
- cron: "0 0 * * *"
jobs:
checks:
uses: ./.github/workflows/checks.yml
build:
needs:
- checks
strategy:
matrix:
java-version:
- 11
- 17
- 21
etcd:
- quay.io/coreos/etcd:v3.5.21
- quay.io/coreos/etcd:v3.6.0
uses: ./.github/workflows/build.yml
with:
javaVersion: "${{ matrix.java-version }}"
etcdImage: "${{ matrix.etcd }}"
publish:
runs-on: ubuntu-latest
needs:
- build
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Set Up Java
uses: actions/setup-java@v3
- name: 'Checkout'
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: 'Set Up Java'
uses: actions/setup-java@v4
with:
java-version: 11
distribution: 'temurin'
- name: Build Project
env:
OSSRH_USERNAME: ${{ secrets.OSSRH_USERNAME }}
OSSRH_PASSWORD: ${{ secrets.OSSRH_PASSWORD }}
cache: 'gradle'
- name: 'Collect Info'
run: |
./gradlew currentVersion
- name: 'Publish Snapshot'
if: github.event_name != 'schedule'
env:
NEXUS_USERNAME: ${{ secrets.OSSRH_USERNAME }}
NEXUS_PASSWORD: ${{ secrets.OSSRH_PASSWORD }}
run: |
./gradlew spotlessCheck
./gradlew test
./gradlew publishToSonatype -Prelease.forceSnapshot

View File

@ -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.
@ -17,9 +17,12 @@
name: Build PR
concurrency:
group: ${{ github.ref }}-${{ github.workflow }}
group: ${{ github.workflow }}-${{ github.event.pull_request.number }}
cancel-in-progress: true
permissions:
contents: read
on:
pull_request:
branches:
@ -27,17 +30,22 @@ on:
workflow_dispatch:
jobs:
checks:
uses: ./.github/workflows/checks.yml
build:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Set Up Java
uses: actions/setup-java@v3
with:
java-version: 11
distribution: 'temurin'
- name: Build Project
run: |
./gradlew check -x test
./gradlew test
needs:
- checks
strategy:
matrix:
java-version:
- 11
- 17
- 21
etcd:
- quay.io/coreos/etcd:v3.5.21
- quay.io/coreos/etcd:v3.6.0
uses: ./.github/workflows/build.yml
with:
javaVersion: "${{ matrix.java-version }}"
etcdImage: "${{ matrix.etcd }}"

33
.github/workflows/build.yml vendored Normal file
View File

@ -0,0 +1,33 @@
name: Build
on:
workflow_call:
inputs:
javaVersion:
required: true
type: string
etcdImage:
required: true
type: string
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: 'Checkout'
uses: actions/checkout@v4
- name: 'Set Up Java'
uses: actions/setup-java@v4
with:
java-version: ${{ inputs.javaVersion }}
distribution: 'temurin'
cache: 'gradle'
- name: 'Build Project'
env:
ETCD_IMAGE: ${{ inputs.etcdImage }}
run: |
export TC_USER="$(id -u):$(id -g)"
echo "tc user -> $TC_USER"
./gradlew test --info

37
.github/workflows/checks.yml vendored Normal file
View File

@ -0,0 +1,37 @@
name: Checks
on:
workflow_call:
jobs:
check:
runs-on: ubuntu-latest
steps:
- name: 'Checkout'
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: 'Set Up Java'
uses: actions/setup-java@v4
with:
java-version: 11
distribution: 'temurin'
cache: 'gradle'
- name: 'Run check task'
run: |
./gradlew check -x test
- name: 'Run check script'
run: |
bash ./.github/workflows/scripts/precheck.sh
shell: bash
deps:
runs-on: ubuntu-latest
if: github.event_name == 'pull_request'
steps:
- name: 'Checkout'
uses: actions/checkout@v4
- name: 'Dependency Review'
uses: actions/dependency-review-action@v4

55
.github/workflows/scripts/precheck.sh vendored Normal file
View File

@ -0,0 +1,55 @@
#!/usr/bin/env bash
failed=0
# Check trailing whitespace
files=$(find . -type f \
-not -path "./.git/*" \
-not -path "*/.gradle/*" \
-not -path "*/.idea/*" \
-not -path "*/.vscode/*" \
-not -path "*/build/*" \
-not -path "*/out/*" \
-not -path "*/bin/*" \
-not -name "*.jar" \
-not -name "*.java" \
-exec grep -E -l " +$" {} \;)
count=0
for file in $files; do
((count++))
echo "$file"
done
if [ $count -ne 0 ]; then
failed=1
echo "Error: trailing whitespace(s) in the above $count file(s)"
fi
# Check newline
files=$(find . -type f -size +0c \
-not -path "./.git/*" \
-not -path "*/.gradle/*" \
-not -path "*/.idea/*" \
-not -path "*/.vscode/*" \
-not -path "*/build/*" \
-not -path "*/out/*" \
-not -path "*/bin/*" \
-not -name "*.jar" \
-not -name "*.java" \
-exec bash -c 'if [[ $(tail -c1 "$0" | wc -l) -eq 0 ]]; then echo "$0"; fi' {} \;)
count=0
for file in $files; do
((count++))
echo "$file"
done
if [ $count -ne 0 ]; then
failed=1
echo "Error: no newline in the above $count file(s)"
fi
exit $failed

View File

@ -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.
@ -24,18 +24,19 @@ jobs:
stale:
runs-on: ubuntu-latest
steps:
- uses: actions/stale@v6
- uses: actions/stale@v9
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}
days-before-stale: 60
days-before-close: 7
only-labels: 'waiting-for-feedbacks'
stale-issue-label: stale
exempt-issue-label: never-stale
exempt-issue-labels: never-stale
stale-pr-label: stale
exempt-pr-label: never-stale
exempt-pr-labels: never-stale
stale-issue-message: |
This issue 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.
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.

View File

@ -4,7 +4,7 @@ jetcd is Apache 2.0 licensed and accepts contributions via GitHub pull requests.
# Email and chat
- Email: [etcd-dev](https://groups.google.com/forum/?hl=en#!forum/etcd-dev)
- Email: [etcd-dev](https://groups.google.com/g/etcd-dev)
- IRC: #[etcd](irc://irc.freenode.org:6667/#etcd) IRC channel on freenode.org
## Getting started
@ -25,7 +25,7 @@ This is a rough outline of what a contributor's workflow looks like:
- Make sure commit messages are in the proper format (see below).
- Push changes in a topic branch to a personal fork of the repository.
- Submit a pull request to etcd-io/jetcd.
- The PR must receive a LGTM from at least one maintainer found in the [MAINTAINERS](https://github.com/etcd-io/etcd/blob/master/MAINTAINERS) file.
- The PR must receive a LGTM from at least one maintainer found in the [OWNERS](https://github.com/etcd-io/jetcd/blob/main/OWNERS) file.
Thanks for contributing!
@ -40,7 +40,7 @@ Please follow this style to make jetcd easy to review, maintain, and develop.
To make sure CI checks would pass please run
```bash
./mvnw license:format
./gradlew spotlessApply
```
and including any changes in PR before opening it.

View File

@ -1,5 +0,0 @@
Fanmin Shi <fanmin.shi@coreos.com> (@fanminshi) pkg:*
Luca Burgazzoli <lburgazzoli@gmail.com> (@lburgazzoli) pkg:*
Xiang Li <xiang.li@coreos.com> (@xiang90) pkg:*
Anthony Romano <anthony.romano@coreos.com> (@heyitsanthony) pkg:*

6
OWNERS Normal file
View File

@ -0,0 +1,6 @@
# See the OWNERS docs at https://go.k8s.io/owners
approvers:
- fanminshi # Fanmin Shi <fanmin.shi@coreos.com>
- lburgazzoli # Luca Burgazzoli <lburgazzoli@gmail.com>
- vorburger # Michael Vorburger <mike@vorburger.ch>

View File

@ -10,7 +10,7 @@ jetcd is the official java client for [etcd](https://github.com/etcd-io/etcd) v3
## Java Versions
Java 8 or above is required.
Java 11 or above is required.
## Download
@ -23,7 +23,7 @@ Java 8 or above is required.
</dependency>
```
Development snapshots are available in [Sonatypes's snapshot repository](https://oss.sonatype.org/content/repositories/snapshots/io/etcd).
Development snapshots are available in [Sonatypes's snapshot repository](https://oss.sonatype.org/content/repositories/snapshots/io/etcd/).
### Gradle
@ -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();
@ -111,7 +111,7 @@ The project is tested against a three node `etcd` setup started with the Launche
```sh
$ ./gradlew test
````
```
### Troubleshooting
@ -119,7 +119,7 @@ It recommmonds building the project before running tests so that you have artifa
## Contact
* Mailing list: [etcd-dev](https://groups.google.com/forum/?hl=en#!forum/etcd-dev)
* Mailing list: [etcd-dev](https://groups.google.com/g/etcd-dev)
## Contributing
@ -128,3 +128,5 @@ See [CONTRIBUTING](https://github.com/etcd-io/jetcd/blob/master/CONTRIBUTING.md)
## License
jetcd is under the Apache 2.0 license. See the [LICENSE](https://github.com/etcd-io/jetcd/blob/master/LICENSE) file for details.

View File

@ -63,7 +63,7 @@ subprojects {
}
compileJava {
options.release = 8
options.release = 11
}
test {
@ -72,18 +72,28 @@ subprojects {
maxParallelForks = Runtime.runtime.availableProcessors() ?: 1
retry {
maxRetries = 3
maxRetries = 1
maxFailures = 5
}
}
testing {
suites {
test {
useJUnitJupiter()
}
}
}
testlogger {
theme 'mocha-parallel'
showStandardStreams false
}
task allDeps(type: DependencyReportTask) {
tasks.register('allDeps', DependencyReportTask)
tasks.withType(AbstractArchiveTask).configureEach {
preserveFileTimestamps = false
reproducibleFileOrder = true
}
}

View File

@ -1,61 +1,3 @@
## CoreOS Community Code of Conduct
## etcd Community Code of Conduct
### Contributor Code of Conduct
As contributors and maintainers of this project, and in the interest of
fostering an open and welcoming community, we pledge to respect all people who
contribute through reporting issues, posting feature requests, updating
documentation, submitting pull requests or patches, and other activities.
We are committed to making participation in this project a harassment-free
experience for everyone, regardless of level of experience, gender, gender
identity and expression, sexual orientation, disability, personal appearance,
body size, race, ethnicity, age, religion, or nationality.
Examples of unacceptable behavior by participants include:
* The use of sexualized language or imagery
* Personal attacks
* Trolling or insulting/derogatory comments
* Public or private harassment
* Publishing others' private information, such as physical or electronic addresses, without explicit permission
* Other unethical or unprofessional conduct.
Project maintainers have the right and responsibility to remove, edit, or
reject comments, commits, code, wiki edits, issues, and other contributions
that are not aligned to this Code of Conduct. By adopting this Code of Conduct,
project maintainers commit themselves to fairly and consistently applying these
principles to every aspect of managing this project. Project maintainers who do
not follow or enforce the Code of Conduct may be permanently removed from the
project team.
This code of conduct applies both within project spaces and in public spaces
when an individual is representing the project or its community.
Instances of abusive, harassing, or otherwise unacceptable behavior may be
reported by contacting a project maintainer, Brandon Philips
<brandon.philips@coreos.com>, and/or Rithu John <rithu.john@coreos.com>.
This Code of Conduct is adapted from the Contributor Covenant
(http://contributor-covenant.org), version 1.2.0, available at
http://contributor-covenant.org/version/1/2/0/
### CoreOS Events Code of Conduct
CoreOS events are working conferences intended for professional networking and
collaboration in the CoreOS community. Attendees are expected to behave
according to professional standards and in accordance with their employers
policies on appropriate workplace behavior.
While at CoreOS events or related social networking opportunities, attendees
should not engage in discriminatory or offensive speech or actions including
but not limited to gender, sexuality, race, age, disability, or religion.
Speakers should be especially aware of these concerns.
CoreOS does not condone any statements by speakers contrary to these standards.
CoreOS reserves the right to deny entrance and/or eject from an event (without
refund) any individual found to be engaging in discriminatory or offensive
speech or actions.
Please bring any concerns to the immediate attention of designated on-site
staff, Brandon Philips <brandon.philips@coreos.com>, and/or Rithu John <rithu.john@coreos.com>.
etcd follows the [CNCF Code of Conduct](https://github.com/cncf/foundation/blob/master/code-of-conduct.md).

View File

@ -26,6 +26,3 @@ for (KeyValue kv : response.getKvs()) {
);
}
----

View File

@ -46,7 +46,7 @@ The Lease interface provides methods to grant, revoke, and keepalive leases.
1. This function is called periodically by `keepAliveSchedule`.
2. The lease may expire as:
* The etcd respond overtime.
* The client faile to send request in time.
* The client fails to send request in time.
3. It will scan the keepAlives map and find the leases that requires keepAlive requests to send based on its nextKeepAliveTime.
4. Send request to the StreamObserver for these leases.
@ -66,4 +66,4 @@ The Lease interface provides methods to grant, revoke, and keepalive leases.
1. The StreamObserver is the stream etcd uses to send responses.
2. The gRPC client calls onNext when etcd server delivers a response.
3. The onNext function will call `processKeepAliveRespond`.
3. The onNext function will call `processKeepAliveRespond`.

21
docs/RELEASE.adoc Normal file
View File

@ -0,0 +1,21 @@
= Release
+
[source,shell]
----
$ ./gradlew currentVersion
Project version: 0.7.5-SNAPSHOT
$ ./gradlew release
$ git tag
jetcd-0.7.5
$ ./gradlew currentVersion
Project version: 0.7.5
$ ./gradlew publish
published jetcd-0.7.5 release version
$ ./gradlew markNextVersion -Prelease.version=0.7.6
----

View File

@ -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);
});
```
```

View File

@ -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.
2. Call `watch` function with the new watch creation request.

View File

@ -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.
@ -271,4 +271,3 @@
<setting id="org.eclipse.jdt.core.formatter.enabling_tag" value="CHECKSTYLE:ON"/>
</profile>
</profiles>

View File

@ -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.

View File

@ -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.
@ -44,6 +44,7 @@
<rule ref="category/java/codestyle.xml/UselessQualifiedThis"/>
<rule ref="category/java/codestyle.xml/ControlStatementBraces"/>
<rule ref="category/java/codestyle.xml/UnnecessaryImport"/>
<rule ref="category/java/codestyle.xml/EmptyControlStatement"/>
<rule ref="category/java/design.xml/FinalFieldCouldBeStatic">
<priority>4</priority>
@ -73,15 +74,6 @@
</properties>
</rule>
<rule ref="category/java/errorprone.xml/EmptyFinallyBlock"/>
<rule ref="category/java/errorprone.xml/EmptyIfStmt"/>
<rule ref="category/java/errorprone.xml/EmptyInitializer"/>
<rule ref="category/java/errorprone.xml/EmptyStatementBlock"/>
<rule ref="category/java/errorprone.xml/EmptyStatementNotInLoop"/>
<rule ref="category/java/errorprone.xml/EmptySwitchStatements"/>
<rule ref="category/java/errorprone.xml/EmptySynchronizedBlock"/>
<rule ref="category/java/errorprone.xml/EmptyTryBlock"/>
<rule ref="category/java/errorprone.xml/EmptyWhileStmt"/>
<rule ref="category/java/errorprone.xml/JumbledIncrementer"/>
<rule ref="category/java/errorprone.xml/MisplacedNullCheck"/>
<rule ref="category/java/errorprone.xml/OverrideBothEqualsAndHashcode"/>
@ -98,4 +90,4 @@
<rule ref="category/java/performance.xml/BigIntegerInstantiation"/>
<rule ref="category/java/bestpractices.xml/PrimitiveWrapperInstantiation" />
</ruleset>
</ruleset>

View File

@ -1,11 +1,10 @@
#
# project
#
gitProject = 'https://github.com/etcd-io/jetcd'
gitURL = 'git@github.com/etcd-io/jetcd.git'
gitProject = https://github.com/etcd-io/jetcd
gitURL = git@github.com/etcd-io/jetcd.git
#
# gradle
#
org.gradle.parallel = true

View File

@ -1,32 +1,34 @@
[versions]
grpc = "1.51.0"
log4j = "2.19.0"
mockito = "4.9.0"
slf4j = "2.0.5"
guava = "31.1-jre"
assertj = "3.23.1"
junit = "5.9.1"
testcontainers = "1.17.6"
protoc = "3.21.10"
failsafe = "2.4.4"
awaitility = "4.2.0"
commonsIo = "2.11.0"
commonCompress = "1.22"
autoService = "1.0.1"
jool = "0.9.14"
jcommander = "1.82"
errorprone = "2.16"
vertx = "4.3.5"
grpc = "1.74.0"
log4j = "2.25.1"
mockito = "5.18.0"
slf4j = "2.0.17"
guava = "33.4.8-jre"
assertj = "3.27.3"
junit = "5.13.4"
testcontainers = "1.21.3"
protoc = "3.25.1"
failsafe = "3.3.2"
awaitility = "4.3.0"
commonsIo = "2.20.0"
commonCompress = "1.28.0"
autoService = "1.1.1"
errorprone = "2.30.0"
vertx = "5.0.1"
picocli = "4.7.7"
restAssured = "5.5.5"
javaxAnnotation = "1.3.2"
versionsPlugin = "0.52.0"
errorPronePlugin = "4.0.1"
spotlessPlugin = "6.25.0"
shadowPlugin = "8.1.1"
testLoggerPlugin = "4.0.0"
protobufPlugin = "0.9.5"
nexusPublishPlugin = "2.0.0"
axionReleasePlugin = "1.18.17"
testRetryPlugin = "1.6.2"
versionsPlugin = "0.44.0"
errorPronePlugin = "3.0.1"
spotlessPlugin = "6.12.0"
shadowPlugin = "7.1.2"
testLoggerPlugin = "3.2.0"
protobufPlugin = "0.9.1"
nexusPublishPlugin = "1.1.0"
axionReleasePlugin = "1.14.3"
testRetryPlugin = "1.5.0"
[libraries]
slf4j = { module = "org.slf4j:slf4j-api", version.ref = "slf4j" }
@ -35,10 +37,10 @@ assertj = { module = "org.assertj:assertj-core", version.ref = "assertj" }
junit = { module = "org.junit.jupiter:junit-jupiter", version.ref = "junit" }
testcontainers = { module = "org.testcontainers:testcontainers", version.ref = "testcontainers" }
protoc = { module = "com.google.protobuf:protoc", version.ref = "protoc" }
failsafe = { module = "net.jodah:failsafe", version.ref = "failsafe" }
failsafe = { module = "dev.failsafe:failsafe", version.ref = "failsafe" }
awaitility = { module = "org.awaitility:awaitility", version.ref = "awaitility" }
jcommander = { module = "com.beust:jcommander", version.ref = "jcommander"}
jool = { module = "org.jooq:jool-java-8", version.ref = "jool"}
picocli = { module = "info.picocli:picocli", version.ref = "picocli"}
restAssured = { module = "io.rest-assured:rest-assured", version.ref = "restAssured"}
commonsIo = { module = "commons-io:commons-io", version.ref = "commonsIo" }
commonsCompress = { module = "org.apache.commons:commons-compress", version.ref = "commonCompress" }
@ -51,27 +53,32 @@ grpcNetty = { module = "io.grpc:grpc-netty", version.ref = "grpc" }
grpcProtobuf = { module = "io.grpc:grpc-protobuf", version.ref = "grpc" }
grpcStub = { module = "io.grpc:grpc-stub", version.ref = "grpc" }
grpcGrpclb = { module = "io.grpc:grpc-grpclb", version.ref = "grpc" }
grpcInprocess = { module = "io.grpc:grpc-inprocess", version.ref = "grpc" }
grpcUtil = { module = "io.grpc:grpc-util", version.ref = "grpc" }
vertxGrpc = { module = "io.vertx:vertx-grpc", version.ref = "vertx" }
log4jApi = { module = "org.apache.logging.log4j:log4j-api", version.ref = "log4j" }
log4jCore = { module = "org.apache.logging.log4j:log4j-core", version.ref = "log4j" }
log4jSlf4j = { module = "org.apache.logging.log4j:log4j-slf4j-impl", version.ref = "log4j" }
log4jSlf4j = { module = "org.apache.logging.log4j:log4j-slf4j2-impl", version.ref = "log4j" }
log4j12 = { module = "org.apache.logging.log4j:log4j-1.2-api", version.ref = "log4j" }
autoServiceAnnotations = { module = "com.google.auto.service:auto-service-annotations", version.ref = "autoService"}
autoServiceProcessor = { module = "com.google.auto.service:auto-service", version.ref = "autoService"}
javaxAnnotation = { module = "javax.annotation:javax.annotation-api", version.ref = "javaxAnnotation" }
errorprone = { module = "com.google.errorprone:error_prone_core", version.ref = "errorprone" }
errorproneAnnotations = { module = "com.google.errorprone:error_prone_annotations", version.ref = "errorprone" }
errorproneJavac = { module = "com.google.errorprone:javac", version = "9+181-r4173-1" }
errorproneJavac = { module = "com.google.errorprone:javac", version = "9+" }
[bundles]
grpc = [ "grpcCore", "grpcNetty", "grpcProtobuf", "grpcStub", "grpcGrpclb" ]
log4j = [ "log4jApi", "log4jCore", "log4jSlf4j", "log4j12" ]
mockito = [ "mockitoCore", "mockitoJunit" ]
testing = ["junit", "assertj", "mockitoCore", "mockitoJunit"]
grpc = [ "grpcCore", "grpcNetty", "grpcProtobuf", "grpcStub", "grpcGrpclb", "grpcUtil"]
grpcTest = [ "grpcInprocess"]
log4j = [ "log4jApi", "log4jCore", "log4jSlf4j", "log4j12" ]
mockito = [ "mockitoCore", "mockitoJunit" ]
testing = ["junit", "assertj", "mockitoCore", "mockitoJunit"]
javax = [ "javaxAnnotation" ]
[plugins]

View File

@ -20,10 +20,10 @@ apply plugin: "io.github.gradle-nexus.publish-plugin"
ext {
if (!project.hasProperty('nexusUsername')) {
nexusUsername = "$System.env.OSSRH_USERNAME"
nexusUsername = "$System.env.NEXUS_USERNAME"
}
if (!project.hasProperty('nexusPassword')) {
nexusPassword = "$System.env.OSSRH_PASSWORD"
nexusPassword = "$System.env.NEXUS_PASSWORD"
}
}

View File

@ -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.
@ -22,4 +22,4 @@ task pubblications {
println "Publication $publication.name [$publication.groupId/$publication.artifactId/$publication.version]"
}
}
}
}

View File

@ -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.
@ -89,6 +89,8 @@ signing {
sign publishing.publications."${project.name}"
}
check.dependsOn javadoc
javadoc {
if(JavaVersion.current().isJava9Compatible()) {
options.addBooleanOption('html5', true)
@ -96,4 +98,3 @@ javadoc {
exclude "**/io/etcd/jetcd/api/**"
}

View File

@ -28,9 +28,10 @@ tasks.withType(JavaCompile).configureEach {
excludedPaths = '.*/generated/.*'
disableWarningsInGeneratedCode = true
}
options.deprecation = true
}
pmd {
consoleOutput = true
ruleSets = [ rootProject.file("etc/pmd-ruleset.xml") ]
ruleSets = [ "${project.rootDir}/etc/pmd-ruleset.xml" ]
}

View File

@ -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.
@ -25,4 +25,4 @@ scmVersion {
allprojects {
project.version = scmVersion.version
}
}

Binary file not shown.

View File

@ -1,6 +1,7 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-7.6-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-8.14-bin.zip
networkTimeout=10000
validateDistributionUrl=true
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists

37
gradlew vendored
View File

@ -15,6 +15,8 @@
# See the License for the specific language governing permissions and
# limitations under the License.
#
# SPDX-License-Identifier: Apache-2.0
#
##############################################################################
#
@ -55,7 +57,7 @@
# Darwin, MinGW, and NonStop.
#
# (3) This script is generated from the Groovy template
# https://github.com/gradle/gradle/blob/HEAD/subprojects/plugins/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt
# https://github.com/gradle/gradle/blob/HEAD/platforms/jvm/plugins-application/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt
# within the Gradle project.
#
# You can find Gradle at https://github.com/gradle/gradle/.
@ -83,10 +85,8 @@ done
# This is normally unused
# shellcheck disable=SC2034
APP_BASE_NAME=${0##*/}
APP_HOME=$( cd "${APP_HOME:-./}" && pwd -P ) || exit
# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"'
# Discard cd standard output in case $CDPATH is set (https://github.com/gradle/gradle/issues/25036)
APP_HOME=$( cd -P "${APP_HOME:-./}" > /dev/null && printf '%s\n' "$PWD" ) || exit
# Use the maximum available, or set MAX_FD != -1 to use that value.
MAX_FD=maximum
@ -114,7 +114,7 @@ case "$( uname )" in #(
NONSTOP* ) nonstop=true ;;
esac
CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar
CLASSPATH="\\\"\\\""
# Determine the Java command to use to start the JVM.
@ -133,10 +133,13 @@ location of your Java installation."
fi
else
JAVACMD=java
which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
if ! command -v java >/dev/null 2>&1
then
die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
Please set the JAVA_HOME variable in your environment to match the
location of your Java installation."
fi
fi
# Increase the maximum file descriptors if we can.
@ -144,7 +147,7 @@ if ! "$cygwin" && ! "$darwin" && ! "$nonstop" ; then
case $MAX_FD in #(
max*)
# In POSIX sh, ulimit -H is undefined. That's why the result is checked to see if it worked.
# shellcheck disable=SC3045
# shellcheck disable=SC2039,SC3045
MAX_FD=$( ulimit -H -n ) ||
warn "Could not query maximum file descriptor limit"
esac
@ -152,7 +155,7 @@ if ! "$cygwin" && ! "$darwin" && ! "$nonstop" ; then
'' | soft) :;; #(
*)
# In POSIX sh, ulimit -n is undefined. That's why the result is checked to see if it worked.
# shellcheck disable=SC3045
# shellcheck disable=SC2039,SC3045
ulimit -n "$MAX_FD" ||
warn "Could not set maximum file descriptor limit to $MAX_FD"
esac
@ -197,16 +200,20 @@ if "$cygwin" || "$msys" ; then
done
fi
# Collect all arguments for the java command;
# * $DEFAULT_JVM_OPTS, $JAVA_OPTS, and $GRADLE_OPTS can contain fragments of
# shell script including quotes and variable substitutions, so put them in
# double quotes to make sure that they get re-expanded; and
# * put everything else in single quotes, so that it's not re-expanded.
# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"'
# Collect all arguments for the java command:
# * DEFAULT_JVM_OPTS, JAVA_OPTS, and optsEnvironmentVar are not allowed to contain shell fragments,
# and any embedded shellness will be escaped.
# * For example: A user cannot expect ${Hostname} to be expanded, as it is an environment variable and will be
# treated as '${Hostname}' itself on the command line.
set -- \
"-Dorg.gradle.appname=$APP_BASE_NAME" \
-classpath "$CLASSPATH" \
org.gradle.wrapper.GradleWrapperMain \
-jar "$APP_HOME/gradle/wrapper/gradle-wrapper.jar" \
"$@"
# Stop when "xargs" is not available.

186
gradlew.bat vendored
View File

@ -1,92 +1,94 @@
@rem
@rem Copyright 2015 the original author or authors.
@rem
@rem Licensed under the Apache License, Version 2.0 (the "License");
@rem you may not use this file except in compliance with the License.
@rem You may obtain a copy of the License at
@rem
@rem https://www.apache.org/licenses/LICENSE-2.0
@rem
@rem Unless required by applicable law or agreed to in writing, software
@rem distributed under the License is distributed on an "AS IS" BASIS,
@rem WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@rem See the License for the specific language governing permissions and
@rem limitations under the License.
@rem
@if "%DEBUG%"=="" @echo off
@rem ##########################################################################
@rem
@rem Gradle startup script for Windows
@rem
@rem ##########################################################################
@rem Set local scope for the variables with windows NT shell
if "%OS%"=="Windows_NT" setlocal
set DIRNAME=%~dp0
if "%DIRNAME%"=="" set DIRNAME=.
@rem This is normally unused
set APP_BASE_NAME=%~n0
set APP_HOME=%DIRNAME%
@rem Resolve any "." and ".." in APP_HOME to make it shorter.
for %%i in ("%APP_HOME%") do set APP_HOME=%%~fi
@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
set DEFAULT_JVM_OPTS="-Xmx64m" "-Xms64m"
@rem Find java.exe
if defined JAVA_HOME goto findJavaFromJavaHome
set JAVA_EXE=java.exe
%JAVA_EXE% -version >NUL 2>&1
if %ERRORLEVEL% equ 0 goto execute
echo.
echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
echo.
echo Please set the JAVA_HOME variable in your environment to match the
echo location of your Java installation.
goto fail
:findJavaFromJavaHome
set JAVA_HOME=%JAVA_HOME:"=%
set JAVA_EXE=%JAVA_HOME%/bin/java.exe
if exist "%JAVA_EXE%" goto execute
echo.
echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME%
echo.
echo Please set the JAVA_HOME variable in your environment to match the
echo location of your Java installation.
goto fail
:execute
@rem Setup the command line
set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar
@rem Execute Gradle
"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %*
:end
@rem End local scope for the variables with windows NT shell
if %ERRORLEVEL% equ 0 goto mainEnd
:fail
rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of
rem the _cmd.exe /c_ return code!
set EXIT_CODE=%ERRORLEVEL%
if %EXIT_CODE% equ 0 set EXIT_CODE=1
if not ""=="%GRADLE_EXIT_CONSOLE%" exit %EXIT_CODE%
exit /b %EXIT_CODE%
:mainEnd
if "%OS%"=="Windows_NT" endlocal
:omega
@rem
@rem Copyright 2015 the original author or authors.
@rem
@rem Licensed under the Apache License, Version 2.0 (the "License");
@rem you may not use this file except in compliance with the License.
@rem You may obtain a copy of the License at
@rem
@rem https://www.apache.org/licenses/LICENSE-2.0
@rem
@rem Unless required by applicable law or agreed to in writing, software
@rem distributed under the License is distributed on an "AS IS" BASIS,
@rem WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@rem See the License for the specific language governing permissions and
@rem limitations under the License.
@rem
@rem SPDX-License-Identifier: Apache-2.0
@rem
@if "%DEBUG%"=="" @echo off
@rem ##########################################################################
@rem
@rem Gradle startup script for Windows
@rem
@rem ##########################################################################
@rem Set local scope for the variables with windows NT shell
if "%OS%"=="Windows_NT" setlocal
set DIRNAME=%~dp0
if "%DIRNAME%"=="" set DIRNAME=.
@rem This is normally unused
set APP_BASE_NAME=%~n0
set APP_HOME=%DIRNAME%
@rem Resolve any "." and ".." in APP_HOME to make it shorter.
for %%i in ("%APP_HOME%") do set APP_HOME=%%~fi
@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
set DEFAULT_JVM_OPTS="-Xmx64m" "-Xms64m"
@rem Find java.exe
if defined JAVA_HOME goto findJavaFromJavaHome
set JAVA_EXE=java.exe
%JAVA_EXE% -version >NUL 2>&1
if %ERRORLEVEL% equ 0 goto execute
echo. 1>&2
echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. 1>&2
echo. 1>&2
echo Please set the JAVA_HOME variable in your environment to match the 1>&2
echo location of your Java installation. 1>&2
goto fail
:findJavaFromJavaHome
set JAVA_HOME=%JAVA_HOME:"=%
set JAVA_EXE=%JAVA_HOME%/bin/java.exe
if exist "%JAVA_EXE%" goto execute
echo. 1>&2
echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME% 1>&2
echo. 1>&2
echo Please set the JAVA_HOME variable in your environment to match the 1>&2
echo location of your Java installation. 1>&2
goto fail
:execute
@rem Setup the command line
set CLASSPATH=
@rem Execute Gradle
"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" -jar "%APP_HOME%\gradle\wrapper\gradle-wrapper.jar" %*
:end
@rem End local scope for the variables with windows NT shell
if %ERRORLEVEL% equ 0 goto mainEnd
:fail
rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of
rem the _cmd.exe /c_ return code!
set EXIT_CODE=%ERRORLEVEL%
if %EXIT_CODE% equ 0 set EXIT_CODE=1
if not ""=="%GRADLE_EXIT_CONSOLE%" exit %EXIT_CODE%
exit /b %EXIT_CODE%
:mainEnd
if "%OS%"=="Windows_NT" endlocal
:omega

View File

@ -31,12 +31,22 @@ import io.grpc.Status;
*/
public enum ErrorCode {
CANCELLED(Status.CANCELLED), UNKNOWN(Status.UNKNOWN), INVALID_ARGUMENT(Status.INVALID_ARGUMENT),
DEADLINE_EXCEEDED(Status.DEADLINE_EXCEEDED), NOT_FOUND(Status.NOT_FOUND), ALREADY_EXISTS(Status.ALREADY_EXISTS),
PERMISSION_DENIED(Status.PERMISSION_DENIED), UNAUTHENTICATED(Status.UNAUTHENTICATED),
RESOURCE_EXHAUSTED(Status.RESOURCE_EXHAUSTED), FAILED_PRECONDITION(Status.FAILED_PRECONDITION), ABORTED(Status.ABORTED),
OUT_OF_RANGE(Status.OUT_OF_RANGE), UNIMPLEMENTED(Status.UNIMPLEMENTED), INTERNAL(Status.INTERNAL),
UNAVAILABLE(Status.UNAVAILABLE), DATA_LOSS(Status.DATA_LOSS),;
CANCELLED(Status.CANCELLED),
UNKNOWN(Status.UNKNOWN),
INVALID_ARGUMENT(Status.INVALID_ARGUMENT),
DEADLINE_EXCEEDED(Status.DEADLINE_EXCEEDED),
NOT_FOUND(Status.NOT_FOUND),
ALREADY_EXISTS(Status.ALREADY_EXISTS),
PERMISSION_DENIED(Status.PERMISSION_DENIED),
UNAUTHENTICATED(Status.UNAUTHENTICATED),
RESOURCE_EXHAUSTED(Status.RESOURCE_EXHAUSTED),
FAILED_PRECONDITION(Status.FAILED_PRECONDITION),
ABORTED(Status.ABORTED),
OUT_OF_RANGE(Status.OUT_OF_RANGE),
UNIMPLEMENTED(Status.UNIMPLEMENTED),
INTERNAL(Status.INTERNAL),
UNAVAILABLE(Status.UNAVAILABLE),
DATA_LOSS(Status.DATA_LOSS),;
private static final Map<Integer, ErrorCode> errorByRpcCode;

View File

@ -16,7 +16,7 @@
package io.etcd.jetcd.common.exception;
import static com.google.common.base.Preconditions.checkNotNull;
import java.util.Objects;
/**
* Base exception type for all exceptions produced by the etcd service.
@ -27,7 +27,7 @@ public class EtcdException extends RuntimeException {
EtcdException(ErrorCode code, String message, Throwable cause) {
super(message, cause);
this.code = checkNotNull(code);
this.code = Objects.requireNonNull(code, "Error code must not be null");
}
/**

View File

@ -16,9 +16,10 @@
package io.etcd.jetcd.common.exception;
import java.util.Objects;
import io.grpc.Status;
import static com.google.common.base.Preconditions.checkNotNull;
import static io.grpc.Status.fromThrowable;
/**
@ -65,7 +66,7 @@ public final class EtcdExceptionFactory {
}
public static EtcdException toEtcdException(Throwable cause) {
checkNotNull(cause, "cause can't be null");
Objects.requireNonNull(cause, "cause can't be null");
if (cause instanceof EtcdException) {
return (EtcdException) cause;
}
@ -74,7 +75,7 @@ public final class EtcdExceptionFactory {
}
public static EtcdException toEtcdException(Status status) {
checkNotNull(status, "status can't be null");
Objects.requireNonNull(status, "status can't be null");
return fromStatus(status);
}

View File

@ -20,6 +20,7 @@ dependencies {
api project(':jetcd-common')
api libs.slf4j
api libs.guava
api libs.failsafe
//compileOnly libs.javaxAnnotation
@ -30,6 +31,7 @@ dependencies {
testImplementation project(':jetcd-launcher')
testImplementation project(':jetcd-test')
testImplementation libs.restAssured
testImplementation libs.awaitility
testImplementation libs.commonsIo
testImplementation libs.bundles.testing

View File

@ -17,8 +17,8 @@
package io.etcd.jetcd;
import java.nio.charset.Charset;
import java.util.Objects;
import com.google.common.base.Preconditions;
import com.google.protobuf.ByteString;
/**
@ -32,7 +32,7 @@ public final class ByteSequence {
private final ByteString byteString;
private ByteSequence(ByteString byteString) {
Preconditions.checkNotNull(byteString, "byteString should not be null");
Objects.requireNonNull(byteString, "byteString should not be null");
this.byteString = byteString;
this.hashVal = byteString.hashCode();
}
@ -48,9 +48,7 @@ public final class ByteSequence {
if (prefix == null) {
return false;
}
ByteString baseByteString = byteString;
ByteString prefixByteString = prefix.byteString;
return baseByteString.startsWith(prefixByteString);
return byteString.startsWith(prefix.byteString);
}
/**
@ -60,7 +58,7 @@ public final class ByteSequence {
* @return a new {@code ByteSequence} instance
*/
public ByteSequence concat(ByteSequence other) {
Preconditions.checkNotNull(other, "other byteSequence should not be null");
Objects.requireNonNull(other, "other byteSequence should not be null");
return new ByteSequence(this.byteString.concat(other.byteString));
}
@ -71,7 +69,7 @@ public final class ByteSequence {
* @return a new {@code ByteSequence} instance
*/
public ByteSequence concat(ByteString other) {
Preconditions.checkNotNull(other, "other byteSequence should not be null");
Objects.requireNonNull(other, "other byteSequence should not be null");
return new ByteSequence(this.byteString.concat(other));
}
@ -157,10 +155,22 @@ public final class ByteSequence {
return new ByteSequence(ByteString.copyFrom(bytes));
}
/**
* Create new ByteSequence from a {@link ByteString}.
*
* @param source input {@link ByteString}
* @return the ByteSequence
*/
public static ByteSequence from(ByteString source) {
return new ByteSequence(source);
}
/**
* Create new ByteSequence from raw bytes.
*
* @param source input bytes
* @return the ByteSequence
*/
public static ByteSequence from(byte[] source) {
return new ByteSequence(ByteString.copyFrom(source));
}

View File

@ -19,16 +19,12 @@ package io.etcd.jetcd;
import java.net.URI;
import java.time.Duration;
import java.time.temporal.ChronoUnit;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collections;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.*;
import java.util.concurrent.ExecutorService;
import java.util.function.Consumer;
import java.util.stream.Collectors;
import java.util.stream.Stream;
import java.util.stream.StreamSupport;
import javax.net.ssl.SSLException;
@ -41,13 +37,12 @@ import io.grpc.Metadata;
import io.grpc.netty.GrpcSslContexts;
import io.netty.handler.ssl.SslContext;
import io.netty.handler.ssl.SslContextBuilder;
import io.vertx.core.Vertx;
import com.google.common.base.Preconditions;
import com.google.common.base.Strings;
import com.google.common.collect.Streams;
/**
* ClientBuilder knows how to create an Client instance.
* ClientBuilder knows how to create a Client instance.
*/
public final class ClientBuilder implements Cloneable {
@ -66,6 +61,7 @@ public final class ClientBuilder implements Cloneable {
private ByteSequence namespace = ByteSequence.EMPTY;
private long retryDelay = 500;
private long retryMaxDelay = 2500;
private int retryMaxAttempts = 2;
private ChronoUnit retryChronoUnit = ChronoUnit.MILLIS;
private Duration keepaliveTime = Duration.ofSeconds(30L);
private Duration keepaliveTimeout = Duration.ofSeconds(10L);
@ -73,6 +69,7 @@ public final class ClientBuilder implements Cloneable {
private Duration retryMaxDuration;
private Duration connectTimeout;
private boolean waitForReady = true;
private Vertx vertx;
ClientBuilder() {
}
@ -135,7 +132,7 @@ public final class ClientBuilder implements Cloneable {
* @throws IllegalArgumentException if some endpoint is invalid
*/
public ClientBuilder endpoints(Iterable<URI> endpoints) {
Preconditions.checkNotNull(endpoints, "endpoints can't be null");
Objects.requireNonNull(endpoints, "endpoints can't be null");
endpoints.forEach(e -> {
if (e.getHost() == null) {
@ -143,7 +140,7 @@ public final class ClientBuilder implements Cloneable {
}
});
final String target = Streams.stream(endpoints)
final String target = StreamSupport.stream(endpoints.spliterator(), false)
.map(e -> e.getHost() + (e.getPort() != -1 ? ":" + e.getPort() : ""))
.distinct()
.collect(Collectors.joining(","));
@ -177,7 +174,7 @@ public final class ClientBuilder implements Cloneable {
* @throws NullPointerException if user is <code>null</code>
*/
public ClientBuilder user(ByteSequence user) {
Preconditions.checkNotNull(user, "user can't be null");
Objects.requireNonNull(user, "user can't be null");
this.user = user;
return this;
}
@ -199,7 +196,7 @@ public final class ClientBuilder implements Cloneable {
* @throws NullPointerException if password is <code>null</code>
*/
public ClientBuilder password(ByteSequence password) {
Preconditions.checkNotNull(password, "password can't be null");
Objects.requireNonNull(password, "password can't be null");
this.password = password;
return this;
}
@ -222,7 +219,7 @@ public final class ClientBuilder implements Cloneable {
* @throws NullPointerException if namespace is <code>null</code>
*/
public ClientBuilder namespace(ByteSequence namespace) {
Preconditions.checkNotNull(namespace, "namespace can't be null");
Objects.requireNonNull(namespace, "namespace can't be null");
this.namespace = namespace;
return this;
}
@ -244,7 +241,7 @@ public final class ClientBuilder implements Cloneable {
* @throws NullPointerException if executorService is <code>null</code>
*/
public ClientBuilder executorService(ExecutorService executorService) {
Preconditions.checkNotNull(executorService, "executorService can't be null");
Objects.requireNonNull(executorService, "executorService can't be null");
this.executorService = executorService;
return this;
}
@ -257,7 +254,7 @@ public final class ClientBuilder implements Cloneable {
* @throws NullPointerException if loadBalancerPolicy is <code>null</code>
*/
public ClientBuilder loadBalancerPolicy(String loadBalancerPolicy) {
Preconditions.checkNotNull(loadBalancerPolicy, "loadBalancerPolicy can't be null");
Objects.requireNonNull(loadBalancerPolicy, "loadBalancerPolicy can't be null");
this.loadBalancerPolicy = loadBalancerPolicy;
return this;
}
@ -540,6 +537,26 @@ public final class ClientBuilder implements Cloneable {
return this;
}
/**
* Returns the max number of retry attempts
*
* @return max retry attempts.
*/
public int retryMaxAttempts() {
return retryMaxAttempts;
}
/**
* Set the max number of retry attempts
*
* @param retryMaxAttempts The max retry attempts.
* @return this builder
*/
public ClientBuilder retryMaxAttempts(int retryMaxAttempts) {
this.retryMaxAttempts = retryMaxAttempts;
return this;
}
/**
* Returns the keep alive time.
*
@ -692,6 +709,30 @@ public final class ClientBuilder implements Cloneable {
return this;
}
/**
* Gets the Vertx instance.
*
* @return the vertx instance.
*/
public Vertx vertx() {
return vertx;
}
/**
* configure Vertx instance.
*
* @param vertx Vertx instance to use.
* @return this builder to train
* @throws IllegalArgumentException if vertx is null
*/
public ClientBuilder vertx(Vertx vertx) {
Preconditions.checkArgument(vertx != null, "vertx can't be null");
this.vertx = vertx;
return this;
}
/**
* build a new Client.
*

View File

@ -22,11 +22,11 @@ import io.grpc.Metadata;
* Constants of Etcd.
*/
public class Constants {
public static final String TOKEN = "token";
public static final ByteSequence NULL_KEY = ByteSequence.from(new byte[] { '\0' });
public static final Metadata.Key<String> REQUIRE_LEADER_KEY = Metadata.Key.of("hasleader",
public static final Metadata.Key<String> REQUIRE_LEADER_KEY = Metadata.Key.of(
"hasleader",
Metadata.ASCII_STRING_MARSHALLER);
public static final String REQUIRE_LEADER_VALUE = "true";
}

View File

@ -26,6 +26,7 @@ import io.etcd.jetcd.options.CompactOption;
import io.etcd.jetcd.options.DeleteOption;
import io.etcd.jetcd.options.GetOption;
import io.etcd.jetcd.options.PutOption;
import io.etcd.jetcd.options.TxnOption;
import io.etcd.jetcd.support.CloseableClient;
/**
@ -115,4 +116,12 @@ public interface KV extends CloseableClient {
* @return a Txn
*/
Txn txn();
/**
* creates a transaction.
*
* @param option TxnOption
* @return a Txn
*/
Txn txn(TxnOption option);
}

View File

@ -29,9 +29,12 @@ public class KeyValue {
public KeyValue(io.etcd.jetcd.api.KeyValue kv, ByteSequence namespace) {
this.kv = kv;
this.unprefixedKey = ByteSequence
.from(kv.getKey().isEmpty() ? kv.getKey() : Util.unprefixNamespace(kv.getKey(), namespace));
this.value = ByteSequence.from(kv.getValue());
this.unprefixedKey = ByteSequence.from(
kv.getKey().isEmpty()
? kv.getKey()
: Util.unprefixNamespace(kv.getKey(), namespace));
}
/**

View File

@ -17,16 +17,9 @@
package io.etcd.jetcd;
import java.io.OutputStream;
import java.net.URI;
import java.util.concurrent.CompletableFuture;
import io.etcd.jetcd.maintenance.AlarmMember;
import io.etcd.jetcd.maintenance.AlarmResponse;
import io.etcd.jetcd.maintenance.DefragmentResponse;
import io.etcd.jetcd.maintenance.HashKVResponse;
import io.etcd.jetcd.maintenance.MoveLeaderResponse;
import io.etcd.jetcd.maintenance.SnapshotResponse;
import io.etcd.jetcd.maintenance.StatusResponse;
import io.etcd.jetcd.maintenance.*;
import io.etcd.jetcd.support.CloseableClient;
import io.grpc.stub.StreamObserver;
@ -68,16 +61,6 @@ public interface Maintenance extends CloseableClient {
*/
CompletableFuture<AlarmResponse> alarmDisarm(AlarmMember member);
/**
* Defragment one member of the cluster by its endpoint.
*
* @param endpoint the etcd server endpoint.
* @return the response result
* @deprecated use {@link #defragmentMember(String)}
*/
@Deprecated
CompletableFuture<DefragmentResponse> defragmentMember(URI endpoint);
/**
* Defragment one member of the cluster by its endpoint.
*
@ -100,16 +83,6 @@ public interface Maintenance extends CloseableClient {
*/
CompletableFuture<DefragmentResponse> defragmentMember(String target);
/**
* get the status of a member by its endpoint.
*
* @param endpoint the etcd server endpoint.
* @return the response result
* @deprecated use {@link #statusMember(String)}
*/
@Deprecated
CompletableFuture<StatusResponse> statusMember(URI endpoint);
/**
* get the status of a member by its endpoint.
*
@ -118,17 +91,6 @@ public interface Maintenance extends CloseableClient {
*/
CompletableFuture<StatusResponse> statusMember(String target);
/**
* returns a hash of the KV state at the time of the RPC.
*
* @param endpoint the etcd server endpoint.
* @param rev the revision
* @return the response result
* @deprecated use {@link #hashKV(String, long)}
*/
@Deprecated
CompletableFuture<HashKVResponse> hashKV(URI endpoint, long rev);
/**
* returns a hash of the KV state at the time of the RPC.
* If revision is zero, the hash is computed on all keys. If the revision

View File

@ -0,0 +1,32 @@
/*
* 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.
* 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.
*/
package io.etcd.jetcd;
public class Preconditions {
public static void checkArgument(boolean expression, String errorMessage) {
if (!expression) {
throw new IllegalArgumentException(errorMessage);
}
}
public static void checkState(boolean expression, String errorMessage) {
if (!expression) {
throw new IllegalStateException(errorMessage);
}
}
}

View File

@ -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.
@ -25,20 +25,19 @@ import io.etcd.jetcd.op.Op;
/**
* Txn is the interface that wraps mini-transactions.
*
* <h3>Usage examples</h3>
* <h2>Usage examples</h2>
*
* <pre>
* {@code
* txn.If(
* new Cmp(KEY, Cmp.Op.GREATER, CmpTarget.value(VALUE)),
* new Cmp(KEY, cmp.Op.EQUAL, CmpTarget.version(2))
* ).Then(
* Op.put(KEY2, VALUE2, PutOption.DEFAULT),
* Op.put(KEY3, VALUE3, PutOption.DEFAULT)
* ).Else(
* Op.put(KEY4, VALUE4, PutOption.DEFAULT),
* Op.put(KEY4, VALUE4, PutOption.DEFAULT)
* ).commit();
* new Cmp(KEY, Cmp.Op.GREATER, CmpTarget.value(VALUE)),
* new Cmp(KEY, cmp.Op.EQUAL, CmpTarget.version(2))).Then(
* Op.put(KEY2, VALUE2, PutOption.DEFAULT),
* Op.put(KEY3, VALUE3, PutOption.DEFAULT))
* .Else(
* Op.put(KEY4, VALUE4, PutOption.DEFAULT),
* Op.put(KEY4, VALUE4, PutOption.DEFAULT))
* .commit();
* }
* </pre>
*
@ -48,18 +47,17 @@ import io.etcd.jetcd.op.Op;
* <pre>
* {@code
* txn.If(
* new Cmp(KEY, Cmp.Op.GREATER, CmpTarget.value(VALUE))
* ).If(
* new Cmp(KEY, cmp.Op.EQUAL, CmpTarget.version(VERSION))
* ).Then(
* Op.put(KEY2, VALUE2, PutOption.DEFAULT)
* ).Then(
* Op.put(KEY3, VALUE3, PutOption.DEFAULT)
* ).Else(
* Op.put(KEY4, VALUE4, PutOption.DEFAULT)
* ).Else(
* Op.put(KEY4, VALUE4, PutOption.DEFAULT)
* ).commit();
* new Cmp(KEY, Cmp.Op.GREATER, CmpTarget.value(VALUE))).If(
* new Cmp(KEY, cmp.Op.EQUAL, CmpTarget.version(VERSION)))
* .Then(
* Op.put(KEY2, VALUE2, PutOption.DEFAULT))
* .Then(
* Op.put(KEY3, VALUE3, PutOption.DEFAULT))
* .Else(
* Op.put(KEY4, VALUE4, PutOption.DEFAULT))
* .Else(
* Op.put(KEY4, VALUE4, PutOption.DEFAULT))
* .commit();
* }
* </pre>
*/

View File

@ -226,6 +226,11 @@ public interface Watch extends CloseableClient {
@Override
void close();
/**
* Returns if watcher is already closed
*/
boolean isClosed();
/**
* Requests the latest revision processed and propagates it to listeners
*/

View File

@ -22,7 +22,9 @@ import java.util.stream.Collectors;
/**
* Util class for Cluster models.
*/
public class Util {
final class Util {
private Util() {
}
/**
* Converts a list of API member to a List of client side member.

View File

@ -31,7 +31,7 @@ import io.grpc.stub.MetadataUtils;
import com.google.protobuf.ByteString;
import static com.google.common.base.Preconditions.checkArgument;
import static io.etcd.jetcd.Preconditions.checkArgument;
/**
* AuthTokenInterceptor fills header with Auth token of any rpc calls and
@ -58,14 +58,11 @@ class AuthCredential extends CallCredentials {
}
}
@Override
public void thisUsesUnstableApi() {
}
public void refresh() {
meta = null;
}
@SuppressWarnings("rawtypes")
private void authenticate(MetadataApplier applier) {
checkArgument(!manager.builder().user().isEmpty(), "username can not be empty.");
checkArgument(!manager.builder().password().isEmpty(), "password can not be empty.");

View File

@ -55,7 +55,7 @@ import io.etcd.jetcd.auth.Permission;
import com.google.protobuf.ByteString;
import static com.google.common.base.Preconditions.checkNotNull;
import static java.util.Objects.requireNonNull;
/**
* Implementation of etcd auth client.
@ -88,8 +88,8 @@ final class AuthImpl extends Impl implements Auth {
@Override
public CompletableFuture<AuthUserAddResponse> userAdd(ByteSequence user, ByteSequence password) {
checkNotNull(user, "user can't be null");
checkNotNull(password, "password can't be null");
requireNonNull(user, "user can't be null");
requireNonNull(password, "password can't be null");
AuthUserAddRequest addRequest = AuthUserAddRequest.newBuilder()
.setNameBytes(ByteString.copyFrom(user.getBytes()))
@ -103,7 +103,7 @@ final class AuthImpl extends Impl implements Auth {
@Override
public CompletableFuture<AuthUserDeleteResponse> userDelete(ByteSequence user) {
checkNotNull(user, "user can't be null");
requireNonNull(user, "user can't be null");
AuthUserDeleteRequest deleteRequest = AuthUserDeleteRequest.newBuilder()
.setNameBytes(ByteString.copyFrom(user.getBytes()))
@ -116,8 +116,8 @@ final class AuthImpl extends Impl implements Auth {
@Override
public CompletableFuture<AuthUserChangePasswordResponse> userChangePassword(ByteSequence user, ByteSequence password) {
checkNotNull(user, "user can't be null");
checkNotNull(password, "password can't be null");
requireNonNull(user, "user can't be null");
requireNonNull(password, "password can't be null");
AuthUserChangePasswordRequest changePasswordRequest = AuthUserChangePasswordRequest.newBuilder()
.setNameBytes(ByteString.copyFrom(user.getBytes()))
@ -131,7 +131,7 @@ final class AuthImpl extends Impl implements Auth {
@Override
public CompletableFuture<AuthUserGetResponse> userGet(ByteSequence user) {
checkNotNull(user, "user can't be null");
requireNonNull(user, "user can't be null");
AuthUserGetRequest userGetRequest = AuthUserGetRequest.newBuilder()
.setNameBytes(ByteString.copyFrom(user.getBytes()))
@ -153,8 +153,8 @@ final class AuthImpl extends Impl implements Auth {
@Override
public CompletableFuture<AuthUserGrantRoleResponse> userGrantRole(ByteSequence user, ByteSequence role) {
checkNotNull(user, "user can't be null");
checkNotNull(role, "key can't be null");
requireNonNull(user, "user can't be null");
requireNonNull(role, "key can't be null");
AuthUserGrantRoleRequest userGrantRoleRequest = AuthUserGrantRoleRequest.newBuilder()
.setUserBytes(ByteString.copyFrom(user.getBytes()))
@ -168,8 +168,8 @@ final class AuthImpl extends Impl implements Auth {
@Override
public CompletableFuture<AuthUserRevokeRoleResponse> userRevokeRole(ByteSequence user, ByteSequence role) {
checkNotNull(user, "user can't be null");
checkNotNull(role, "key can't be null");
requireNonNull(user, "user can't be null");
requireNonNull(role, "key can't be null");
AuthUserRevokeRoleRequest userRevokeRoleRequest = AuthUserRevokeRoleRequest.newBuilder()
.setNameBytes(ByteString.copyFrom(user.getBytes()))
@ -183,7 +183,7 @@ final class AuthImpl extends Impl implements Auth {
@Override
public CompletableFuture<AuthRoleAddResponse> roleAdd(ByteSequence user) {
checkNotNull(user, "user can't be null");
requireNonNull(user, "user can't be null");
AuthRoleAddRequest roleAddRequest = AuthRoleAddRequest.newBuilder().setNameBytes(ByteString.copyFrom(user.getBytes()))
.build();
@ -196,10 +196,10 @@ final class AuthImpl extends Impl implements Auth {
@Override
public CompletableFuture<AuthRoleGrantPermissionResponse> roleGrantPermission(ByteSequence role, ByteSequence key,
ByteSequence rangeEnd, Permission.Type permType) {
checkNotNull(role, "role can't be null");
checkNotNull(key, "key can't be null");
checkNotNull(rangeEnd, "rangeEnd can't be null");
checkNotNull(permType, "permType can't be null");
requireNonNull(role, "role can't be null");
requireNonNull(key, "key can't be null");
requireNonNull(rangeEnd, "rangeEnd can't be null");
requireNonNull(permType, "permType can't be null");
io.etcd.jetcd.api.Permission.Type type;
switch (permType) {
@ -235,7 +235,7 @@ final class AuthImpl extends Impl implements Auth {
@Override
public CompletableFuture<AuthRoleGetResponse> roleGet(ByteSequence role) {
checkNotNull(role, "role can't be null");
requireNonNull(role, "role can't be null");
AuthRoleGetRequest roleGetRequest = AuthRoleGetRequest.newBuilder()
.setRoleBytes(ByteString.copyFrom(role.getBytes()))
@ -258,9 +258,9 @@ final class AuthImpl extends Impl implements Auth {
@Override
public CompletableFuture<AuthRoleRevokePermissionResponse> roleRevokePermission(ByteSequence role, ByteSequence key,
ByteSequence rangeEnd) {
checkNotNull(role, "role can't be null");
checkNotNull(key, "key can't be null");
checkNotNull(rangeEnd, "rangeEnd can't be null");
requireNonNull(role, "role can't be null");
requireNonNull(key, "key can't be null");
requireNonNull(rangeEnd, "rangeEnd can't be null");
AuthRoleRevokePermissionRequest roleRevokePermissionRequest = AuthRoleRevokePermissionRequest.newBuilder()
.setRoleBytes(ByteString.copyFrom(role.getBytes()))
@ -275,7 +275,7 @@ final class AuthImpl extends Impl implements Auth {
@Override
public CompletableFuture<AuthRoleDeleteResponse> roleDelete(ByteSequence role) {
checkNotNull(role, "role can't be null");
requireNonNull(role, "role can't be null");
AuthRoleDeleteRequest roleDeleteRequest = AuthRoleDeleteRequest.newBuilder()
.setRoleBytes(ByteString.copyFrom(role.getBytes()))
.build();

View File

@ -16,47 +16,28 @@
package io.etcd.jetcd.impl;
import java.util.concurrent.Callable;
import java.util.concurrent.CompletableFuture;
import java.util.concurrent.ExecutorService;
import java.util.concurrent.Executors;
import java.util.concurrent.TimeUnit;
import java.util.function.BiConsumer;
import java.util.function.Function;
import java.util.function.Predicate;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import io.etcd.jetcd.ByteSequence;
import io.etcd.jetcd.ClientBuilder;
import io.etcd.jetcd.support.Errors;
import io.etcd.jetcd.support.Util;
import io.grpc.CallOptions;
import io.grpc.Channel;
import io.grpc.ClientCall;
import io.grpc.ClientInterceptor;
import io.grpc.*;
import io.grpc.ForwardingClientCall.SimpleForwardingClientCall;
import io.grpc.ManagedChannel;
import io.grpc.ManagedChannelBuilder;
import io.grpc.Metadata;
import io.grpc.MethodDescriptor;
import io.grpc.netty.NegotiationType;
import io.grpc.stub.AbstractStub;
import io.netty.channel.ChannelOption;
import io.vertx.core.Vertx;
import io.vertx.core.VertxOptions;
import io.vertx.grpc.VertxChannelBuilder;
import com.google.common.util.concurrent.ListenableFuture;
import net.jodah.failsafe.Failsafe;
import net.jodah.failsafe.RetryPolicy;
import static io.etcd.jetcd.common.exception.EtcdExceptionFactory.toEtcdException;
final class ClientConnectionManager {
private static final Logger LOGGER = LoggerFactory.getLogger(ClientConnectionManager.class);
private final Object lock;
private final ClientBuilder builder;
private final ExecutorService executorService;
@ -80,6 +61,10 @@ final class ClientConnectionManager {
} else {
this.executorService = builder.executorService();
}
if (builder.vertx() != null) {
this.vertx = builder.vertx();
}
}
ManagedChannel getChannel() {
@ -173,10 +158,8 @@ final class ClientConnectionManager {
if (target == null) {
throw new IllegalArgumentException("At least one endpoint should be provided");
}
if (vertx == null) {
vertx = Vertx.vertx();
}
final VertxChannelBuilder channelBuilder = VertxChannelBuilder.forTarget(vertx, target);
final VertxChannelBuilder channelBuilder = VertxChannelBuilder.forTarget(vertx(), target);
if (builder.authority() != null) {
channelBuilder.overrideAuthority(builder.authority());
@ -208,7 +191,7 @@ final class ClientConnectionManager {
if (builder.loadBalancerPolicy() != null) {
channelBuilder.defaultLoadBalancingPolicy(builder.loadBalancerPolicy());
} else {
channelBuilder.defaultLoadBalancingPolicy("pick_first");
channelBuilder.defaultLoadBalancingPolicy("round_robin");
}
if (builder.headers() != null) {
@ -237,51 +220,15 @@ final class ClientConnectionManager {
return channelBuilder;
}
/**
* execute the task and retry it in case of failure.
*
* @param task a function that returns a new SourceFuture.
* @param resultConvert a function that converts Type S to Type T.
* @param doRetry a function that determines the retry condition base on SourceFuture error.
* @param <S> Source type
* @param <T> Converted Type.
* @return a CompletableFuture with type T.
*/
@SuppressWarnings("FutureReturnValueIgnored")
public <S, T> CompletableFuture<T> execute(
Callable<ListenableFuture<S>> task,
Function<S, T> resultConvert,
Predicate<Throwable> doRetry) {
RetryPolicy<CompletableFuture<S>> retryPolicy = new RetryPolicy<CompletableFuture<S>>().handleIf(doRetry)
.onRetriesExceeded(e -> LOGGER.warn("maximum number of auto retries reached"))
.withBackoff(builder.retryDelay(), builder.retryMaxDelay(), builder.retryChronoUnit());
if (builder.retryMaxDuration() != null) {
retryPolicy = retryPolicy.withMaxDuration(builder.retryMaxDuration());
Vertx vertx() {
if (this.vertx == null) {
synchronized (this.lock) {
if (this.vertx == null) {
this.vertx = Vertx.vertx(new VertxOptions().setUseDaemonThread(true));
}
}
}
return Failsafe.with(retryPolicy).with(executorService)
.getAsyncExecution(execution -> {
CompletableFuture<S> wrappedFuture = new CompletableFuture<>();
ListenableFuture<S> future = task.call();
future.addListener(() -> {
try {
wrappedFuture.complete(future.get());
execution.complete(wrappedFuture);
} catch (Exception error) {
if (Errors.isInvalidTokenError(error)) {
authCredential().refresh();
}
if (Errors.isAuthStoreExpired(error)) {
authCredential().refresh();
}
if (!execution.retryOn(error)) {
// permanent failure
wrappedFuture.completeExceptionally(error);
}
}
}, executorService);
}).thenCompose(f -> f.thenApply(resultConvert));
return this.vertx;
}
}

View File

@ -32,13 +32,14 @@ import io.etcd.jetcd.election.NoLeaderException;
import io.etcd.jetcd.election.NotLeaderException;
import io.etcd.jetcd.election.ProclaimResponse;
import io.etcd.jetcd.election.ResignResponse;
import io.etcd.jetcd.support.Errors;
import io.etcd.jetcd.support.Util;
import io.grpc.StatusRuntimeException;
import com.google.protobuf.ByteString;
import static com.google.common.base.Preconditions.checkNotNull;
import static io.etcd.jetcd.common.exception.EtcdExceptionFactory.toEtcdException;
import static java.util.Objects.requireNonNull;
final class ElectionImpl extends Impl implements Election {
private final VertxElectionGrpc.ElectionVertxStub stub;
@ -51,10 +52,31 @@ final class ElectionImpl extends Impl implements Election {
this.namespace = connectionManager.getNamespace();
}
// Election operations are done in a context where a client is trying to implement
// some fault tolerance related use case; in that type of context, it makes sense to always
// apply require leader, since we don't want a client connected to a non-raft-leader server
// have an election method just go silent if the server the client happens to be connected to
// becomes partitioned from the actual raft-leader server in the etcd servers cluster:
// in that scenario and without required leader, an attempt to campaign could block forever
// not because some other client is already an election leader, but because the server the client
// is connected to is partitioned and can't tell.
// With require leader, in that case the call will fail and we give
// the client the ability to (a) know (b) retry on a different server.
// The retry on a different server should happen automatically if the connection manager is using
// a round robin strategy.
//
// Beware in the context of this election API, the word "leader" is overloaded.
// In the paragraph above when we say "raft-leader" we are talking about the etcd server that is a leader
// of the etcd servers cluster according to raft, we are not talking about the client that
// happens to be the leader of an election using the election API in this file.
private VertxElectionGrpc.ElectionVertxStub stubWithLeader() {
return Util.applyRequireLeader(true, stub);
}
@Override
public CompletableFuture<CampaignResponse> campaign(ByteSequence electionName, long leaseId, ByteSequence proposal) {
checkNotNull(electionName, "election name should not be null");
checkNotNull(proposal, "proposal should not be null");
requireNonNull(electionName, "election name should not be null");
requireNonNull(proposal, "proposal should not be null");
CampaignRequest request = CampaignRequest.newBuilder()
.setName(Util.prefixNamespace(electionName, namespace))
@ -62,16 +84,17 @@ final class ElectionImpl extends Impl implements Election {
.setLease(leaseId)
.build();
return completable(
stub.campaign(request),
CampaignResponse::new,
this::convertException);
return wrapConvertException(
execute(
() -> stubWithLeader().campaign(request),
CampaignResponse::new,
Errors::isRetryableForNoSafeRedoOp));
}
@Override
public CompletableFuture<ProclaimResponse> proclaim(LeaderKey leaderKey, ByteSequence proposal) {
checkNotNull(leaderKey, "leader key should not be null");
checkNotNull(proposal, "proposal should not be null");
requireNonNull(leaderKey, "leader key should not be null");
requireNonNull(proposal, "proposal should not be null");
ProclaimRequest request = ProclaimRequest.newBuilder()
.setLeader(
@ -84,44 +107,46 @@ final class ElectionImpl extends Impl implements Election {
.setValue(ByteString.copyFrom(proposal.getBytes()))
.build();
return completable(
stub.proclaim(request),
ProclaimResponse::new,
this::convertException);
return wrapConvertException(
execute(
() -> stubWithLeader().proclaim(request),
ProclaimResponse::new,
Errors::isRetryableForNoSafeRedoOp));
}
@Override
public CompletableFuture<LeaderResponse> leader(ByteSequence electionName) {
checkNotNull(electionName, "election name should not be null");
requireNonNull(electionName, "election name should not be null");
LeaderRequest request = LeaderRequest.newBuilder()
.setName(Util.prefixNamespace(electionName, namespace))
.build();
return completable(
stub.leader(request),
r -> new LeaderResponse(r, namespace),
this::convertException);
return wrapConvertException(
execute(
() -> stubWithLeader().leader(request),
response -> new LeaderResponse(response, namespace),
Errors::isRetryableForNoSafeRedoOp));
}
@Override
public void observe(ByteSequence electionName, Listener listener) {
checkNotNull(electionName, "election name should not be null");
checkNotNull(listener, "listener should not be null");
requireNonNull(electionName, "election name should not be null");
requireNonNull(listener, "listener should not be null");
LeaderRequest request = LeaderRequest.newBuilder()
.setName(ByteString.copyFrom(electionName.getBytes()))
.setName(Util.prefixNamespace(electionName, namespace))
.build();
stub.observe(request)
.handler(value -> listener.onNext(new LeaderResponse(value, namespace)))
.endHandler(ignored -> listener.onCompleted())
.exceptionHandler(error -> listener.onError(toEtcdException(error)));
stubWithLeader().observeWithHandler(request,
value -> listener.onNext(new LeaderResponse(value, namespace)),
ignored -> listener.onCompleted(),
error -> listener.onError(toEtcdException(error)));
}
@Override
public CompletableFuture<ResignResponse> resign(LeaderKey leaderKey) {
checkNotNull(leaderKey, "leader key should not be null");
requireNonNull(leaderKey, "leader key should not be null");
ResignRequest request = ResignRequest.newBuilder()
.setLeader(
@ -133,25 +158,42 @@ final class ElectionImpl extends Impl implements Election {
.build())
.build();
return completable(
stub.resign(request),
ResignResponse::new,
this::convertException);
return wrapConvertException(
execute(
() -> stubWithLeader().resign(request),
ResignResponse::new,
Errors::isRetryableForNoSafeRedoOp));
}
private Throwable convertException(Throwable e) {
if (e instanceof StatusRuntimeException) {
StatusRuntimeException exception = (StatusRuntimeException) e;
String description = exception.getStatus().getDescription();
// different APIs use different messages. we cannot distinguish missing leader error otherwise,
// because communicated status is always UNKNOWN
if ("election: not leader".equals(description)) {
return new NotLeaderException();
} else if ("election: no leader".equals(description)) {
return new NoLeaderException();
}
}
private <S> CompletableFuture<S> wrapConvertException(CompletableFuture<S> future) {
return future.exceptionally(e -> {
throw convertException(e);
});
}
private RuntimeException convertException(Throwable e) {
Throwable cause = e;
while (cause != null) {
if (cause instanceof StatusRuntimeException) {
StatusRuntimeException exception = (StatusRuntimeException) cause;
String description = exception.getStatus().getDescription();
// different APIs use different messages. we cannot distinguish missing leader error otherwise,
// because communicated status is always UNKNOWN
if ("election: not leader".equals(description)) {
// Candidate is not a leader at the moment.
// Note there is a one letter difference, but this exception type is not the same as
// NoLeaderException.
return new NotLeaderException();
}
if ("election: no leader".equals(description)) {
// Leader for given election does not exist.
// Note there is a one letter difference, but this exception type is not the same as
// NotLeaderException.
return new NoLeaderException();
}
}
cause = cause.getCause();
}
return toEtcdException(e);
}
}

View File

@ -13,8 +13,9 @@ import io.etcd.jetcd.support.Errors;
import io.grpc.Status;
import io.vertx.core.Future;
import net.jodah.failsafe.Failsafe;
import net.jodah.failsafe.RetryPolicy;
import dev.failsafe.Failsafe;
import dev.failsafe.RetryPolicy;
import dev.failsafe.RetryPolicyBuilder;
import static io.etcd.jetcd.support.Errors.isAuthStoreExpired;
import static io.etcd.jetcd.support.Errors.isInvalidTokenError;
@ -88,9 +89,11 @@ abstract class Impl {
*/
protected <S, T> CompletableFuture<T> execute(
Supplier<Future<S>> supplier,
Function<S, T> resultConvert) {
Function<S, T> resultConvert,
boolean autoRetry) {
return execute(supplier, resultConvert, Errors::isRetryable);
return execute(supplier, resultConvert,
autoRetry ? Errors::isRetryableForSafeRedoOp : Errors::isRetryableForNoSafeRedoOp);
}
/**
@ -108,7 +111,30 @@ abstract class Impl {
Function<S, T> resultConvert,
Predicate<Status> doRetry) {
RetryPolicy<S> retryPolicy = new RetryPolicy<S>()
return Failsafe
.with(retryPolicy(doRetry))
.with(connectionManager.getExecutorService())
.getStageAsync(() -> supplier.get().toCompletionStage())
.thenApply(resultConvert);
}
protected <S> RetryPolicy<S> retryPolicy(Predicate<Status> doRetry) {
RetryPolicyBuilder<S> policy = RetryPolicy.<S> builder()
.onFailure(e -> {
logger.warn("retry failure (attempt: {}, error: {})",
e.getAttemptCount(),
e.getException() != null ? e.getException().getMessage() : "<none>");
})
.onRetry(e -> {
logger.debug("retry (attempt: {}, error: {})",
e.getAttemptCount(),
e.getLastException() != null ? e.getLastException().getMessage() : "<none>");
})
.onRetriesExceeded(e -> {
logger.warn("maximum number of auto retries reached (attempt: {}, error: {})",
e.getAttemptCount(),
e.getException() != null ? e.getException().getMessage() : "<none>");
})
.handleIf(throwable -> {
Status status = Status.fromThrowable(throwable);
if (isInvalidTokenError(status)) {
@ -119,20 +145,16 @@ abstract class Impl {
}
return doRetry.test(status);
})
.onRetriesExceeded(e -> logger.warn("maximum number of auto retries reached"))
.withMaxRetries(connectionManager.builder().retryMaxAttempts())
.withBackoff(
connectionManager.builder().retryDelay(),
connectionManager.builder().retryMaxDelay(),
connectionManager.builder().retryChronoUnit());
if (connectionManager.builder().retryMaxDuration() != null) {
retryPolicy = retryPolicy.withMaxDuration(connectionManager.builder().retryMaxDuration());
policy = policy.withMaxDuration(connectionManager.builder().retryMaxDuration());
}
return Failsafe
.with(retryPolicy)
.with(connectionManager.getExecutorService())
.getStageAsync(() -> supplier.get().toCompletionStage())
.thenApply(resultConvert);
return policy.build();
}
}

View File

@ -33,10 +33,11 @@ import io.etcd.jetcd.options.CompactOption;
import io.etcd.jetcd.options.DeleteOption;
import io.etcd.jetcd.options.GetOption;
import io.etcd.jetcd.options.PutOption;
import io.etcd.jetcd.options.TxnOption;
import io.etcd.jetcd.support.Errors;
import io.etcd.jetcd.support.Requests;
import static com.google.common.base.Preconditions.checkNotNull;
import static java.util.Objects.requireNonNull;
/**
* Implementation of etcd kv client.
@ -59,13 +60,13 @@ final class KVImpl extends Impl implements KV {
@Override
public CompletableFuture<PutResponse> put(ByteSequence key, ByteSequence value, PutOption option) {
checkNotNull(key, "key should not be null");
checkNotNull(value, "value should not be null");
checkNotNull(option, "option should not be null");
requireNonNull(key, "key should not be null");
requireNonNull(value, "value should not be null");
requireNonNull(option, "option should not be null");
return execute(
() -> stub.put(Requests.mapPutRequest(key, value, option, namespace)),
response -> new PutResponse(response, namespace),
Errors::isRetryable);
option.isAutoRetry() ? Errors::isRetryableForSafeRedoOp : Errors::isRetryableForNoSafeRedoOp);
}
@Override
@ -75,13 +76,13 @@ final class KVImpl extends Impl implements KV {
@Override
public CompletableFuture<GetResponse> get(ByteSequence key, GetOption option) {
checkNotNull(key, "key should not be null");
checkNotNull(option, "option should not be null");
requireNonNull(key, "key should not be null");
requireNonNull(option, "option should not be null");
return execute(
() -> stub.range(Requests.mapRangeRequest(key, option, namespace)),
response -> new GetResponse(response, namespace),
Errors::isRetryable);
Errors::isRetryableForSafeRedoOp);
}
@Override
@ -91,13 +92,13 @@ final class KVImpl extends Impl implements KV {
@Override
public CompletableFuture<DeleteResponse> delete(ByteSequence key, DeleteOption option) {
checkNotNull(key, "key should not be null");
checkNotNull(option, "option should not be null");
requireNonNull(key, "key should not be null");
requireNonNull(option, "option should not be null");
return execute(
() -> stub.deleteRange(Requests.mapDeleteRequest(key, option, namespace)),
response -> new DeleteResponse(response, namespace),
Errors::isRetryable);
option.isAutoRetry() ? Errors::isRetryableForSafeRedoOp : Errors::isRetryableForNoSafeRedoOp);
}
@Override
@ -107,7 +108,7 @@ final class KVImpl extends Impl implements KV {
@Override
public CompletableFuture<CompactResponse> compact(long rev, CompactOption option) {
checkNotNull(option, "option should not be null");
requireNonNull(option, "option should not be null");
CompactionRequest request = CompactionRequest.newBuilder()
.setRevision(rev).setPhysical(option.isPhysical())
@ -116,15 +117,21 @@ final class KVImpl extends Impl implements KV {
return execute(
() -> stub.compact(request),
CompactResponse::new,
Errors::isRetryable);
Errors::isRetryableForSafeRedoOp);
}
@Override
public Txn txn() {
return txn(TxnOption.DEFAULT);
}
@Override
public Txn txn(TxnOption option) {
return TxnImpl.newTxn(
request -> execute(
() -> stub.txn(request),
response -> new TxnResponse(response, namespace), Errors::isRetryable),
response -> new TxnResponse(response, namespace),
option.isAutoRetry() ? Errors::isRetryableForSafeRedoOp : Errors::isRetryableForNoSafeRedoOp),
namespace);
}
}

View File

@ -16,15 +16,15 @@
package io.etcd.jetcd.impl;
import java.util.Collection;
import java.util.Collections;
import java.util.List;
import java.util.Map;
import java.util.concurrent.CompletableFuture;
import java.util.concurrent.ConcurrentHashMap;
import java.util.concurrent.CopyOnWriteArrayList;
import java.util.concurrent.Executors;
import java.util.concurrent.ScheduledExecutorService;
import java.util.concurrent.ScheduledFuture;
import java.util.concurrent.TimeUnit;
import java.util.concurrent.atomic.AtomicReference;
import io.etcd.jetcd.Lease;
import io.etcd.jetcd.api.LeaseGrantRequest;
@ -44,10 +44,10 @@ import io.etcd.jetcd.support.Util;
import io.grpc.stub.StreamObserver;
import io.vertx.core.streams.WriteStream;
import static com.google.common.base.Preconditions.checkNotNull;
import static io.etcd.jetcd.common.exception.EtcdExceptionFactory.newClosedLeaseClientException;
import static io.etcd.jetcd.common.exception.EtcdExceptionFactory.newEtcdException;
import static io.etcd.jetcd.common.exception.EtcdExceptionFactory.toEtcdException;
import static java.util.Objects.requireNonNull;
/**
* Implementation of lease client.
@ -84,7 +84,8 @@ final class LeaseImpl extends Impl implements Lease {
LeaseGrantRequest.newBuilder()
.setTTL(ttl)
.build()),
LeaseGrantResponse::new);
LeaseGrantResponse::new,
true);
}
@Override
@ -94,7 +95,8 @@ final class LeaseImpl extends Impl implements Lease {
LeaseGrantRequest.newBuilder()
.setTTL(ttl)
.build()),
LeaseGrantResponse::new);
LeaseGrantResponse::new,
true);
}
@Override
@ -104,12 +106,13 @@ final class LeaseImpl extends Impl implements Lease {
LeaseRevokeRequest.newBuilder()
.setID(leaseId)
.build()),
LeaseRevokeResponse::new);
LeaseRevokeResponse::new,
true);
}
@Override
public CompletableFuture<LeaseTimeToLiveResponse> timeToLive(long leaseId, LeaseOption option) {
checkNotNull(option, "LeaseOption should not be null");
requireNonNull(option, "LeaseOption should not be null");
LeaseTimeToLiveRequest leaseTimeToLiveRequest = LeaseTimeToLiveRequest.newBuilder()
.setID(leaseId)
@ -118,7 +121,8 @@ final class LeaseImpl extends Impl implements Lease {
return execute(
() -> this.stub.leaseTimeToLive(leaseTimeToLiveRequest),
LeaseTimeToLiveResponse::new);
LeaseTimeToLiveResponse::new,
true);
}
@Override
@ -143,27 +147,28 @@ final class LeaseImpl extends Impl implements Lease {
@Override
public CompletableFuture<LeaseKeepAliveResponse> keepAliveOnce(long leaseId) {
final AtomicReference<WriteStream<LeaseKeepAliveRequest>> ref = new AtomicReference<>();
final CompletableFuture<LeaseKeepAliveResponse> future = new CompletableFuture<>();
final LeaseKeepAliveRequest req = LeaseKeepAliveRequest.newBuilder().setID(leaseId).build();
final CloseableClient ka = keepAlive(leaseId, new StreamObserver<LeaseKeepAliveResponse>() {
@Override
public void onNext(LeaseKeepAliveResponse value) {
future.complete(value);
}
leaseStub
.leaseKeepAliveWithHandler(
s -> {
ref.set(s);
s.write(req);
},
r -> {
if (r.getTTL() != 0) {
future.complete(new LeaseKeepAliveResponse(r));
} else {
future.completeExceptionally(
newEtcdException(ErrorCode.NOT_FOUND, "etcdserver: requested lease not found"));
}
},
null,
future::completeExceptionally);
@Override
public void onError(Throwable t) {
future.completeExceptionally(toEtcdException(t));
}
@Override
public void onCompleted() {
}
});
return future.whenCompleteAsync(
(val, throwable) -> ka.close(),
connectionManager().getExecutorService());
return future.whenComplete((r, t) -> ref.get().end(req));
}
@Override
@ -186,20 +191,20 @@ final class LeaseImpl extends Impl implements Lease {
* The KeepAliver hold a background task and stream for keep aliaves.
*/
private final class KeepAlive extends Service {
private volatile ScheduledFuture<?> task;
private volatile ScheduledFuture<?> restart;
private volatile ScheduledExecutorService executor;
private volatile Long task;
private volatile Long restart;
private volatile WriteStream<LeaseKeepAliveRequest> requestStream;
public KeepAlive() {
this.executor = Executors.newScheduledThreadPool(2);
}
@Override
public void doStart() {
leaseStub.leaseKeepAlive(this::writeHandler)
.handler(this::handleResponse)
.exceptionHandler(this::handleException);
leaseStub.leaseKeepAliveWithHandler(
this::writeHandler,
this::handleResponse,
null,
this::handleException);
}
@Override
@ -208,12 +213,10 @@ final class LeaseImpl extends Impl implements Lease {
requestStream.end();
}
if (this.restart != null) {
this.restart.cancel(true);
this.restart = null;
connectionManager().vertx().cancelTimer(this.restart);
}
if (this.task != null) {
this.task.cancel(true);
this.task = null;
connectionManager().vertx().cancelTimer(this.task);
}
}
@ -223,17 +226,17 @@ final class LeaseImpl extends Impl implements Lease {
this.task = null;
this.restart = null;
this.executor.shutdownNow();
}
private void writeHandler(WriteStream<LeaseKeepAliveRequest> stream) {
requestStream = stream;
task = executor.scheduleAtFixedRate(
() -> keepAlives.values().forEach(element -> sendKeepAlive(element, stream)),
task = connectionManager().vertx().setPeriodic(
0,
500,
TimeUnit.MILLISECONDS);
l -> {
keepAlives.values().forEach(element -> sendKeepAlive(element, stream));
});
}
private void sendKeepAlive(KeepAliveObserver observer, WriteStream<LeaseKeepAliveRequest> stream) {
@ -267,12 +270,20 @@ final class LeaseImpl extends Impl implements Lease {
}
}
private synchronized void handleException(Throwable unused) {
private synchronized void handleException(Throwable throwable) {
if (!this.isRunning()) {
return;
}
restart = this.executor.schedule(this::restart, 500, TimeUnit.MILLISECONDS);
keepAlives.values().forEach(ka -> ka.onError(throwable));
restart = connectionManager().vertx().setTimer(
500,
l -> {
if (isRunning()) {
restart();
}
});
}
}
@ -280,42 +291,35 @@ final class LeaseImpl extends Impl implements Lease {
* The DeadLiner hold a background task to check deadlines.
*/
private class DeadLine extends Service {
private volatile ScheduledFuture<?> task;
private volatile ScheduledExecutorService executor;
private volatile Long task;
public DeadLine() {
this.executor = Executors.newScheduledThreadPool(2);
}
@Override
public void doStart() {
this.task = executor.scheduleAtFixedRate(() -> {
long now = System.currentTimeMillis();
this.task = connectionManager().vertx().setPeriodic(
0,
1000,
l -> {
long now = System.currentTimeMillis();
keepAlives.values().removeIf(ka -> {
if (ka.getDeadLine() < now) {
ka.onCompleted();
return true;
}
return false;
keepAlives.values().removeIf(ka -> {
if (ka.getDeadLine() < now) {
ka.onCompleted();
return true;
}
return false;
});
});
}, 0, 1000, TimeUnit.MILLISECONDS);
}
@Override
public void doStop() {
if (this.task != null) {
this.task.cancel(true);
connectionManager().vertx().cancelTimer(this.task);
}
}
@Override
public void close() {
super.close();
this.executor.shutdownNow();
}
}
/**
@ -329,6 +333,10 @@ final class LeaseImpl extends Impl implements Lease {
private long nextKeepAlive;
public KeepAliveObserver(long leaseId) {
this(leaseId, Collections.emptyList());
}
public KeepAliveObserver(long leaseId, Collection<StreamObserver<LeaseKeepAliveResponse>> observers) {
this.nextKeepAlive = System.currentTimeMillis();
// Use user-provided timeout if present to avoid removing KeepAlive before first response from server
@ -337,7 +345,7 @@ final class LeaseImpl extends Impl implements Lease {
: DEFAULT_FIRST_KEEPALIVE_TIMEOUT_MS;
this.deadLine = nextKeepAlive + initialKeepAliveTimeoutMs;
this.observers = new CopyOnWriteArrayList<>();
this.observers = new CopyOnWriteArrayList<>(observers);
this.leaseId = leaseId;
}

View File

@ -28,12 +28,28 @@ import io.etcd.jetcd.lock.UnlockResponse;
import io.etcd.jetcd.support.Errors;
import io.etcd.jetcd.support.Util;
import static com.google.common.base.Preconditions.checkNotNull;
import static java.util.Objects.requireNonNull;
final class LockImpl extends Impl implements Lock {
private final VertxLockGrpc.LockVertxStub stub;
private final ByteSequence namespace;
// Lock operations are done in a context where a client is trying to implement
// some strict mutual exclusion use case; in that type of context, it makes sense to always
// apply require leader, since we don't want a client connected to a non-raft-leader server
// to have a lock method just go silent if the server the client happens to be connected to
// becomes partitioned from the actual raft-leader server in the etcd servers cluster:
// in that scenario and without required leader, an attempt to lock could block forever
// not because some other client is already holding a lock, but because the server the client
// is connected to is partitioned and can't tell.
// With require leader, in that case the call will fail and the client has the ability to
// (a) know (b) retry on a different server.
// The retry on a different server should happen automatically if the connection manager is using
// a round robin strategy.
private VertxLockGrpc.LockVertxStub stubWithLeader() {
return Util.applyRequireLeader(true, stub);
}
LockImpl(ClientConnectionManager connectionManager) {
super(connectionManager);
@ -43,7 +59,7 @@ final class LockImpl extends Impl implements Lock {
@Override
public CompletableFuture<LockResponse> lock(ByteSequence name, long leaseId) {
checkNotNull(name);
requireNonNull(name);
LockRequest request = LockRequest.newBuilder()
.setName(Util.prefixNamespace(name, namespace))
@ -51,22 +67,22 @@ final class LockImpl extends Impl implements Lock {
.build();
return execute(
() -> stub.lock(request),
() -> stubWithLeader().lock(request),
response -> new LockResponse(response, namespace),
Errors::isRetryable);
Errors::isRetryableForSafeRedoOp);
}
@Override
public CompletableFuture<UnlockResponse> unlock(ByteSequence lockKey) {
checkNotNull(lockKey);
requireNonNull(lockKey);
UnlockRequest request = UnlockRequest.newBuilder()
.setKey(Util.prefixNamespace(lockKey, namespace))
.build();
return execute(
() -> stub.unlock(request),
() -> stubWithLeader().unlock(request),
UnlockResponse::new,
Errors::isRetryable);
Errors::isRetryableForSafeRedoOp);
}
}

View File

@ -18,19 +18,12 @@ package io.etcd.jetcd.impl;
import java.io.IOException;
import java.io.OutputStream;
import java.net.URI;
import java.util.concurrent.CompletableFuture;
import java.util.concurrent.atomic.AtomicLong;
import io.etcd.jetcd.Maintenance;
import io.etcd.jetcd.api.AlarmRequest;
import io.etcd.jetcd.api.*;
import io.etcd.jetcd.api.AlarmType;
import io.etcd.jetcd.api.DefragmentRequest;
import io.etcd.jetcd.api.HashKVRequest;
import io.etcd.jetcd.api.MoveLeaderRequest;
import io.etcd.jetcd.api.SnapshotRequest;
import io.etcd.jetcd.api.StatusRequest;
import io.etcd.jetcd.api.VertxMaintenanceGrpc;
import io.etcd.jetcd.maintenance.AlarmResponse;
import io.etcd.jetcd.maintenance.DefragmentResponse;
import io.etcd.jetcd.maintenance.HashKVResponse;
@ -78,11 +71,6 @@ final class MaintenanceImpl extends Impl implements Maintenance {
return completable(this.stub.alarm(alarmRequest), AlarmResponse::new);
}
@Override
public CompletableFuture<DefragmentResponse> defragmentMember(URI endpoint) {
return defragmentMember(endpoint.toString());
}
@Override
public CompletableFuture<DefragmentResponse> defragmentMember(String target) {
return this.connectionManager().withNewChannel(
@ -95,11 +83,6 @@ final class MaintenanceImpl extends Impl implements Maintenance {
});
}
@Override
public CompletableFuture<StatusResponse> statusMember(URI endpoint) {
return statusMember(endpoint.toString());
}
@Override
public CompletableFuture<StatusResponse> statusMember(String target) {
return this.connectionManager().withNewChannel(
@ -119,11 +102,6 @@ final class MaintenanceImpl extends Impl implements Maintenance {
MoveLeaderResponse::new);
}
@Override
public CompletableFuture<HashKVResponse> hashKV(URI endpoint, long rev) {
return hashKV(endpoint.toString(), rev);
}
@Override
public CompletableFuture<HashKVResponse> hashKV(String target, long rev) {
return this.connectionManager().withNewChannel(
@ -141,19 +119,20 @@ final class MaintenanceImpl extends Impl implements Maintenance {
final CompletableFuture<Long> answer = new CompletableFuture<>();
final AtomicLong bytes = new AtomicLong(0);
this.stub.snapshot(SnapshotRequest.getDefaultInstance())
.handler(r -> {
this.stub.snapshotWithHandler(
SnapshotRequest.getDefaultInstance(),
r -> {
try {
r.getBlob().writeTo(outputStream);
bytes.addAndGet(r.getBlob().size());
} catch (IOException e) {
answer.completeExceptionally(toEtcdException(e));
}
})
.endHandler(event -> {
},
event -> {
answer.complete(bytes.get());
})
.exceptionHandler(e -> {
},
e -> {
answer.completeExceptionally(toEtcdException(e));
});
@ -163,9 +142,10 @@ final class MaintenanceImpl extends Impl implements Maintenance {
@Override
public void snapshot(StreamObserver<io.etcd.jetcd.maintenance.SnapshotResponse> observer) {
this.stub.snapshot(SnapshotRequest.getDefaultInstance())
.handler(r -> observer.onNext(new io.etcd.jetcd.maintenance.SnapshotResponse(r)))
.endHandler(event -> observer.onCompleted())
.exceptionHandler(e -> observer.onError(toEtcdException(e)));
this.stub.snapshotWithHandler(
SnapshotRequest.getDefaultInstance(),
r -> observer.onNext(new io.etcd.jetcd.maintenance.SnapshotResponse(r)),
event -> observer.onCompleted(),
e -> observer.onError(toEtcdException(e)));
}
}

View File

@ -41,7 +41,6 @@ import io.etcd.jetcd.options.WatchOption;
import io.etcd.jetcd.support.Errors;
import io.etcd.jetcd.support.Util;
import io.grpc.Status;
import io.vertx.core.streams.ReadStream;
import io.vertx.core.streams.WriteStream;
import com.google.common.base.Strings;
@ -124,10 +123,8 @@ final class WatchImpl extends Impl implements Watch {
private final Listener listener;
private final AtomicBoolean closed;
//private StreamObserver<WatchRequest> stream;
private AtomicReference<WriteStream<WatchRequest>> wstream;
private AtomicBoolean started;
private ReadStream<WatchResponse> rstream;
private final AtomicReference<WriteStream<WatchRequest>> wstream;
private final AtomicBoolean started;
private long revision;
private long id;
@ -139,7 +136,6 @@ final class WatchImpl extends Impl implements Watch {
this.started = new AtomicBoolean();
this.wstream = new AtomicReference<>();
this.rstream = null;
this.id = -1;
this.revision = this.option.getRevision();
}
@ -150,7 +146,8 @@ final class WatchImpl extends Impl implements Watch {
//
// ************************
boolean isClosed() {
@Override
public boolean isClosed() {
return this.closed.get() || WatchImpl.this.closed.get();
}
@ -160,7 +157,7 @@ final class WatchImpl extends Impl implements Watch {
}
if (started.compareAndSet(false, true)) {
// id is not really useful today but it may be in etcd 3.4
// id is not really useful today, but it may be in etcd 3.4
id = -1;
WatchCreateRequest.Builder builder = WatchCreateRequest.newBuilder()
@ -172,7 +169,7 @@ final class WatchImpl extends Impl implements Watch {
.map(endKey -> Util.prefixNamespaceToRangeEnd(endKey, namespace))
.ifPresent(builder::setRangeEnd);
if (!option.getEndKey().isPresent() && option.isPrefix()) {
if (option.getEndKey().isEmpty() && option.isPrefix()) {
ByteSequence endKey = OptionsUtil.prefixEndOf(key);
builder.setRangeEnd(Util.prefixNamespaceToRangeEnd(endKey, namespace));
}
@ -185,14 +182,15 @@ final class WatchImpl extends Impl implements Watch {
builder.addFilters(WatchCreateRequest.FilterType.NOPUT);
}
rstream = Util.applyRequireLeader(option.withRequireLeader(), stub).watch(stream -> {
wstream.set(stream);
stream.write(WatchRequest.newBuilder().setCreateRequest(builder).build());
});
rstream.handler(this::onNext);
rstream.exceptionHandler(this::onError);
rstream.endHandler(event -> onCompleted());
var ignored = Util.applyRequireLeader(option.withRequireLeader(), stub)
.watchWithHandler(
stream -> {
wstream.set(stream);
stream.write(WatchRequest.newBuilder().setCreateRequest(builder).build());
},
this::onNext,
event -> onCompleted(),
this::onError);
}
}
@ -247,7 +245,9 @@ final class WatchImpl extends Impl implements Watch {
// handle a special case when watch has been created and closed at the same time
if (response.getCreated() && response.getCanceled() && response.getCancelReason() != null
&& response.getCancelReason().contains("etcdserver: permission denied")) {
&& (response.getCancelReason().contains("etcdserver: permission denied") ||
response.getCancelReason().contains("etcdserver: invalid auth token"))) {
// potentially access token expired
connectionManager().authCredential().refresh();
Status error = Status.Code.CANCELLED.toStatus().withDescription(response.getCancelReason());
@ -265,6 +265,9 @@ final class WatchImpl extends Impl implements Watch {
revision = Math.max(revision, response.getHeader().getRevision());
id = response.getWatchId();
if (option.isCreatedNotify()) {
listener.onNext(new io.etcd.jetcd.watch.WatchResponse(response));
}
} else if (response.getCanceled()) {
//
@ -353,8 +356,8 @@ final class WatchImpl extends Impl implements Watch {
private void reschedule() {
Futures.addCallback(executor.schedule(this::resume, 500, TimeUnit.MILLISECONDS), new FutureCallback<Object>() {
@Override
public void onFailure(Throwable throwable) {
LOG.warn("scheduled resume failed", throwable);
public void onFailure(Throwable t) {
LOG.warn("scheduled resume failed", t);
}
@Override

View File

@ -58,7 +58,11 @@ public class GetResponse extends AbstractResponse<RangeResponse> {
}
/**
* Returns the number of keys within the range when requested.
* Returns the number of keys within the range requested.
* Note this value is never affected by filtering options (limit, min or max created or modified revisions)
* Count is the count for keys on the range part of a request.
* Filters for limit and created or modified revision ranges restrict the
* returned KVs, but not the count.
*
* @return count.
*/

View File

@ -44,7 +44,7 @@ public class LeaseTimeToLiveResponse extends AbstractResponse<io.etcd.jetcd.api.
*
* @return the ttl.
*/
public long getTTl() {
public long getTTL() {
return getResponse().getTTL();
}

View File

@ -16,13 +16,11 @@
package io.etcd.jetcd.maintenance;
import java.net.URI;
import io.etcd.jetcd.Maintenance;
import io.etcd.jetcd.impl.AbstractResponse;
/**
* DefragmentResponse returned by {@link Maintenance#defragmentMember(URI)} contains a header.
* DefragmentResponse returned by {@link Maintenance#defragmentMember(String)} contains a header.
*/
public class DefragmentResponse extends AbstractResponse<io.etcd.jetcd.api.DefragmentResponse> {

View File

@ -16,13 +16,11 @@
package io.etcd.jetcd.maintenance;
import java.net.URI;
import io.etcd.jetcd.Maintenance;
import io.etcd.jetcd.impl.AbstractResponse;
/**
* HashKVResponse returned by {@link Maintenance#hashKV(URI, long)}.
* HashKVResponse returned by {@link Maintenance#hashKV(String, long)}.
*/
public class HashKVResponse extends AbstractResponse<io.etcd.jetcd.api.HashKVResponse> {

View File

@ -16,13 +16,11 @@
package io.etcd.jetcd.maintenance;
import java.net.URI;
import io.etcd.jetcd.Maintenance;
import io.etcd.jetcd.impl.AbstractResponse;
/**
* StatusResponse returned by {@link Maintenance#statusMember(URI)} contains
* StatusResponse returned by {@link Maintenance#statusMember(String)} contains
* a header, version, dbSize, current leader, raftIndex, and raftTerm.
*/
public class StatusResponse extends AbstractResponse<io.etcd.jetcd.api.StatusResponse> {

View File

@ -17,6 +17,7 @@
package io.etcd.jetcd.op;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;
import java.util.concurrent.CompletableFuture;
import java.util.function.Function;
@ -27,7 +28,6 @@ import io.etcd.jetcd.api.TxnRequest;
import io.etcd.jetcd.kv.TxnResponse;
import com.google.common.annotations.VisibleForTesting;
import com.google.common.collect.ImmutableList;
/**
* Build an etcd transaction.
@ -60,7 +60,7 @@ public class TxnImpl implements Txn {
@Override
public TxnImpl If(Cmp... cmps) {
return If(ImmutableList.copyOf(cmps));
return If(Arrays.asList(cmps));
}
TxnImpl If(List<Cmp> cmps) {
@ -77,7 +77,7 @@ public class TxnImpl implements Txn {
@Override
public TxnImpl Then(Op... ops) {
return Then(ImmutableList.copyOf(ops));
return Then(Arrays.asList(ops));
}
TxnImpl Then(List<Op> ops) {
@ -93,7 +93,7 @@ public class TxnImpl implements Txn {
@Override
public TxnImpl Else(Op... ops) {
return Else(ImmutableList.copyOf(ops));
return Else(Arrays.asList(ops));
}
TxnImpl Else(List<Op> ops) {

View File

@ -17,15 +17,35 @@
package io.etcd.jetcd.options;
public final class CompactOption {
public static final CompactOption DEFAULT = builder().build();
public static final CompactOption DEFAULT = newBuilder().build();
private final boolean physical;
private CompactOption(boolean physical) {
this.physical = physical;
}
public boolean isPhysical() {
return physical;
}
/**
* Returns the builder.
*
* @deprecated use {@link #builder()}
* @return the builder
*/
@SuppressWarnings("InlineMeSuggester")
@Deprecated
public static Builder newBuilder() {
return builder();
}
public static Builder builder() {
return new Builder();
}
public static class Builder {
public static final class Builder {
private boolean physical = false;
private Builder() {
@ -49,14 +69,4 @@ public final class CompactOption {
return new CompactOption(this.physical);
}
}
private final boolean physical;
private CompactOption(boolean physical) {
this.physical = physical;
}
public boolean isPhysical() {
return physical;
}
}

View File

@ -21,21 +21,81 @@ import java.util.Optional;
import io.etcd.jetcd.ByteSequence;
import io.etcd.jetcd.KV;
import static com.google.common.base.Preconditions.checkNotNull;
import static java.util.Objects.requireNonNull;
public final class DeleteOption {
public static final DeleteOption DEFAULT = builder().build();
public static final DeleteOption DEFAULT = newBuilder().build();
private final ByteSequence endKey;
private final boolean prevKV;
private final boolean prefix;
private final boolean autoRetry;
private DeleteOption(ByteSequence endKey, boolean prevKV, boolean prefix, final boolean autoRetry) {
this.endKey = endKey;
this.prevKV = prevKV;
this.prefix = prefix;
this.autoRetry = autoRetry;
}
public Optional<ByteSequence> getEndKey() {
return Optional.ofNullable(endKey);
}
/**
* Whether to get the previous key/value pairs before deleting them.
*
* @return true if get the previous key/value pairs before deleting them, otherwise false.
*/
public boolean isPrevKV() {
return prevKV;
}
/**
* Whether to treat this deletion as deletion by prefix
*
* @return true if deletion by prefix.
*/
public boolean isPrefix() {
return prefix;
}
/**
* Whether to treat a delete operation as idempotent from the point of view of automated retries.
* Note under failure scenarios this may mean a single delete is attempted more than once.
*
* @return true if automated retries should happen.
*/
public boolean isAutoRetry() {
return autoRetry;
}
/**
* Returns the builder.
*
* @deprecated use {@link #builder()}
* @return the builder
*/
@SuppressWarnings("InlineMeSuggester")
@Deprecated
public static Builder newBuilder() {
return builder();
}
/**
* Returns the builder.
*
* @return the builder
*/
public static Builder builder() {
return new Builder();
}
public static class Builder {
private Optional<ByteSequence> endKey = Optional.empty();
public static final class Builder {
private ByteSequence endKey;
private boolean prevKV = false;
private boolean prefix = false;
private boolean autoRetry = false;
private Builder() {
}
@ -59,7 +119,7 @@ public final class DeleteOption {
* @return builder
*/
public Builder withRange(ByteSequence endKey) {
this.endKey = Optional.ofNullable(endKey);
this.endKey = endKey;
return this;
}
@ -90,7 +150,7 @@ public final class DeleteOption {
*/
@Deprecated
public Builder withPrefix(ByteSequence prefix) {
checkNotNull(prefix, "prefix should not be null");
requireNonNull(prefix, "prefix should not be null");
ByteSequence prefixEnd = OptionsUtil.prefixEndOf(prefix);
this.withRange(prefixEnd);
return this;
@ -107,36 +167,23 @@ public final class DeleteOption {
return this;
}
/**
* When autoRetry is set, the delete operation is treated as idempotent from the point of view of automated retries.
* Note under some failure scenarios true may make a delete operation be attempted more than once, where
* a first attempt succeeded but its result did not reach the client; by default (autoRetry=false),
* the client won't retry since it is not safe to assume on such a failure the operation did not happen.
* Requesting withAutoRetry means the client is explicitly asking for retry nevertheless.
*
* @return builder
*/
public Builder withAutoRetry() {
this.autoRetry = true;
return this;
}
public DeleteOption build() {
return new DeleteOption(endKey, prevKV, prefix);
return new DeleteOption(endKey, prevKV, prefix, autoRetry);
}
}
private final Optional<ByteSequence> endKey;
private final boolean prevKV;
private final boolean prefix;
private DeleteOption(Optional<ByteSequence> endKey, boolean prevKV, boolean prefix) {
this.endKey = endKey;
this.prevKV = prevKV;
this.prefix = prefix;
}
public Optional<ByteSequence> getEndKey() {
return endKey;
}
/**
* Whether to get the previous key/value pairs before deleting them.
*
* @return true if get the previous key/value pairs before deleting them, otherwise false.
*/
public boolean isPrevKV() {
return prevKV;
}
public boolean isPrefix() {
return prefix;
}
}

View File

@ -20,26 +20,244 @@ import java.util.Optional;
import io.etcd.jetcd.ByteSequence;
import io.etcd.jetcd.KV;
import io.etcd.jetcd.kv.GetResponse;
import static com.google.common.base.Preconditions.checkNotNull;
import static java.util.Objects.requireNonNull;
/**
* The option for get operation.
*/
public final class GetOption {
public static final GetOption DEFAULT = builder().build();
public static final GetOption DEFAULT = newBuilder().build();
private final ByteSequence endKey;
private final long limit;
private final long revision;
private final SortOrder sortOrder;
private final SortTarget sortTarget;
private final boolean serializable;
private final boolean keysOnly;
private final boolean countOnly;
private final long minCreateRevision;
private final long maxCreateRevision;
private final long minModRevision;
private final long maxModRevision;
private final boolean prefix;
private GetOption(
ByteSequence endKey,
long limit,
long revision,
SortOrder sortOrder,
SortTarget sortTarget,
boolean serializable,
boolean keysOnly,
boolean countOnly,
long minCreateRevision,
long maxCreateRevision,
long minModRevision,
long maxModRevision,
boolean prefix) {
this.endKey = endKey;
this.limit = limit;
this.revision = revision;
this.sortOrder = sortOrder;
this.sortTarget = sortTarget;
this.serializable = serializable;
this.keysOnly = keysOnly;
this.countOnly = countOnly;
this.minCreateRevision = minCreateRevision;
this.maxCreateRevision = maxCreateRevision;
this.minModRevision = minModRevision;
this.maxModRevision = maxModRevision;
this.prefix = prefix;
}
/**
* Create a builder to construct option for get operation.
* Get the maximum number of keys to return for a get request.
*
* @return builder
* <p>
* Note this filter does not affect the count field in GetResponse.
* {@link GetResponse#getCount()} always counts the number of keys matched on a range, independent of filters.
* </p>
*
*
* @return the maximum number of keys to return.
*/
public long getLimit() {
return this.limit;
}
/**
* Get the end key for a range request
*
* @return the end key for a range request
*/
public Optional<ByteSequence> getEndKey() {
return Optional.ofNullable(this.endKey);
}
/**
* Get the revision for the request
*
* @return the revision for the request
*/
public long getRevision() {
return revision;
}
/**
* Get the sort order for the request
*
* @return the sort order for the request
*/
public SortOrder getSortOrder() {
return sortOrder;
}
/**
* Get the sort field for the request
*
* @return the sort field for the request
*/
public SortTarget getSortField() {
return sortTarget;
}
/**
* Return if the consistency level for this request is "serializable".
* Note serializable is a lower than default consistency, and implies
* the possibility of getting stale data.
*
* @return true if this request is only serializable consistency
*/
public boolean isSerializable() {
return serializable;
}
/**
* True if this request should get only keys in a range and there is no
* need to retrieve the values.
*
* @return true if only get keys
*/
public boolean isKeysOnly() {
return keysOnly;
}
/**
* True if this request should only populate the count of keys matching
* a range, and no other data.
*
* @return true if only get the count of keys
*/
public boolean isCountOnly() {
return countOnly;
}
/**
* Only populate results for keys that match a
* minimum value for a created revision.
*
* <p>
* Note this filter does not affect the count field in GetResponse.
* {@link GetResponse#getCount()} always counts the number of keys matched on a range, independent of filters.
* For the same reason, it would be meaningless to mix setting a min create revision option
* with the count only option.
* </p>
*
* @return minimum created revision to match, or zero for any.
*/
public long getMinCreateRevision() {
return this.minCreateRevision;
}
/**
* Only populate results for keys that match a
* maximum value for a created revision.
*
* <p>
* Note this filter does not affect the count field in GetResponse.
* {@link GetResponse#getCount()} always counts the number of keys matched on a range, independent of filters.
* For the same reason, it would be meaningless to mix setting a max create revision option
* with the count only option.
* </p>
*
* @return maximum created revision to match, or zero for any.
*/
public long getMaxCreateRevision() {
return this.maxCreateRevision;
}
/**
* Only populate results for keys that match a
* minimum value for a modified revision.
*
* <p>
* Note this filter does not affect the count field in GetResponse.
* {@link GetResponse#getCount()} always counts the number of keys matched on a range, independent of filters.
* For the same reason, it would be meaningless to mix setting a min mod revision option
* with the count only option.
* </p>
*
* @return minimum modified revision to match, or zero for any.
*/
public long getMinModRevision() {
return this.minModRevision;
}
/**
* Only populate results for keys that match a
* maximum value for a modified revision.
*
* <p>
* Note this filter does not affect the count field in GetResponse.
* {@link GetResponse#getCount()} always counts the number of keys matched on a range, independent of filters.
* For the same reason, it would be meaningless to mix setting a max mod revision option
* with the count only option.
* </p>
*
* @return maximum modified revision to match, or zero for any.
*/
public long getMaxModRevision() {
return this.maxModRevision;
}
/**
* True if this Get request should do prefix match
*
* @return true if this Get request should do prefix match
*/
public boolean isPrefix() {
return prefix;
}
public enum SortOrder {
NONE, ASCEND, DESCEND,
}
public enum SortTarget {
KEY, VERSION, CREATE, MOD, VALUE,
}
/**
* Returns the builder.
*
* @deprecated use {@link #builder()}
* @return the builder
*/
@SuppressWarnings("InlineMeSuggester")
@Deprecated
public static Builder newBuilder() {
return builder();
}
public static Builder builder() {
return new Builder();
}
public static class Builder {
public static final class Builder {
private long limit = 0L;
private long revision = 0L;
@ -48,7 +266,7 @@ public final class GetOption {
private boolean serializable = false;
private boolean keysOnly = false;
private boolean countOnly = false;
private Optional<ByteSequence> endKey = Optional.empty();
private ByteSequence endKey;
private long minCreateRevision = 0L;
private long maxCreateRevision = 0L;
private long minModRevision = 0L;
@ -61,6 +279,13 @@ public final class GetOption {
/**
* Limit the number of keys to return for a get request. By default is 0 - no limitation.
*
* <p>
* Note this filter does not affect the count field in GetResponse.
* {@link GetResponse#getCount()} always counts the number of keys matched on a range, independent of filters.
* For the same reason, it would be meaningless to mix setting this option
* with the count only option.
* </p>
*
* @param limit the maximum number of keys to return for a get request.
* @return builder
*/
@ -114,7 +339,9 @@ public final class GetOption {
* <p>
* Get requests are linearizable by
* default. For better performance, a serializable get request is served locally without needing
* to reach consensus with other nodes in the cluster.
* to reach consensus with other nodes in the cluster. Note this is a tradeoff with strict
* consistency so it should be used with care in situations where reading stale
* is acceptable.
*
* @param serializable is the get request a serializable get request.
* @return builder
@ -164,7 +391,7 @@ public final class GetOption {
* @return builder
*/
public Builder withRange(ByteSequence endKey) {
this.endKey = Optional.ofNullable(endKey);
this.endKey = endKey;
return this;
}
@ -194,17 +421,24 @@ public final class GetOption {
*/
@Deprecated
public Builder withPrefix(ByteSequence prefix) {
checkNotNull(prefix, "prefix should not be null");
requireNonNull(prefix, "prefix should not be null");
ByteSequence prefixEnd = OptionsUtil.prefixEndOf(prefix);
this.withRange(prefixEnd);
return this;
}
/**
* Limit returned keys to those with create revision greater than the provided value.
* Limit returned keys to those with create revision greater or equal than the provided value.
* min_create_revision is the lower bound for returned key create revisions; all keys with
* lesser create revisions will be filtered away.
*
* <p>
* Note this filter does not affect the count field in GetResponse.
* {@link GetResponse#getCount()} always counts the number of keys matched on a range, independent of filters.
* For the same reason, it would be meaningless to mix setting this option
* with the count only option.
* </p>
*
* @param createRevision create revision
* @return builder
*/
@ -214,10 +448,17 @@ public final class GetOption {
}
/**
* Limit returned keys to those with create revision less than the provided value.
* Limit returned keys to those with create revision less or equal than the provided value.
* max_create_revision is the upper bound for returned key create revisions; all keys with
* greater create revisions will be filtered away.
*
* <p>
* Note this filter does not affect the count field in GetResponse.
* {@link GetResponse#getCount()} always counts the number of keys matched on a range, independent of filters.
* For the same reason, it would be meaningless to mix setting this option
* with the count only option.
* </p>
*
* @param createRevision create revision
* @return builder
*/
@ -227,10 +468,17 @@ public final class GetOption {
}
/**
* Limit returned keys to those with mod revision greater than the provided value.
* Limit returned keys to those with mod revision greater or equal than the provided value.
* min_mod_revision is the lower bound for returned key mod revisions; all keys with lesser mod
* revisions will be filtered away.
*
* <p>
* Note this filter does not affect the count field in GetResponse.
* {@link GetResponse#getCount()} always counts the number of keys matched on a range, independent of filters.
* For the same reason, it would be meaningless to mix setting this option
* with the count only option.
* </p>
*
* @param modRevision mod revision
* @return this builder instance
*/
@ -240,10 +488,17 @@ public final class GetOption {
}
/**
* Limit returned keys to those with mod revision less than the provided value. max_mod_revision
* Limit returned keys to those with mod revision less or equal than the provided value. max_mod_revision
* is the upper bound for returned key mod revisions; all keys with greater mod revisions will
* be filtered away.
*
* <p>
* Note this filter does not affect the count field in GetResponse.
* {@link GetResponse#getCount()} always counts the number of keys matched on a range, independent of filters.
* For the same reason, it would be meaningless to mix setting this option
* with the count only option.
* </p>
*
* @param modRevision mod revision
* @return this builder instance
*/
@ -258,106 +513,21 @@ public final class GetOption {
* @return the GetOption
*/
public GetOption build() {
return new GetOption(endKey, limit, revision, sortOrder, sortTarget, serializable, keysOnly, countOnly,
minCreateRevision, maxCreateRevision, minModRevision, maxModRevision, prefix);
return new GetOption(
endKey,
limit,
revision,
sortOrder,
sortTarget,
serializable,
keysOnly,
countOnly,
minCreateRevision,
maxCreateRevision,
minModRevision,
maxModRevision,
prefix);
}
}
private final Optional<ByteSequence> endKey;
private final long limit;
private final long revision;
private final SortOrder sortOrder;
private final SortTarget sortTarget;
private final boolean serializable;
private final boolean keysOnly;
private final boolean countOnly;
private final long minCreateRevision;
private final long maxCreateRevision;
private final long minModRevision;
private final long maxModRevision;
private final boolean prefix;
private GetOption(Optional<ByteSequence> endKey, long limit, long revision, SortOrder sortOrder, SortTarget sortTarget,
boolean serializable, boolean keysOnly, boolean countOnly, long minCreateRevision, long maxCreateRevision,
long minModRevision, long maxModRevision, boolean prefix) {
this.endKey = endKey;
this.limit = limit;
this.revision = revision;
this.sortOrder = sortOrder;
this.sortTarget = sortTarget;
this.serializable = serializable;
this.keysOnly = keysOnly;
this.countOnly = countOnly;
this.minCreateRevision = minCreateRevision;
this.maxCreateRevision = maxCreateRevision;
this.minModRevision = minModRevision;
this.maxModRevision = maxModRevision;
this.prefix = prefix;
}
/**
* Get the maximum number of keys to return for a get request.
*
* @return the maximum number of keys to return.
*/
public long getLimit() {
return this.limit;
}
public Optional<ByteSequence> getEndKey() {
return this.endKey;
}
public long getRevision() {
return revision;
}
public SortOrder getSortOrder() {
return sortOrder;
}
public SortTarget getSortField() {
return sortTarget;
}
public boolean isSerializable() {
return serializable;
}
public boolean isKeysOnly() {
return keysOnly;
}
public boolean isCountOnly() {
return countOnly;
}
public long getMinCreateRevision() {
return this.minCreateRevision;
}
public long getMaxCreateRevision() {
return this.maxCreateRevision;
}
public long getMinModRevision() {
return this.minModRevision;
}
public long getMaxModRevision() {
return this.maxModRevision;
}
public boolean isPrefix() {
return prefix;
}
public enum SortOrder {
NONE, ASCEND, DESCEND,
}
public enum SortTarget {
KEY, VERSION, CREATE, MOD, VALUE,
}
}

View File

@ -17,14 +17,35 @@
package io.etcd.jetcd.options;
public class LeaseOption {
public static final LeaseOption DEFAULT = builder().build();
public static final LeaseOption DEFAULT = newBuilder().build();
private final boolean attachedKeys;
private LeaseOption(boolean attachedKeys) {
this.attachedKeys = attachedKeys;
}
public boolean isAttachedKeys() {
return attachedKeys;
}
/**
* Returns the builder.
*
* @deprecated use {@link #builder()}
* @return the builder
*/
@SuppressWarnings("InlineMeSuggester")
@Deprecated
public static Builder newBuilder() {
return builder();
}
public static Builder builder() {
return new Builder();
}
public static class Builder {
public static final class Builder {
private boolean attachedKeys;
@ -46,14 +67,4 @@ public class LeaseOption {
}
}
private final boolean attachedKeys;
private LeaseOption(boolean attachedKeys) {
this.attachedKeys = attachedKeys;
}
public boolean isAttachedKeys() {
return attachedKeys;
}
}

View File

@ -22,20 +22,70 @@ import static com.google.common.base.Preconditions.checkArgument;
* The options for put operation.
*/
public final class PutOption {
public static final PutOption DEFAULT = builder().build();
public static final PutOption DEFAULT = newBuilder().build();
private final long leaseId;
private final boolean prevKV;
private final boolean autoRetry;
private PutOption(long leaseId, boolean prevKV, boolean autoRetry) {
this.leaseId = leaseId;
this.prevKV = prevKV;
this.autoRetry = autoRetry;
}
/**
* Get the lease id.
*
* @return the lease id
*/
public long getLeaseId() {
return this.leaseId;
}
/**
* Get the previous KV.
*
* @return the prevKV
*/
public boolean getPrevKV() {
return this.prevKV;
}
/**
* Whether to treat a put operation as idempotent from the point of view of automated retries.
* Note under failure scenarios this may mean a single put executes more than once.
*
* @return true if automated retries should happen.
*/
public boolean isAutoRetry() {
return autoRetry;
}
/**
* Returns the builder.
*
* @deprecated use {@link #builder()}
* @return the builder
*/
@SuppressWarnings("InlineMeSuggester")
@Deprecated
public static Builder newBuilder() {
return builder();
}
public static Builder builder() {
return new Builder();
}
/**
* Builder to construct a put option.
*/
public static class Builder {
public static final class Builder {
private long leaseId = 0L;
private boolean prevKV = false;
private boolean autoRetry = false;
private Builder() {
}
@ -63,40 +113,29 @@ public final class PutOption {
return this;
}
/**
* When autoRetry is set, treat this put as idempotent from the point of view of automated retries.
* Note under some failure scenarios autoRetry=true may make a put operation execute more than once, where
* a first attempt succeeded but its result did not reach the client; by default (autoRetry=false),
* the client won't retry since it is not safe to assume on such a failure that the operation did not happen
* in the server.
* Requesting withAutoRetry means the client is explicitly asking for retry nevertheless.
*
* @return builder
*/
public Builder withAutoRetry() {
this.autoRetry = true;
return this;
}
/**
* build the put option.
*
* @return the put option
*/
public PutOption build() {
return new PutOption(this.leaseId, this.prevKV);
return new PutOption(this.leaseId, this.prevKV, this.autoRetry);
}
}
private final long leaseId;
private final boolean prevKV;
private PutOption(long leaseId, boolean prevKV) {
this.leaseId = leaseId;
this.prevKV = prevKV;
}
/**
* Get the lease id.
*
* @return the lease id
*/
public long getLeaseId() {
return this.leaseId;
}
/**
* Get the previous KV.
*
* @return the prevKV
*/
public boolean getPrevKV() {
return this.prevKV;
}
}

View File

@ -0,0 +1,54 @@
package io.etcd.jetcd.options;
public final class TxnOption {
public static final TxnOption DEFAULT = builder().build();
private final boolean autoRetry;
private TxnOption(final boolean autoRetry) {
this.autoRetry = autoRetry;
}
/**
* Whether to treat a txn operation as idempotent from the point of view of automated retries.
*
* @return true if automated retries should happen.
*/
public boolean isAutoRetry() {
return autoRetry;
}
/**
* Returns the builder.
*
* @return the builder
*/
public static TxnOption.Builder builder() {
return new TxnOption.Builder();
}
public static final class Builder {
private boolean autoRetry = false;
private Builder() {
}
/**
* When autoRetry is set, the txn operation is treated as idempotent from the point of view of automated retries.
* Note under some failure scenarios true may make a txn operation be attempted and/or execute more than once, where
* a first attempt executed but its result status did not reach the client; by default (autoRetry=false),
* the client won't retry since it is not safe to assume on such a failure the operation did not happen.
* Requesting withAutoRetry means the client is explicitly asking for retry nevertheless.
*
* @return builder
*/
public Builder withAutoRetry() {
this.autoRetry = true;
return this;
}
public TxnOption build() {
return new TxnOption(autoRetry);
}
}
}

View File

@ -20,30 +20,135 @@ import java.util.Optional;
import io.etcd.jetcd.ByteSequence;
import static com.google.common.base.Preconditions.checkNotNull;
import static java.util.Objects.requireNonNull;
/**
* The option for watch operation.
*/
public final class WatchOption {
public static final WatchOption DEFAULT = builder().build();
public static final WatchOption DEFAULT = newBuilder().build();
private final ByteSequence endKey;
private final long revision;
private final boolean prevKV;
private final boolean progressNotify;
private final boolean createdNotify;
private final boolean noPut;
private final boolean noDelete;
private final boolean requireLeader;
private final boolean prefix;
private WatchOption(ByteSequence endKey, long revision, boolean prevKV, boolean progressNotify, boolean createdNotify,
boolean noPut, boolean noDelete, boolean requireLeader, boolean prefix) {
this.endKey = endKey;
this.revision = revision;
this.prevKV = prevKV;
this.progressNotify = progressNotify;
this.createdNotify = createdNotify;
this.noPut = noPut;
this.noDelete = noDelete;
this.requireLeader = requireLeader;
this.prefix = prefix;
}
public Optional<ByteSequence> getEndKey() {
return Optional.ofNullable(this.endKey);
}
/**
* Create a builder to construct option for watch operation.
* Returns the revision to watch from.
*
* @return builder
* @return the revision.
*/
public long getRevision() {
return revision;
}
/**
* Whether created watcher gets the previous KV before the event happens.
*
* @return if true, watcher receives the previous KV before the event happens.
*/
public boolean isPrevKV() {
return prevKV;
}
/**
* Whether watcher server send periodic progress updates.
*
* @return if true, watcher server should send periodic progress updates.
*/
public boolean isProgressNotify() {
return progressNotify;
}
/**
* Whether watcher server send watch create event.
*
* @return if true, watcher server should send watch create event.
*/
public boolean isCreatedNotify() {
return createdNotify;
}
/**
* Whether filter put event in server side.
*
* @return if true, filter put event in server side
*/
public boolean isNoPut() {
return noPut;
}
/**
* Whether filter delete event in server side.
*
* @return if true, filter delete event in server side
*/
public boolean isNoDelete() {
return noDelete;
}
/**
* If true, when creating the watch streaming stub, use the REQUIRED_LEADER Metadata annotation,
* which ensures the stream will error out if quorum is lost by
* the server the stream is connected to. This will make the watch fail with an error
* and finish.
* Without this option, a watch running against a server that is out of quorum
* simply goes silent.
*
* @return if true, use REQUIRE_LEADER metadata annotation for watch streams
*/
public boolean withRequireLeader() {
return requireLeader;
}
public boolean isPrefix() {
return prefix;
}
/**
* Returns the builder.
*
* @deprecated use {@link #builder()}
* @return the builder
*/
@SuppressWarnings("InlineMeSuggester")
@Deprecated
public static Builder newBuilder() {
return builder();
}
public static Builder builder() {
return new Builder();
}
public static class Builder {
public static final class Builder {
private long revision = 0L;
private Optional<ByteSequence> endKey = Optional.empty();
private ByteSequence endKey;
private boolean prevKV = false;
private boolean progressNotify = false;
private boolean createNotify = false;
private boolean noPut = false;
private boolean noDelete = false;
private boolean requireLeader = false;
@ -87,7 +192,7 @@ public final class WatchOption {
* @return builder
*/
public Builder withRange(ByteSequence endKey) {
this.endKey = Optional.ofNullable(endKey);
this.endKey = endKey;
return this;
}
@ -115,6 +220,17 @@ public final class WatchOption {
return this;
}
/**
* When createNotify is set, the watch server sends event when watch is created.
*
* @param createNotify configure the watcher to receive watch create event.
* @return builder
*/
public Builder withCreateNotify(boolean createNotify) {
this.createNotify = createNotify;
return this;
}
/**
* filter out put event in server side.
*
@ -157,7 +273,7 @@ public final class WatchOption {
*/
@Deprecated
public Builder withPrefix(ByteSequence prefix) {
checkNotNull(prefix, "prefix should not be null");
requireNonNull(prefix, "prefix should not be null");
ByteSequence prefixEnd = OptionsUtil.prefixEndOf(prefix);
this.withRange(prefixEnd);
return this;
@ -179,96 +295,9 @@ public final class WatchOption {
}
public WatchOption build() {
return new WatchOption(endKey, revision, prevKV, progressNotify, noPut, noDelete, requireLeader, prefix);
return new WatchOption(endKey, revision, prevKV, progressNotify, createNotify, noPut, noDelete, requireLeader,
prefix);
}
}
private final Optional<ByteSequence> endKey;
private final long revision;
private final boolean prevKV;
private final boolean progressNotify;
private final boolean noPut;
private final boolean noDelete;
private final boolean requireLeader;
private final boolean prefix;
private WatchOption(Optional<ByteSequence> endKey, long revision, boolean prevKV, boolean progressNotify, boolean noPut,
boolean noDelete, boolean requireLeader, boolean prefix) {
this.endKey = endKey;
this.revision = revision;
this.prevKV = prevKV;
this.progressNotify = progressNotify;
this.noPut = noPut;
this.noDelete = noDelete;
this.requireLeader = requireLeader;
this.prefix = prefix;
}
public Optional<ByteSequence> getEndKey() {
return this.endKey;
}
/**
* Returns the revision to watch from.
*
* @return the revision.
*/
public long getRevision() {
return revision;
}
/**
* Whether created watcher gets the previous KV before the event happens.
*
* @return if true, watcher receives the previous KV before the event happens.
*/
public boolean isPrevKV() {
return prevKV;
}
/**
* Whether watcher server send periodic progress updates.
*
* @return if true, watcher server should send periodic progress updates.
*/
public boolean isProgressNotify() {
return progressNotify;
}
/**
* Whether filter put event in server side.
*
* @return if true, filter put event in server side
*/
public boolean isNoPut() {
return noPut;
}
/**
* Whether filter delete event in server side.
*
* @return if true, filter delete event in server side
*/
public boolean isNoDelete() {
return noDelete;
}
/**
* If true, when creating the watch streaming stub, use the REQUIRED_LEADER Metadata annotation,
* which ensures the stream will error out if quorum is lost by
* the server the stream is connected to. This will make the watch fail with an error
* and finish.
* Without this option, a watch running against a server that is out of quorum
* simply goes silent.
*
* @return if true, use REQUIRE_LEADER metadata annotation for watch streams
*/
public boolean withRequireLeader() {
return requireLeader;
}
public boolean isPrefix() {
return prefix;
}
}

View File

@ -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.
@ -18,7 +18,7 @@ package io.etcd.jetcd.resolver;
import java.net.URI;
import java.util.List;
import java.util.concurrent.Executor;
import java.util.Objects;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
@ -29,8 +29,6 @@ import io.grpc.Attributes;
import io.grpc.EquivalentAddressGroup;
import io.grpc.NameResolver;
import io.grpc.Status;
import io.grpc.internal.GrpcUtil;
import io.grpc.internal.SharedResourceHolder;
import com.google.common.base.Preconditions;
@ -46,7 +44,6 @@ public abstract class AbstractNameResolver extends NameResolver {
private volatile boolean shutdown;
private volatile boolean resolving;
private Executor executor;
private Listener listener;
public AbstractNameResolver(URI targetUri) {
@ -68,8 +65,7 @@ public abstract class AbstractNameResolver extends NameResolver {
public void start(Listener listener) {
synchronized (lock) {
Preconditions.checkState(this.listener == null, "already started");
this.executor = SharedResourceHolder.get(GrpcUtil.SHARED_CHANNEL_EXECUTOR);
this.listener = Preconditions.checkNotNull(listener, "listener");
this.listener = Objects.requireNonNull(listener, "listener");
resolve();
}
}
@ -85,21 +81,13 @@ public abstract class AbstractNameResolver extends NameResolver {
return;
}
shutdown = true;
synchronized (lock) {
if (executor != null) {
executor = SharedResourceHolder.release(GrpcUtil.SHARED_CHANNEL_EXECUTOR, executor);
}
}
}
private void resolve() {
if (resolving || shutdown) {
return;
}
synchronized (lock) {
executor.execute(this::doResolve);
}
doResolve();
}
private void doResolve() {
@ -123,7 +111,7 @@ public abstract class AbstractNameResolver extends NameResolver {
savedListener.onAddresses(groups, Attributes.EMPTY);
} catch (Exception e) {
LOGGER.warn("Error wile getting list of servers", e);
LOGGER.warn("Error while getting list of servers", e);
savedListener.onError(Status.NOT_FOUND);
} finally {
resolving = false;

View File

@ -26,8 +26,18 @@ public final class Errors {
private Errors() {
}
public static boolean isRetryable(Status status) {
return Status.UNAVAILABLE.getCode().equals(status.getCode()) || isInvalidTokenError(status);
// isRetryable implementation for idempotent operations.
public static boolean isRetryableForSafeRedoOp(Status status) {
return Status.UNAVAILABLE.getCode().equals(status.getCode()) || isAlwaysSafeToRetry(status);
}
// isRetryable implementation for non-idempotent operations
public static boolean isRetryableForNoSafeRedoOp(Status status) {
return isAlwaysSafeToRetry(status);
}
public static boolean isAlwaysSafeToRetry(Status status) {
return isInvalidTokenError(status) || isAuthStoreExpired(status);
}
public static boolean isInvalidTokenError(Throwable e) {

View File

@ -21,8 +21,8 @@ import java.util.function.Supplier;
public class MemorizingClientSupplier<T extends CloseableClient> implements Supplier<T>, CloseableClient {
final Supplier<T> delegate;
transient volatile boolean initialized;
transient T value;
volatile boolean initialized;
T value;
public MemorizingClientSupplier(Supplier<T> delegate) {
this.delegate = Objects.requireNonNull(delegate);

View File

@ -54,12 +54,19 @@ public final class Requests {
DeleteRangeRequest.Builder builder = DeleteRangeRequest.newBuilder()
.setKey(Util.prefixNamespace(key, namespace))
.setPrevKv(option.isPrevKV());
defineRangeRequestEnd(key, option.getEndKey(), option.isPrefix(), namespace, builder::setRangeEnd);
return builder.build();
}
private static void defineRangeRequestEnd(ByteSequence key, Optional<ByteSequence> endKeyOptional,
boolean hasPrefix, ByteSequence namespace, Consumer<ByteString> setRangeEndConsumer) {
private static void defineRangeRequestEnd(
ByteSequence key,
Optional<ByteSequence> endKeyOptional,
boolean hasPrefix,
ByteSequence namespace,
Consumer<ByteString> setRangeEndConsumer) {
if (endKeyOptional.isPresent()) {
setRangeEndConsumer
.accept(Util.prefixNamespaceToRangeEnd(ByteString.copyFrom(endKeyOptional.get().getBytes()), namespace));

View File

@ -123,16 +123,13 @@ public final class Util {
public static ThreadFactory createThreadFactory(String prefix, boolean daemon) {
ThreadFactory backingThreadFactory = Executors.defaultThreadFactory();
return new ThreadFactory() {
@Override
public Thread newThread(Runnable r) {
Thread t = backingThreadFactory.newThread(r);
t.setDaemon(daemon);
// set a proper name so it is easier to find out the where the thread was created
t.setName(prefix + t.getName());
return t;
}
return r -> {
Thread t = backingThreadFactory.newThread(r);
t.setDaemon(daemon);
// set a proper name so it is easier to find out the where the thread was created
t.setName(prefix + t.getName());
return t;
};
}
}

View File

@ -62,7 +62,8 @@ public class WatchResponse extends AbstractResponse<io.etcd.jetcd.api.WatchRespo
public synchronized List<WatchEvent> getEvents() {
if (events == null) {
events = getResponse().getEventsList().stream().map(event -> WatchResponse.toEvent(event, namespace))
events = getResponse().getEventsList().stream()
.map(event -> WatchResponse.toEvent(event, namespace))
.collect(Collectors.toList());
}
@ -88,4 +89,23 @@ public class WatchResponse extends AbstractResponse<io.etcd.jetcd.api.WatchRespo
return response.getEventsCount() == 0 && !response.getCreated() && !response.getCanceled()
&& response.getCompactRevision() == 0 && response.getHeader().getRevision() != 0;
}
/**
* Returns true if the WatchResponse is created notification.
*
* @return true if the WatchResponse is created notification.
*/
public boolean isCreatedNotify() {
return isCreatedNotify(getResponse());
}
/**
* Returns true if the WatchResponse is created notification.
*
* @param response the response.
* @return true if the WatchResponse is created notification.
*/
public static boolean isCreatedNotify(io.etcd.jetcd.api.WatchResponse response) {
return response.getCreated() && !response.getCanceled();
}
}

View File

@ -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.
@ -67,4 +67,4 @@ message UnlockRequest {
message UnlockResponse {
etcdserverpb.ResponseHeader header = 1;
}
}

View File

@ -50,6 +50,11 @@ public class ClientBuilderTest {
assertThatThrownBy(() -> Client.builder().endpoints((URI) null)).isInstanceOf(NullPointerException.class);
}
@Test
public void testVertx_Null() {
assertThatThrownBy(() -> Client.builder().vertx(null)).isInstanceOf(IllegalArgumentException.class);
}
@Test
public void testEndPoints_Verify_Empty() {
assertThatThrownBy(() -> Client.builder().endpoints(new URI(""))).isInstanceOf(IllegalArgumentException.class);

View File

@ -16,46 +16,20 @@
package io.etcd.jetcd.impl;
import java.util.List;
import java.util.concurrent.ExecutionException;
import java.util.concurrent.TimeUnit;
import java.util.concurrent.TimeoutException;
import org.junit.jupiter.api.Test;
import org.junit.jupiter.api.Timeout;
import org.junit.jupiter.api.extension.RegisterExtension;
import org.testcontainers.containers.Network;
import io.etcd.jetcd.Client;
import io.etcd.jetcd.Cluster;
import io.etcd.jetcd.cluster.Member;
import io.etcd.jetcd.test.EtcdClusterExtension;
import static org.assertj.core.api.Assertions.assertThat;
@Timeout(value = 30, unit = TimeUnit.SECONDS)
public class ClusterClientTest {
private static final Network NETWORK = Network.newNetwork();
@RegisterExtension
public static final EtcdClusterExtension n1 = EtcdClusterExtension.builder()
.withNodes(1)
.withPrefix("n1")
.withNetwork(NETWORK)
.build();
@RegisterExtension
public static final EtcdClusterExtension n2 = EtcdClusterExtension.builder()
.withNodes(1)
.withPrefix("n2")
.withNetwork(NETWORK)
.build();
@RegisterExtension
public static final EtcdClusterExtension n3 = EtcdClusterExtension.builder()
.withNodes(1)
.withPrefix("n3")
.withNetwork(NETWORK)
.build();
@RegisterExtension
public static final EtcdClusterExtension cluster = EtcdClusterExtension.builder()
.withNodes(3)
@ -68,61 +42,4 @@ public class ClusterClientTest {
assertThat(client.getClusterClient().listMember().get().getMembers()).hasSize(3);
}
}
@Test
public void testMemberManagement() throws ExecutionException, InterruptedException, TimeoutException {
final Client client = Client.builder().endpoints(n1.clientEndpoints()).build();
final Cluster clusterClient = client.getClusterClient();
Member m2 = clusterClient.addMember(n2.peerEndpoints())
.get(5, TimeUnit.SECONDS)
.getMember();
assertThat(m2).isNotNull();
assertThat(clusterClient.listMember().get().getMembers()).hasSize(2);
/*
TODO: check
Member m3 = clusterClient.addMember(n3.peerEndpoints())
.get(5, TimeUnit.SECONDS)
.getMember();
assertThat(m3).isNotNull();
assertThat(clusterClient.listMember().get().getMembers()).hasSize(3);
*/
}
@Test
public void testMemberManagementAddNonLearner() throws ExecutionException, InterruptedException, TimeoutException {
final Client client = Client.builder().endpoints(n1.clientEndpoints()).build();
final Cluster clusterClient = client.getClusterClient();
Member m2 = clusterClient.addMember(n2.peerEndpoints(), false)
.get(5, TimeUnit.SECONDS)
.getMember();
assertThat(m2).isNotNull();
assertThat(m2.isLearner()).isFalse();
List<Member> members = clusterClient.listMember().get().getMembers();
assertThat(members).hasSize(2);
assertThat(members.stream().filter(Member::isLearner).findAny()).isEmpty();
}
@Test
public void testMemberManagementAddLearner() throws ExecutionException, InterruptedException, TimeoutException {
final Client client = Client.builder().endpoints(n1.clientEndpoints()).build();
final Cluster clusterClient = client.getClusterClient();
Member m2 = clusterClient.addMember(n2.peerEndpoints(), true)
.get(5, TimeUnit.SECONDS)
.getMember();
assertThat(m2).isNotNull();
assertThat(m2.isLearner()).isTrue();
List<Member> members = clusterClient.listMember().get().getMembers();
assertThat(members).hasSize(2);
assertThat(members.stream().filter(Member::isLearner).findAny()).isPresent();
}
}

View File

@ -0,0 +1,115 @@
/*
* Copyright 2016-2021 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.
* 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.
*/
package io.etcd.jetcd.impl;
import java.util.List;
import java.util.concurrent.ExecutionException;
import java.util.concurrent.TimeUnit;
import java.util.concurrent.TimeoutException;
import org.junit.jupiter.api.Test;
import org.junit.jupiter.api.Timeout;
import org.junit.jupiter.api.extension.RegisterExtension;
import org.testcontainers.containers.Network;
import io.etcd.jetcd.Client;
import io.etcd.jetcd.Cluster;
import io.etcd.jetcd.cluster.Member;
import io.etcd.jetcd.test.EtcdClusterExtension;
import static org.assertj.core.api.Assertions.assertThat;
@Timeout(value = 30, unit = TimeUnit.SECONDS)
public class ClusterMembersTest {
private static final Network NETWORK = Network.newNetwork();
@RegisterExtension
public final EtcdClusterExtension n1 = EtcdClusterExtension.builder()
.withNodes(1)
.withPrefix("n1")
.withNetwork(NETWORK)
.build();
@RegisterExtension
public final EtcdClusterExtension n2 = EtcdClusterExtension.builder()
.withNodes(1)
.withPrefix("n2")
.withNetwork(NETWORK)
.build();
@RegisterExtension
public final EtcdClusterExtension n3 = EtcdClusterExtension.builder()
.withNodes(1)
.withPrefix("n3")
.withNetwork(NETWORK)
.build();
@Test
public void testMemberManagement() throws ExecutionException, InterruptedException, TimeoutException {
final Client client = Client.builder().endpoints(n1.clientEndpoints()).build();
final Cluster clusterClient = client.getClusterClient();
Member m2 = clusterClient.addMember(n2.peerEndpoints())
.get(5, TimeUnit.SECONDS)
.getMember();
assertThat(m2).isNotNull();
assertThat(clusterClient.listMember().get().getMembers()).hasSize(2);
/*
TODO: check
Member m3 = clusterClient.addMember(n3.peerEndpoints())
.get(5, TimeUnit.SECONDS)
.getMember();
assertThat(m3).isNotNull();
assertThat(clusterClient.listMember().get().getMembers()).hasSize(3);
*/
}
@Test
public void testMemberManagementAddNonLearner() throws ExecutionException, InterruptedException, TimeoutException {
final Client client = Client.builder().endpoints(n1.clientEndpoints()).build();
final Cluster clusterClient = client.getClusterClient();
Member m2 = clusterClient.addMember(n2.peerEndpoints(), false)
.get(5, TimeUnit.SECONDS)
.getMember();
assertThat(m2).isNotNull();
assertThat(m2.isLearner()).isFalse();
List<Member> members = clusterClient.listMember().get().getMembers();
assertThat(members).hasSize(2);
assertThat(members.stream().filter(Member::isLearner).findAny()).isEmpty();
}
@Test
public void testMemberManagementAddLearner() throws ExecutionException, InterruptedException, TimeoutException {
final Client client = Client.builder().endpoints(n1.clientEndpoints()).build();
final Cluster clusterClient = client.getClusterClient();
Member m2 = clusterClient.addMember(n2.peerEndpoints(), true)
.get(5, TimeUnit.SECONDS)
.getMember();
assertThat(m2).isNotNull();
assertThat(m2.isLearner()).isTrue();
List<Member> members = clusterClient.listMember().get().getMembers();
assertThat(members).hasSize(2);
assertThat(members.stream().filter(Member::isLearner).findAny()).isPresent();
}
}

View File

@ -20,11 +20,7 @@ import java.nio.charset.StandardCharsets;
import java.util.ArrayList;
import java.util.List;
import java.util.Random;
import java.util.concurrent.ExecutionException;
import java.util.concurrent.ExecutorService;
import java.util.concurrent.Executors;
import java.util.concurrent.Future;
import java.util.concurrent.TimeUnit;
import java.util.concurrent.*;
import java.util.concurrent.atomic.AtomicInteger;
import org.junit.jupiter.api.BeforeAll;
@ -32,17 +28,8 @@ import org.junit.jupiter.api.Test;
import org.junit.jupiter.api.Timeout;
import org.junit.jupiter.api.extension.RegisterExtension;
import io.etcd.jetcd.ByteSequence;
import io.etcd.jetcd.Client;
import io.etcd.jetcd.Election;
import io.etcd.jetcd.KV;
import io.etcd.jetcd.KeyValue;
import io.etcd.jetcd.Lease;
import io.etcd.jetcd.election.CampaignResponse;
import io.etcd.jetcd.election.LeaderKey;
import io.etcd.jetcd.election.LeaderResponse;
import io.etcd.jetcd.election.NoLeaderException;
import io.etcd.jetcd.election.NotLeaderException;
import io.etcd.jetcd.*;
import io.etcd.jetcd.election.*;
import io.etcd.jetcd.options.GetOption;
import io.etcd.jetcd.test.EtcdClusterExtension;
@ -87,7 +74,7 @@ public class ElectionTest {
assertThat(campaignResponse.getLeader().getLease()).isEqualTo(leaseId);
assertThat(campaignResponse.getLeader().getName()).isEqualTo(electionName);
// election is backed by standard key in etcd. let us examine it
GetOption getOption = GetOption.newBuilder().isPrefix(true).build();
GetOption getOption = GetOption.builder().isPrefix(true).build();
List<KeyValue> keys = kvClient.get(electionName, getOption).get().getKvs();
assertThat(keys.size()).isEqualTo(1);
assertThat(keys.get(0).getKey().toString()).isEqualTo(campaignResponse.getLeader().getKey().toString());
@ -147,7 +134,7 @@ public class ElectionTest {
assertThat(campaignResponse1.getLeader().getRevision()).isEqualTo(campaignResponse2.getLeader().getRevision());
// latest proposal should be persisted
GetOption getOption = GetOption.newBuilder().isPrefix(true).build();
GetOption getOption = GetOption.builder().isPrefix(true).build();
List<KeyValue> keys = kvClient.get(electionName, getOption).get().getKvs();
assertThat(keys.size()).isEqualTo(1);
assertThat(keys.get(0).getValue()).isEqualTo(secondProposal);
@ -167,7 +154,7 @@ public class ElectionTest {
} catch (ExecutionException e) {
assertThat(e.getCause()).isInstanceOf(NotLeaderException.class);
}
GetOption getOption = GetOption.newBuilder().isPrefix(true).build();
GetOption getOption = GetOption.builder().isPrefix(true).build();
List<KeyValue> keys = kvClient.get(electionName, getOption).get().getKvs();
assertThat(keys).isEmpty();
}
@ -210,6 +197,39 @@ public class ElectionTest {
leaseClient.revoke(leaseId).get();
}
@Test
public void testObserveExistingLeader() throws Exception {
final AtomicInteger electionsSeen = new AtomicInteger(0);
ByteSequence electionName = ByteSequence.from(randomString(), StandardCharsets.UTF_8);
long leaseId = leaseClient.grant(10).get().getID();
ByteSequence proposal = ByteSequence.from(randomString(), StandardCharsets.UTF_8);
electionClient.campaign(electionName, leaseId, proposal)
.get(OPERATION_TIMEOUT, TimeUnit.SECONDS);
electionClient.observe(electionName, new Election.Listener() {
@Override
public void onNext(LeaderResponse response) {
electionsSeen.incrementAndGet();
}
@Override
public void onError(Throwable error) {
}
@Override
public void onCompleted() {
}
});
TestUtil.waitForCondition(
() -> electionsSeen.get() == 1, OPERATION_TIMEOUT * 1000,
"Observer did not receive expected notifications, got: " + electionsSeen.get());
leaseClient.revoke(leaseId).get();
}
@Test
public void testSynchronizationBarrier() throws Exception {
final int threadCount = 5;
@ -248,7 +268,7 @@ public class ElectionTest {
executor.awaitTermination(threadCount * OPERATION_TIMEOUT, TimeUnit.SECONDS);
futures.forEach(f -> assertThat(f).isDone());
assertThat(sharedVariable.get()).isEqualTo(threadCount);
GetOption getOption = GetOption.newBuilder().isPrefix(true).build();
GetOption getOption = GetOption.builder().isPrefix(true).build();
assertThat(kvClient.get(electionName, getOption).get().getCount()).isEqualTo(0L);
for (int i = 0; i < threadCount; ++i) {
clients.get(i).getLeaseClient().revoke(leases.get(i)).get();

View File

@ -255,8 +255,8 @@ public class KVNamespaceTest {
CompletableFuture<TxnResponse> txnFuture = txn
// cmpKey doesn't exist in this namespace
.If(new Cmp(cmpKey, Cmp.Op.EQUAL, CmpTarget.version(0)))
.Then(Op.put(key1, TestUtil.randomByteSequence(), PutOption.newBuilder().withPrevKV().build()))
.Else(Op.put(key2, TestUtil.randomByteSequence(), PutOption.newBuilder().withPrevKV().build())).commit();
.Then(Op.put(key1, TestUtil.randomByteSequence(), PutOption.builder().withPrevKV().build()))
.Else(Op.put(key2, TestUtil.randomByteSequence(), PutOption.builder().withPrevKV().build())).commit();
TxnResponse txnResponse = txnFuture.get();
assertThat(txnResponse.getPutResponses().size()).isEqualTo(1);
assertThat(txnResponse.getPutResponses().get(0).hasPrevKv()).isTrue();
@ -269,8 +269,8 @@ public class KVNamespaceTest {
Txn txn = kvClientWithNamespace.txn();
CompletableFuture<TxnResponse> txnFuture = txn
// key1 exists in this namespace
.If(new Cmp(key1, Cmp.Op.EQUAL, CmpTarget.version(0))).Then(Op.get(key1, GetOption.newBuilder().build()))
.Else(Op.get(key2, GetOption.newBuilder().build())).commit();
.If(new Cmp(key1, Cmp.Op.EQUAL, CmpTarget.version(0))).Then(Op.get(key1, GetOption.builder().build()))
.Else(Op.get(key2, GetOption.builder().build())).commit();
TxnResponse txnResponse = txnFuture.get();
assertThat(txnResponse.getGetResponses().size()).isEqualTo(1);
assertThat(txnResponse.getGetResponses().get(0).getKvs().size()).isEqualTo(1);
@ -284,8 +284,8 @@ public class KVNamespaceTest {
CompletableFuture<TxnResponse> txnFuture = txn
// key1 exists in this namespace
.If(new Cmp(key1, Cmp.Op.GREATER, CmpTarget.version(0)))
.Then(Op.delete(key2, DeleteOption.newBuilder().withPrevKV(true).build()))
.Else(Op.delete(key1, DeleteOption.newBuilder().withPrevKV(true).build())).commit();
.Then(Op.delete(key2, DeleteOption.builder().withPrevKV(true).build()))
.Else(Op.delete(key1, DeleteOption.builder().withPrevKV(true).build())).commit();
TxnResponse txnResponse = txnFuture.get();
assertThat(txnResponse.getDeleteResponses().size()).isEqualTo(1);
assertThat(txnResponse.getDeleteResponses().get(0).getPrevKvs().size()).isEqualTo(1);
@ -323,14 +323,14 @@ public class KVNamespaceTest {
ByteSequence nextValue1 = TestUtil.randomByteSequence();
CompletableFuture<TxnResponse> txnFuture = txn.If(new Cmp(cmpKey1, Cmp.Op.EQUAL, CmpTarget.version(0)))
.Then(Op.txn(new Cmp[] { new Cmp(cmpKey2, Cmp.Op.GREATER, CmpTarget.version(0)) },
new Op[] { Op.put(key1, nextValue1, PutOption.newBuilder().withPrevKV().build()) },
new Op[] { Op.put(key1, nextValue1, PutOption.builder().withPrevKV().build()) },
new Op[] {
Op.put(key2, TestUtil.randomByteSequence(), PutOption.newBuilder().withPrevKV().build()) }))
Op.put(key2, TestUtil.randomByteSequence(), PutOption.builder().withPrevKV().build()) }))
.Else(Op.txn(new Cmp[] { new Cmp(cmpKey2, Cmp.Op.GREATER, CmpTarget.version(0)) },
new Op[] {
Op.put(key2, TestUtil.randomByteSequence(), PutOption.newBuilder().withPrevKV().build()) },
Op.put(key2, TestUtil.randomByteSequence(), PutOption.builder().withPrevKV().build()) },
new Op[] {
Op.put(key1, TestUtil.randomByteSequence(), PutOption.newBuilder().withPrevKV().build()) }))
Op.put(key1, TestUtil.randomByteSequence(), PutOption.builder().withPrevKV().build()) }))
.commit();
TxnResponse response = txnFuture.get();
assertThat(response.getTxnResponses().size()).isEqualTo(1);
@ -378,7 +378,7 @@ public class KVNamespaceTest {
*/
private static boolean putKVWithAssertion(KV kvClient, ByteSequence key, ByteSequence value, ByteSequence prevValue)
throws Exception {
CompletableFuture<PutResponse> feature = kvClient.put(key, value, PutOption.newBuilder().withPrevKV().build());
CompletableFuture<PutResponse> feature = kvClient.put(key, value, PutOption.builder().withPrevKV().build());
PutResponse response = feature.get();
if (prevValue != null) {
assertThat(response.hasPrevKv()).isTrue();
@ -390,7 +390,7 @@ public class KVNamespaceTest {
private static void deleteKVWithAssertion(KV kvClient, ByteSequence key, ByteSequence prevValue) throws Exception {
CompletableFuture<DeleteResponse> deleteFuture = kvClient.delete(key,
DeleteOption.newBuilder().withPrevKV(true).build());
DeleteOption.builder().withPrevKV(true).build());
DeleteResponse deleteResponse = deleteFuture.get();
assertThat(deleteResponse.getDeleted()).isEqualTo(1);
assertThat(deleteResponse.getPrevKvs().size()).isEqualTo(1);
@ -407,7 +407,7 @@ public class KVNamespaceTest {
private static void assertExistentKVs(KV kvClient, ByteSequence key, ByteSequence end, List<TestKeyValue> expectedKVs)
throws Exception {
CompletableFuture<GetResponse> getFuture = kvClient.get(key, GetOption.newBuilder().withRange(end).build());
CompletableFuture<GetResponse> getFuture = kvClient.get(key, GetOption.builder().withRange(end).build());
GetResponse getResponse = getFuture.get();
assertThat(getResponse.getKvs().size()).isEqualTo(expectedKVs.size());
for (KeyValue keyValue : getResponse.getKvs()) {
@ -426,7 +426,7 @@ public class KVNamespaceTest {
private static void deleteKVsWithAssertion(KV kvClient, ByteSequence key, ByteSequence end, List<TestKeyValue> previousKVs)
throws Exception {
CompletableFuture<DeleteResponse> deleteFuture = kvClient.delete(key,
DeleteOption.newBuilder().withRange(end).withPrevKV(true).build());
DeleteOption.builder().withRange(end).withPrevKV(true).build());
DeleteResponse deleteResponse = deleteFuture.get();
assertThat(deleteResponse.getDeleted()).isEqualTo(previousKVs.size());
assertThat(deleteResponse.getPrevKvs().size()).isEqualTo(previousKVs.size());

View File

@ -50,7 +50,6 @@ import io.etcd.jetcd.options.GetOption.SortTarget;
import io.etcd.jetcd.options.PutOption;
import io.etcd.jetcd.test.EtcdClusterExtension;
import static com.google.common.base.Charsets.UTF_8;
import static io.etcd.jetcd.impl.TestUtil.bytesOf;
import static io.etcd.jetcd.impl.TestUtil.randomString;
import static org.assertj.core.api.Assertions.assertThat;
@ -86,7 +85,8 @@ public class KVTest {
ByteSequence key = bytesOf(keyString);
ByteSequence prefixedKey = prefix.concat(subPrefix).concat(key);
assertThat(prefixedKey.startsWith(prefix)).isTrue();
assertThat(prefixedKey.substring(prefix.size() + subPrefix.size()).toString(UTF_8)).isEqualTo(keyString);
assertThat(prefixedKey.substring(prefix.size() + subPrefix.size()).toString(StandardCharsets.UTF_8))
.isEqualTo(keyString);
assertThat(prefixedKey.substring(prefix.size(), prefix.size() + subPrefix.size())).isEqualTo(subPrefix);
}
@ -100,7 +100,7 @@ public class KVTest {
@Test
public void testPutWithNotExistLease() throws ExecutionException, InterruptedException {
PutOption option = PutOption.newBuilder().withLeaseId(99999).build();
PutOption option = PutOption.builder().withLeaseId(99999).build();
CompletableFuture<PutResponse> future = kvClient.put(SAMPLE_KEY, SAMPLE_VALUE, option);
assertThatExceptionOfType(ExecutionException.class)
.isThrownBy(future::get).withMessageEndingWith("etcdserver: requested lease not found");
@ -113,7 +113,8 @@ public class KVTest {
CompletableFuture<GetResponse> getFeature = kvClient.get(SAMPLE_KEY_2);
GetResponse response = getFeature.get();
assertThat(response.getKvs()).hasSize(1);
assertThat(response.getKvs().get(0).getValue().toString(UTF_8)).isEqualTo(SAMPLE_VALUE_2.toString(UTF_8));
assertThat(response.getKvs().get(0).getValue().toString(StandardCharsets.UTF_8))
.isEqualTo(SAMPLE_VALUE_2.toString(StandardCharsets.UTF_8));
assertThat(!response.isMore()).isTrue();
}
@ -122,11 +123,12 @@ public class KVTest {
CompletableFuture<PutResponse> feature = kvClient.put(SAMPLE_KEY_3, SAMPLE_VALUE);
PutResponse putResp = feature.get();
kvClient.put(SAMPLE_KEY_3, SAMPLE_VALUE_2).get();
GetOption option = GetOption.newBuilder().withRevision(putResp.getHeader().getRevision()).build();
GetOption option = GetOption.builder().withRevision(putResp.getHeader().getRevision()).build();
CompletableFuture<GetResponse> getFeature = kvClient.get(SAMPLE_KEY_3, option);
GetResponse response = getFeature.get();
assertThat(response.getKvs()).hasSize(1);
assertThat(response.getKvs().get(0).getValue().toString(UTF_8)).isEqualTo(SAMPLE_VALUE.toString(UTF_8));
assertThat(response.getKvs().get(0).getValue().toString(StandardCharsets.UTF_8))
.isEqualTo(SAMPLE_VALUE.toString(StandardCharsets.UTF_8));
}
@Test
@ -135,15 +137,17 @@ public class KVTest {
int numPrefix = 3;
putKeysWithPrefix(prefix, numPrefix);
GetOption option = GetOption.newBuilder().withSortField(SortTarget.KEY).withSortOrder(SortOrder.DESCEND)
GetOption option = GetOption.builder().withSortField(SortTarget.KEY).withSortOrder(SortOrder.DESCEND)
.isPrefix(true).build();
CompletableFuture<GetResponse> getFeature = kvClient.get(bytesOf(prefix), option);
GetResponse response = getFeature.get();
assertThat(response.getKvs()).hasSize(numPrefix);
for (int i = 0; i < numPrefix; i++) {
assertThat(response.getKvs().get(i).getKey().toString(UTF_8)).isEqualTo(prefix + (numPrefix - i - 1));
assertThat(response.getKvs().get(i).getValue().toString(UTF_8)).isEqualTo(String.valueOf(numPrefix - i - 1));
assertThat(response.getKvs().get(i).getKey().toString(StandardCharsets.UTF_8))
.isEqualTo(prefix + (numPrefix - i - 1));
assertThat(response.getKvs().get(i).getValue().toString(StandardCharsets.UTF_8))
.isEqualTo(String.valueOf(numPrefix - i - 1));
}
}
@ -173,12 +177,12 @@ public class KVTest {
putKeysWithPrefix(prefix, numPrefixes);
// verify get withPrefix.
CompletableFuture<GetResponse> getFuture = kvClient.get(key, GetOption.newBuilder().isPrefix(true).build());
CompletableFuture<GetResponse> getFuture = kvClient.get(key, GetOption.builder().isPrefix(true).build());
GetResponse getResp = getFuture.get();
assertThat(getResp.getCount()).isEqualTo(numPrefixes);
// verify del withPrefix.
DeleteOption deleteOpt = DeleteOption.newBuilder().isPrefix(true).build();
DeleteOption deleteOpt = DeleteOption.builder().isPrefix(true).build();
CompletableFuture<DeleteResponse> delFuture = kvClient.delete(key, deleteOpt);
DeleteResponse delResp = delFuture.get();
assertThat(delResp.getDeleted()).isEqualTo(numPrefixes);
@ -212,7 +216,8 @@ public class KVTest {
// get the value
GetResponse getResp = kvClient.get(sampleKey).get();
assertThat(getResp.getKvs()).hasSize(1);
assertThat(getResp.getKvs().get(0).getValue().toString(UTF_8)).isEqualTo(putValue.toString(UTF_8));
assertThat(getResp.getKvs().get(0).getValue().toString(StandardCharsets.UTF_8))
.isEqualTo(putValue.toString(StandardCharsets.UTF_8));
}
@Test
@ -225,8 +230,8 @@ public class KVTest {
//always false cmp
Cmp cmp = new Cmp(sampleKey, Cmp.Op.EQUAL, CmpTarget.value(bytesOf("not_exists")));
Op.PutOp putOp = Op.put(bytesOf("other_string"), bytesOf("other_value"), PutOption.DEFAULT);
Op.GetOp getByPrefix = Op.get(sampleKey, GetOption.newBuilder().isPrefix(true).build());
Op.DeleteOp delete = Op.delete(sampleKey, DeleteOption.newBuilder().isPrefix(true).withPrevKV(true).build());
Op.GetOp getByPrefix = Op.get(sampleKey, GetOption.builder().isPrefix(true).build());
Op.DeleteOp delete = Op.delete(sampleKey, DeleteOption.builder().isPrefix(true).withPrevKV(true).build());
TxnResponse txnResponse = kvClient.txn().If(cmp)
.Then(putOp).Else(getByPrefix, delete).commit().get();
List<GetResponse> getResponse = txnResponse.getGetResponses();
@ -260,7 +265,8 @@ public class KVTest {
// get the value
GetResponse getResp = kvClient.get(sampleKey).get();
assertThat(getResp.getKvs()).hasSize(1);
assertThat(getResp.getKvs().get(0).getValue().toString(UTF_8)).isEqualTo(putValue.toString(UTF_8));
assertThat(getResp.getKvs().get(0).getValue().toString(StandardCharsets.UTF_8))
.isEqualTo(putValue.toString(StandardCharsets.UTF_8));
}
@Test
@ -281,11 +287,13 @@ public class KVTest {
GetResponse getResp = kvClient.get(foo).get();
assertThat(getResp.getKvs()).hasSize(1);
assertThat(getResp.getKvs().get(0).getValue().toString(UTF_8)).isEqualTo(bar.toString(UTF_8));
assertThat(getResp.getKvs().get(0).getValue().toString(StandardCharsets.UTF_8))
.isEqualTo(bar.toString(StandardCharsets.UTF_8));
GetResponse getResp2 = kvClient.get(abc).get();
assertThat(getResp2.getKvs()).hasSize(1);
assertThat(getResp2.getKvs().get(0).getValue().toString(UTF_8)).isEqualTo(oneTwoThree.toString(UTF_8));
assertThat(getResp2.getKvs().get(0).getValue().toString(StandardCharsets.UTF_8))
.isEqualTo(oneTwoThree.toString(StandardCharsets.UTF_8));
}
@Test
@ -308,12 +316,15 @@ public class KVTest {
for (int i = 0; i < putCount; ++i) {
ByteSequence value = ByteSequence
.from(Integer.toString(i), StandardCharsets.UTF_8);
customClient.getKVClient().put(key, value).join();
customClient.getKVClient().put(key, value, PutOption.builder().withAutoRetry().build()).join();
}
});
// restart the cluster while uploading
executor.schedule(() -> cluster.restart(), 100, TimeUnit.MILLISECONDS);
executor.schedule(
() -> cluster.restart(0, TimeUnit.MILLISECONDS),
100,
TimeUnit.MILLISECONDS);
executor.shutdown();
assertThat(executor.awaitTermination(30, TimeUnit.SECONDS)).isTrue();

View File

@ -0,0 +1,148 @@
/*
* Copyright 2016-2021 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.
* 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.
*/
package io.etcd.jetcd.impl;
import java.net.URI;
import java.nio.charset.StandardCharsets;
import java.util.concurrent.CountDownLatch;
import java.util.concurrent.Executors;
import java.util.concurrent.ScheduledExecutorService;
import java.util.concurrent.TimeUnit;
import java.util.concurrent.atomic.AtomicInteger;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
import org.assertj.core.data.Percentage;
import org.junit.jupiter.api.AfterEach;
import org.junit.jupiter.api.BeforeEach;
import org.junit.jupiter.api.Disabled;
import org.junit.jupiter.api.Test;
import org.junit.jupiter.api.Timeout;
import org.junit.jupiter.api.extension.RegisterExtension;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import io.etcd.jetcd.ByteSequence;
import io.etcd.jetcd.Client;
import io.etcd.jetcd.KV;
import io.etcd.jetcd.Lease;
import io.etcd.jetcd.options.PutOption;
import io.etcd.jetcd.test.EtcdClusterExtension;
import io.restassured.RestAssured;
import static org.assertj.core.api.Assertions.assertThat;
@Timeout(value = 45, unit = TimeUnit.SECONDS)
public class LeaseMemoryLeakTest {
@RegisterExtension
public static final EtcdClusterExtension CLUSTER = EtcdClusterExtension.builder()
.withNodes(1)
.build();
private Client client;
private KV kvClient;
private Lease leaseClient;
private static final Logger LOGGER = LoggerFactory.getLogger(LeaseOnceErrorTest.class);
private static final long TTL = 10;
private static final int ITERATIONS = 5;
private static final Pattern GO_ROUTINES_EXTRACT_PATTERN = Pattern.compile("go_goroutines (\\d+)");
private static final ByteSequence KEY = ByteSequence.from("foo", StandardCharsets.UTF_8);
private static final ByteSequence VALUE = ByteSequence.from("bar", StandardCharsets.UTF_8);
@BeforeEach
public void setUp() {
client = TestUtil.client(CLUSTER).build();
kvClient = client.getKVClient();
leaseClient = client.getLeaseClient();
}
@AfterEach
public void tearDown() {
if (client != null) {
client.close();
}
}
// https://github.com/etcd-io/jetcd/issues/1236
@Test
@Disabled("Flaky test, must be investigated")
public void testKeepAliveOnceMemoryLeak() throws Exception {
final long leaseID = leaseClient.grant(TTL).get(1, TimeUnit.SECONDS).getID();
final URI uri = CLUSTER.cluster().clientEndpoints().get(0);
final ScheduledExecutorService scheduler = Executors.newSingleThreadScheduledExecutor();
try {
LOGGER.info("Put K/V with lease id {}", leaseID);
kvClient.put(KEY, VALUE, PutOption.builder().withLeaseId(leaseID).build()).get(1, TimeUnit.SECONDS);
AtomicInteger max = new AtomicInteger();
CountDownLatch latch = new CountDownLatch(ITERATIONS);
int start = extractGoRoutinesCount(uri);
assertThat(start).isGreaterThan(0);
var unused = scheduler.scheduleAtFixedRate(() -> {
try {
if (latch.getCount() == 0) {
return;
}
LOGGER.info("Keep alive {} once for lease id {}", ITERATIONS - latch.getCount(), leaseID);
leaseClient.keepAliveOnce(leaseID).get(5, TimeUnit.SECONDS);
int count = extractGoRoutinesCount(uri);
max.set(Math.max(max.get(), count));
LOGGER.info("go-routines:{}, max: {}, start: {}", count, max.get(), start);
latch.countDown();
} catch (Exception e) {
throw new RuntimeException(e);
}
}, 0, 1, TimeUnit.SECONDS);
assertThat(latch.await(10, TimeUnit.SECONDS)).isTrue();
assertThat(max.get()).isGreaterThan(0);
assertThat(max.get()).isGreaterThanOrEqualTo(start);
if (max.get() != start) {
assertThat(max.get() - start).isCloseTo(5, Percentage.withPercentage(80));
}
} finally {
scheduler.shutdownNow();
}
}
private int extractGoRoutinesCount(URI uri) {
var metrics = RestAssured.given()
.baseUri(uri.toString())
.when()
.get("/metrics")
.then()
.statusCode(200)
.extract().asString();
final Matcher matcher = GO_ROUTINES_EXTRACT_PATTERN.matcher(metrics);
if (matcher.find()) {
return Integer.parseInt(matcher.group(1));
}
return -1;
}
}

View File

@ -0,0 +1,78 @@
/*
* Copyright 2016-2021 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.
* 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.
*/
package io.etcd.jetcd.impl;
import java.util.concurrent.TimeUnit;
import org.junit.jupiter.api.AfterEach;
import org.junit.jupiter.api.BeforeEach;
import org.junit.jupiter.api.Test;
import org.junit.jupiter.api.Timeout;
import org.junit.jupiter.api.extension.RegisterExtension;
import io.etcd.jetcd.Client;
import io.etcd.jetcd.Lease;
import io.etcd.jetcd.common.exception.EtcdException;
import io.etcd.jetcd.lease.LeaseKeepAliveResponse;
import io.etcd.jetcd.lease.LeaseRevokeResponse;
import io.etcd.jetcd.test.EtcdClusterExtension;
import static org.assertj.core.api.Assertions.assertThat;
import static org.assertj.core.api.Assertions.assertThatThrownBy;
@Timeout(value = 45, unit = TimeUnit.SECONDS)
public class LeaseOnceErrorTest {
@RegisterExtension
public static final EtcdClusterExtension CLUSTER = EtcdClusterExtension.builder()
.withNodes(1)
.build();
private Client client;
private Lease leaseClient;
private static final long TTL = 2;
@BeforeEach
public void setUp() {
client = TestUtil.client(CLUSTER).build();
leaseClient = client.getLeaseClient();
}
@AfterEach
public void tearDown() {
if (client != null) {
client.close();
}
}
// https://github.com/etcd-io/jetcd/issues/1254
@Test
public void testKeepAliveError() throws Exception {
final long leaseID = leaseClient.grant(TTL).get(1, TimeUnit.SECONDS).getID();
LeaseKeepAliveResponse ka1 = leaseClient.keepAliveOnce(leaseID).get(1, TimeUnit.SECONDS);
assertThat(ka1.getTTL()).isNotZero();
LeaseRevokeResponse r1 = leaseClient.revoke(leaseID).get(1, TimeUnit.SECONDS);
assertThat(r1).isNotNull();
assertThatThrownBy(() -> leaseClient.keepAliveOnce(leaseID).get(1, TimeUnit.SECONDS))
.hasCauseInstanceOf(EtcdException.class)
.hasMessageContaining("etcdserver: requested lease not found");
}
}

View File

@ -16,7 +16,7 @@
package io.etcd.jetcd.impl;
import java.util.concurrent.CountDownLatch;
import java.nio.charset.StandardCharsets;
import java.util.concurrent.ExecutionException;
import java.util.concurrent.RejectedExecutionException;
import java.util.concurrent.TimeUnit;
@ -41,10 +41,10 @@ import io.etcd.jetcd.support.Observers;
import io.etcd.jetcd.test.EtcdClusterExtension;
import io.grpc.stub.StreamObserver;
import com.google.common.base.Charsets;
import static org.assertj.core.api.Assertions.assertThat;
import static org.assertj.core.api.Assertions.assertThatExceptionOfType;
import static org.assertj.core.api.Assertions.assertThatNoException;
import static org.awaitility.Awaitility.await;
@Timeout(value = 30, unit = TimeUnit.SECONDS)
public class LeaseTest {
@ -58,9 +58,9 @@ public class LeaseTest {
private Client client;
private Lease leaseClient;
private static final ByteSequence KEY = ByteSequence.from("foo", Charsets.UTF_8);
private static final ByteSequence KEY_2 = ByteSequence.from("foo2", Charsets.UTF_8);
private static final ByteSequence VALUE = ByteSequence.from("bar", Charsets.UTF_8);
private static final ByteSequence KEY = ByteSequence.from("foo", StandardCharsets.UTF_8);
private static final ByteSequence KEY_2 = ByteSequence.from("foo2", StandardCharsets.UTF_8);
private static final ByteSequence VALUE = ByteSequence.from("bar", StandardCharsets.UTF_8);
@BeforeEach
public void setUp() {
@ -80,33 +80,43 @@ public class LeaseTest {
public void testGrant() throws Exception {
long leaseID = leaseClient.grant(5).get().getID();
kvClient.put(KEY, VALUE, PutOption.newBuilder().withLeaseId(leaseID).build()).get();
kvClient.put(KEY, VALUE, PutOption.builder().withLeaseId(leaseID).build()).get();
assertThat(kvClient.get(KEY).get().getCount()).isEqualTo(1);
Thread.sleep(6000);
await().pollInterval(250, TimeUnit.MILLISECONDS).untilAsserted(() -> {
assertThat(kvClient.get(KEY).get().getCount()).isEqualTo(0);
});
assertThat(kvClient.get(KEY).get().getCount()).isEqualTo(0);
}
@Test
public void testGrantWithTimeout() throws Exception {
long leaseID = leaseClient.grant(5, 10, TimeUnit.SECONDS).get().getID();
kvClient.put(KEY, VALUE, PutOption.newBuilder().withLeaseId(leaseID).build()).get();
assertThat(kvClient.get(KEY).get().getCount()).isEqualTo(1);
Client c = TestUtil.client(cluster).build();
Lease lc = c.getLeaseClient();
Thread.sleep(6000L);
assertThat(kvClient.get(KEY).get().getCount()).isEqualTo(0);
try {
long leaseID = lc.grant(5, 10, TimeUnit.SECONDS).get().getID();
kvClient.put(KEY, VALUE, PutOption.builder().withLeaseId(leaseID).build()).get();
assertThat(kvClient.get(KEY).get().getCount()).isEqualTo(1);
tearDown();
assertThatExceptionOfType(ExecutionException.class)
.isThrownBy(() -> leaseClient.grant(5, 2, TimeUnit.SECONDS).get().getID())
.withCauseInstanceOf(RejectedExecutionException.class);
setUp();
await().pollInterval(250, TimeUnit.MILLISECONDS).untilAsserted(() -> {
assertThat(kvClient.get(KEY).get().getCount()).isEqualTo(0);
});
} finally {
assertThatNoException()
.isThrownBy(c::close);
assertThatExceptionOfType(ExecutionException.class)
.isThrownBy(() -> lc.grant(5, 2, TimeUnit.SECONDS).get().getID())
.withCauseInstanceOf(RejectedExecutionException.class);
}
}
@Test
public void testRevoke() throws Exception {
long leaseID = leaseClient.grant(5).get().getID();
kvClient.put(KEY, VALUE, PutOption.newBuilder().withLeaseId(leaseID).build()).get();
kvClient.put(KEY, VALUE, PutOption.builder().withLeaseId(leaseID).build()).get();
assertThat(kvClient.get(KEY).get().getCount()).isEqualTo(1);
leaseClient.revoke(leaseID).get();
assertThat(kvClient.get(KEY).get().getCount()).isEqualTo(0);
@ -115,33 +125,83 @@ public class LeaseTest {
@Test
public void testKeepAliveOnce() throws ExecutionException, InterruptedException {
long leaseID = leaseClient.grant(2).get().getID();
kvClient.put(KEY, VALUE, PutOption.newBuilder().withLeaseId(leaseID).build()).get();
kvClient.put(KEY, VALUE, PutOption.builder().withLeaseId(leaseID).build()).get();
assertThat(kvClient.get(KEY).get().getCount()).isEqualTo(1);
LeaseKeepAliveResponse rp = leaseClient.keepAliveOnce(leaseID).get();
assertThat(rp.getTTL()).isGreaterThan(0);
}
@Test
public void testKeepAlive() throws ExecutionException, InterruptedException {
public void testKeepAliveOnceAverage() throws ExecutionException, InterruptedException {
long leaseID = leaseClient.grant(2).get().getID();
kvClient.put(KEY, VALUE, PutOption.newBuilder().withLeaseId(leaseID).build()).get();
assertThat(kvClient.get(KEY).get().getCount()).isEqualTo(1);
long sum = 0L;
long iter = 10;
CountDownLatch latch = new CountDownLatch(1);
AtomicReference<LeaseKeepAliveResponse> responseRef = new AtomicReference<>();
StreamObserver<LeaseKeepAliveResponse> observer = Observers.observer(response -> {
responseRef.set(response);
latch.countDown();
});
try (CloseableClient c = leaseClient.keepAlive(leaseID, observer)) {
latch.await(5, TimeUnit.SECONDS);
LeaseKeepAliveResponse response = responseRef.get();
assertThat(response.getTTL()).isGreaterThan(0);
for (int i = 0; i < iter; i++) {
long startTime = System.currentTimeMillis();
client.getLeaseClient().keepAliveOnce(leaseID).get();
long endTime = System.currentTimeMillis();
sum += endTime - startTime;
}
Thread.sleep(3000);
assertThat(kvClient.get(KEY).get().getCount()).isEqualTo(0);
assertThat(sum / iter).isLessThan(100);
}
@Test
public void testKeepAlive() throws ExecutionException, InterruptedException {
long leaseID = leaseClient.grant(2).get().getID();
kvClient.put(KEY, VALUE, PutOption.builder().withLeaseId(leaseID).build()).get();
assertThat(kvClient.get(KEY).get().getCount()).isEqualTo(1);
AtomicReference<LeaseKeepAliveResponse> responseRef = new AtomicReference<>();
try (CloseableClient c = leaseClient.keepAlive(leaseID, Observers.observer(responseRef::set))) {
await().pollInterval(250, TimeUnit.MILLISECONDS).untilAsserted(() -> {
LeaseKeepAliveResponse response = responseRef.get();
assertThat(response).isNotNull();
assertThat(response.getTTL()).isGreaterThan(0);
});
}
await().pollInterval(250, TimeUnit.MILLISECONDS).untilAsserted(() -> {
assertThat(kvClient.get(KEY).get().getCount()).isEqualTo(0);
});
}
@Test
public void testKeepAliveClose() throws ExecutionException, InterruptedException {
try (Client c = TestUtil.client(cluster).build()) {
Lease lc = c.getLeaseClient();
AtomicReference<LeaseKeepAliveResponse> resp = new AtomicReference<>();
AtomicReference<Throwable> error = new AtomicReference<>();
StreamObserver<LeaseKeepAliveResponse> observer = Observers.<LeaseKeepAliveResponse> builder()
.onNext(resp::set)
.onError(error::set)
.build();
long leaseID = lc.grant(5, 10, TimeUnit.SECONDS).get().getID();
kvClient.put(KEY, VALUE, PutOption.builder().withLeaseId(leaseID).build()).get();
assertThat(kvClient.get(KEY).get().getCount()).isEqualTo(1);
try (CloseableClient lcc = lc.keepAlive(leaseID, observer)) {
await().pollInterval(250, TimeUnit.MILLISECONDS).untilAsserted(() -> {
LeaseKeepAliveResponse response = resp.get();
assertThat(response).isNotNull();
assertThat(response.getTTL()).isGreaterThan(0);
});
assertThatNoException()
.isThrownBy(c::close);
await().pollInterval(250, TimeUnit.MILLISECONDS).untilAsserted(() -> {
Throwable response = error.get();
assertThat(response).isNotNull();
});
}
}
}
@Test
@ -149,7 +209,7 @@ public class LeaseTest {
long ttl = 5;
long leaseID = leaseClient.grant(ttl).get().getID();
LeaseTimeToLiveResponse resp = leaseClient.timeToLive(leaseID, LeaseOption.DEFAULT).get();
assertThat(resp.getTTl()).isGreaterThan(0);
assertThat(resp.getTTL()).isGreaterThan(0);
assertThat(resp.getGrantedTTL()).isEqualTo(ttl);
}
@ -157,12 +217,12 @@ public class LeaseTest {
public void testTimeToLiveWithKeys() throws ExecutionException, InterruptedException {
long ttl = 5;
long leaseID = leaseClient.grant(ttl).get().getID();
PutOption putOption = PutOption.newBuilder().withLeaseId(leaseID).build();
PutOption putOption = PutOption.builder().withLeaseId(leaseID).build();
kvClient.put(KEY_2, VALUE, putOption).get();
LeaseOption leaseOption = LeaseOption.newBuilder().withAttachedKeys().build();
LeaseOption leaseOption = LeaseOption.builder().withAttachedKeys().build();
LeaseTimeToLiveResponse resp = leaseClient.timeToLive(leaseID, leaseOption).get();
assertThat(resp.getTTl()).isGreaterThan(0);
assertThat(resp.getTTL()).isGreaterThan(0);
assertThat(resp.getGrantedTTL()).isEqualTo(ttl);
assertThat(resp.getKeys().size()).isEqualTo(1);
assertThat(resp.getKeys().get(0)).isEqualTo(KEY_2);

View File

@ -48,6 +48,7 @@ import io.grpc.stub.StreamObserver;
import static io.etcd.jetcd.common.exception.EtcdExceptionFactory.toEtcdException;
import static org.assertj.core.api.Assertions.assertThat;
import static org.assertj.core.api.Assertions.assertThatThrownBy;
import static org.awaitility.Awaitility.await;
import static org.mockito.ArgumentMatchers.argThat;
import static org.mockito.Mockito.after;
import static org.mockito.Mockito.timeout;
@ -57,6 +58,7 @@ import static org.mockito.Mockito.verify;
@Timeout(value = 1, unit = TimeUnit.MINUTES)
@ExtendWith(MockitoExtension.class)
public class LeaseUnitTest {
private static final long TIME_OUT_SECONDS = 30;
private Lease leaseCli;
private AtomicReference<StreamObserver<LeaseKeepAliveResponse>> responseObserverRef;
@ -230,8 +232,10 @@ public class LeaseUnitTest {
@Test
public void testKeepAliveResetOnStreamErrors() {
final StreamObserver<io.etcd.jetcd.lease.LeaseKeepAliveResponse> observer = Observers.observer(response -> {
});
final AtomicReference<Throwable> errorRecorder = new AtomicReference<>();
final StreamObserver<io.etcd.jetcd.lease.LeaseKeepAliveResponse> observer = Observers.<io.etcd.jetcd.lease.LeaseKeepAliveResponse> builder()
.onError(errorRecorder::set)
.build();
try (CloseableClient client = this.leaseCli.keepAlive(LEASE_ID_1, observer)) {
Throwable t = Status.ABORTED.asRuntimeException();
@ -241,6 +245,7 @@ public class LeaseUnitTest {
// expect keep alive requests are still sending even with reset.
verify(this.requestStreamObserverMock, timeout(2000).atLeast(3)).onNext(argThat(hasLeaseID(LEASE_ID_1)));
await().atMost(TIME_OUT_SECONDS, TimeUnit.SECONDS).untilAsserted(() -> assertThat(errorRecorder.get()).isNotNull());
}
}

View File

@ -16,6 +16,7 @@
package io.etcd.jetcd.impl;
import java.nio.charset.StandardCharsets;
import java.util.HashSet;
import java.util.Set;
import java.util.concurrent.CompletableFuture;
@ -41,8 +42,6 @@ import io.etcd.jetcd.lease.LeaseGrantResponse;
import io.etcd.jetcd.lock.LockResponse;
import io.etcd.jetcd.test.EtcdClusterExtension;
import com.google.common.base.Charsets;
import static org.assertj.core.api.Assertions.assertThat;
import static org.junit.jupiter.api.Assertions.assertThrows;
@ -57,9 +56,9 @@ public class LockTest {
private static Lease leaseClient;
private Set<ByteSequence> locksToRelease;
private static final ByteSequence SAMPLE_NAME = ByteSequence.from("sample_name", Charsets.UTF_8);
private static final ByteSequence namespace = ByteSequence.from("test-ns/", Charsets.UTF_8);
private static final ByteSequence namespace2 = ByteSequence.from("test-ns2/", Charsets.UTF_8);
private static final ByteSequence SAMPLE_NAME = ByteSequence.from("sample_name", StandardCharsets.UTF_8);
private static final ByteSequence namespace = ByteSequence.from("test-ns/", StandardCharsets.UTF_8);
private static final ByteSequence namespace2 = ByteSequence.from("test-ns2/", StandardCharsets.UTF_8);
@BeforeAll
public static void setUp() {

View File

@ -27,6 +27,7 @@ import java.util.concurrent.CountDownLatch;
import java.util.concurrent.ExecutionException;
import java.util.concurrent.TimeUnit;
import java.util.concurrent.atomic.AtomicLong;
import java.util.stream.Collectors;
import org.apache.commons.io.output.NullOutputStream;
import org.junit.jupiter.api.BeforeEach;
@ -55,14 +56,14 @@ public class MaintenanceTest {
private static Client client;
private static Maintenance maintenance;
private static List<URI> endpoints;
private static List<String> endpoints;
@TempDir
static Path tempDir;
@BeforeEach
public void setUp() {
endpoints = cluster.clientEndpoints();
endpoints = cluster.clientEndpoints().stream().map(URI::toString).collect(Collectors.toList());
client = TestUtil.client(cluster).build();
maintenance = client.getMaintenanceClient();
}
@ -92,7 +93,7 @@ public class MaintenanceTest {
@Test
public void testSnapshotChunks() throws ExecutionException, InterruptedException {
final Long bytes = maintenance.snapshot(NullOutputStream.NULL_OUTPUT_STREAM).get();
final Long bytes = maintenance.snapshot(NullOutputStream.INSTANCE).get();
final AtomicLong count = new AtomicLong();
final CountDownLatch latcht = new CountDownLatch(1);
@ -135,11 +136,11 @@ public class MaintenanceTest {
maintenance.defragmentMember(endpoints.get(0)).get();
}
//@Test
@Test
public void testMoveLeader() throws ExecutionException, InterruptedException {
URI leaderEndpoint = null;
String leaderEndpoint = null;
List<Long> followers = new ArrayList<>();
for (URI ep : endpoints) {
for (String ep : endpoints) {
StatusResponse statusResponse = maintenance.statusMember(ep).get();
long memberId = statusResponse.getHeader().getMemberId();
if (memberId == statusResponse.getLeader()) {

View File

@ -104,7 +104,7 @@ public class MaintenanceUnitTest {
}
});
assertThatThrownBy(() -> maintenance.snapshot(NullOutputStream.NULL_OUTPUT_STREAM).get())
assertThatThrownBy(() -> maintenance.snapshot(NullOutputStream.INSTANCE).get())
.isInstanceOf(ExecutionException.class).hasCauseInstanceOf(EtcdException.class);
}

View File

@ -0,0 +1,47 @@
package io.etcd.jetcd.impl;
import java.time.Duration;
import java.util.concurrent.CompletableFuture;
import java.util.concurrent.TimeUnit;
import java.util.concurrent.atomic.AtomicReference;
import org.junit.jupiter.api.Test;
import org.junit.jupiter.api.Timeout;
import io.etcd.jetcd.Client;
import io.etcd.jetcd.ClientBuilder;
import io.grpc.StatusRuntimeException;
import static io.etcd.jetcd.impl.TestUtil.bytesOf;
import static org.assertj.core.api.Assertions.assertThat;
import static org.awaitility.Awaitility.await;
@Timeout(value = 30, unit = TimeUnit.SECONDS)
public class RetryTest {
@Test
public void testReconnect() throws Exception {
ClientBuilder builder = Client.builder()
.endpoints("http://127.0.0.1:9999")
.connectTimeout(Duration.ofMillis(250))
.waitForReady(false)
.retryMaxAttempts(5)
.retryDelay(250);
AtomicReference<Throwable> error = new AtomicReference<>();
try (Client client = builder.build()) {
CompletableFuture<?> unused = client.getKVClient().put(bytesOf("sample_key"), bytesOf("sample_value")).whenComplete(
(r, t) -> {
if (t != null) {
error.set(t);
}
});
await().untilAsserted(() -> {
assertThat(error.get()).isNotNull();
assertThat(error.get()).hasCauseInstanceOf(StatusRuntimeException.class);
assertThat(error.get().getCause()).hasMessage("UNAVAILABLE: io exception");
});
}
}
}

View File

@ -19,26 +19,25 @@ package io.etcd.jetcd.impl;
import java.io.Closeable;
import java.io.IOException;
import java.net.ServerSocket;
import java.nio.charset.StandardCharsets;
import io.etcd.jetcd.ByteSequence;
import io.etcd.jetcd.Client;
import io.etcd.jetcd.ClientBuilder;
import io.etcd.jetcd.launcher.EtcdCluster;
import io.etcd.jetcd.test.EtcdClusterExtension;
import io.etcd.jetcd.watch.WatchResponse;
import com.google.common.base.Charsets;
import com.google.protobuf.ByteString;
import static java.nio.charset.StandardCharsets.UTF_8;
public class TestUtil {
public static ByteSequence bytesOf(final String string) {
return ByteSequence.from(string, UTF_8);
return ByteSequence.from(string, StandardCharsets.UTF_8);
}
public static ByteString byteStringOf(final String string) {
return ByteString.copyFrom(string.getBytes(UTF_8));
return ByteString.copyFrom(string.getBytes(StandardCharsets.UTF_8));
}
public static String randomString() {
@ -46,7 +45,7 @@ public class TestUtil {
}
public static ByteSequence randomByteSequence() {
return ByteSequence.from(randomString(), Charsets.UTF_8);
return ByteSequence.from(randomString(), StandardCharsets.UTF_8);
}
public static int findNextAvailablePort() throws IOException {
@ -89,4 +88,8 @@ public class TestUtil {
public static ClientBuilder client(EtcdClusterExtension extension) {
return Client.builder().target("cluster://" + extension.clusterName());
}
public static ClientBuilder client(EtcdCluster cluster) {
return Client.builder().target("cluster://" + cluster.clusterName());
}
}

View File

@ -39,16 +39,18 @@ class UtilTest {
}
@Test
public void testAuthErrorIsNotRetryable() {
public void testAuthErrorIsRetryable() {
Status authErrorStatus = Status.UNAUTHENTICATED
.withDescription("etcdserver: invalid auth token");
Status status = Status.fromThrowable(new StatusException(authErrorStatus));
assertThat(Errors.isRetryable(status)).isTrue();
assertThat(Errors.isRetryableForNoSafeRedoOp(status)).isTrue();
assertThat(Errors.isRetryableForSafeRedoOp(status)).isTrue();
}
@Test
public void testUnavailableErrorIsRetryable() {
Status status = Status.fromThrowable(new StatusException(Status.UNAVAILABLE));
assertThat(Errors.isRetryable(status)).isTrue();
assertThat(Errors.isRetryableForNoSafeRedoOp(status)).isFalse();
assertThat(Errors.isRetryableForSafeRedoOp(status)).isTrue();
}
}

View File

@ -19,9 +19,10 @@ package io.etcd.jetcd.impl;
import java.util.concurrent.TimeUnit;
import java.util.concurrent.atomic.AtomicReference;
import org.junit.jupiter.api.Test;
import org.junit.jupiter.api.Timeout;
import org.junit.jupiter.api.extension.RegisterExtension;
import org.junit.jupiter.params.ParameterizedTest;
import org.junit.jupiter.params.provider.ValueSource;
import io.etcd.jetcd.ByteSequence;
import io.etcd.jetcd.Client;
@ -35,7 +36,7 @@ import io.etcd.jetcd.watch.WatchResponse;
import static org.assertj.core.api.Assertions.assertThat;
import static org.awaitility.Awaitility.await;
@Timeout(value = 30, unit = TimeUnit.SECONDS)
@Timeout(value = 180, unit = TimeUnit.SECONDS)
public class WatchResumeTest {
@RegisterExtension
@ -43,8 +44,9 @@ public class WatchResumeTest {
.withNodes(3)
.build();
@Test
public void testWatchOnPut() throws Exception {
@ParameterizedTest
@ValueSource(ints = { 0, 10, 30, 50, 60 })
public void testWatchOnPut(int delaySec) throws Exception {
try (Client client = TestUtil.client(cluster).build()) {
Watch watchClient = client.getWatchClient();
KV kvClient = client.getKVClient();
@ -54,9 +56,9 @@ public class WatchResumeTest {
final AtomicReference<WatchResponse> ref = new AtomicReference<>();
try (Watcher watcher = watchClient.watch(key, ref::set)) {
cluster.restart();
cluster.restart(delaySec, TimeUnit.SECONDS);
kvClient.put(key, value).get(1, TimeUnit.SECONDS);
kvClient.put(key, value).get();
await().atMost(30, TimeUnit.SECONDS).untilAsserted(() -> assertThat(ref.get()).isNotNull());

View File

@ -21,6 +21,7 @@ import java.util.Arrays;
import java.util.Collections;
import java.util.List;
import java.util.concurrent.CountDownLatch;
import java.util.concurrent.Future;
import java.util.concurrent.TimeUnit;
import java.util.concurrent.atomic.AtomicReference;
import java.util.function.Consumer;
@ -164,7 +165,7 @@ public class WatchTest {
final AtomicReference<Throwable> ref = new AtomicReference<>();
// Try to listen from previous revision on
final WatchOption options = WatchOption.newBuilder().withRevision(getCompactedRevision(client, key)).build();
final WatchOption options = WatchOption.builder().withRevision(getCompactedRevision(client, key)).build();
final Watch wc = client.getWatchClient();
try (Watcher watcher = wc.watch(key, options, Watch.listener(TestUtil::noOpWatchResponseConsumer, ref::set))) {
@ -257,11 +258,11 @@ public class WatchTest {
PutResponse putResponse = client.getKVClient().put(key, value).get();
long lastSeenRevision = putResponse.getHeader().getRevision();
WatchOption watchOption = WatchOption.newBuilder().withRevision(lastSeenRevision + 1).build();
WatchOption watchOption = WatchOption.builder().withRevision(lastSeenRevision + 1).build();
try (Watcher watcher = client.getWatchClient().watch(key, watchOption, events::add)) {
cluster.restart(); // resumes (recreates) the watch
cluster.restart(0, TimeUnit.MILLISECONDS); // resumes (recreates) the watch
Thread.sleep(2000); // await().duration() would be better but it's broken
assertThat(events.isEmpty()).as("verify that received events list is empty").isTrue();
@ -280,7 +281,7 @@ public class WatchTest {
if (event.getEventType() == EventType.PUT) {
ByteSequence key1 = event.getKeyValue().getKey();
client.getKVClient().get(key1).whenComplete((r, t) -> {
Future<?> unused = client.getKVClient().get(key1).whenComplete((r, t) -> {
if (!r.getKvs().isEmpty()) {
ref.set(r.getKvs().get(0));
}
@ -319,7 +320,7 @@ public class WatchTest {
final Watch wc = client.getWatchClient();
long revision = getCompactedRevision(client, key);
final WatchOption options = WatchOption.newBuilder().withRevision(revision).build();
final WatchOption options = WatchOption.builder().withRevision(revision).build();
final AtomicReference<Throwable> ref = new AtomicReference<>();
final AtomicReference<Boolean> completed = new AtomicReference<>();
@ -335,4 +336,19 @@ public class WatchTest {
assertThat(completed.get()).isEqualTo(Boolean.TRUE);
}
}
@ParameterizedTest
@MethodSource("parameters")
public void testWatchWithCreatedNotify(final Client client) throws Exception {
final ByteSequence key = randomByteSequence();
final WatchOption options = WatchOption.builder().withCreateNotify(true).build();
final AtomicReference<WatchResponse> ref = new AtomicReference<>();
try (Watcher watcher = client.getWatchClient().watch(key, options, ref::set)) {
await().atMost(TIME_OUT_SECONDS, TimeUnit.SECONDS).untilAsserted(() -> assertThat(ref.get()).isNotNull());
assertThat(ref.get().getEvents().size()).isEqualTo(0);
assertThat(ref.get().isCreatedNotify()).isEqualTo(Boolean.TRUE);
}
}
}

View File

@ -18,7 +18,6 @@ package io.etcd.jetcd.impl;
import java.io.File;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;
import java.util.Objects;
import java.util.concurrent.ExecutorService;
@ -30,12 +29,14 @@ import java.util.concurrent.atomic.AtomicInteger;
import org.junit.jupiter.api.Test;
import org.junit.jupiter.api.Timeout;
import org.junit.jupiter.api.extension.RegisterExtension;
import org.slf4j.LoggerFactory;
import io.etcd.jetcd.ByteSequence;
import io.etcd.jetcd.Client;
import io.etcd.jetcd.KV;
import io.etcd.jetcd.Watch;
import io.etcd.jetcd.auth.Permission;
import io.etcd.jetcd.options.WatchOption;
import io.etcd.jetcd.test.EtcdClusterExtension;
import static org.assertj.core.api.Assertions.assertThat;
@ -52,11 +53,13 @@ public class WatchTokenExpireTest {
.withNodes(1)
.withSsl(true)
.withAdditionalArgs(
Arrays.asList("--auth-token",
List.of(
"--auth-token",
"jwt,pub-key=/etc/ssl/etcd/server.pem,priv-key=/etc/ssl/etcd/server-key.pem,sign-method=RS256,ttl=1s"))
.build();
private static final ByteSequence key = TestUtil.randomByteSequence();
private static final ByteSequence key = TestUtil.bytesOf("key");
private static final ByteSequence keyEnd = TestUtil.bytesOf("key1");
private static final ByteSequence user = TestUtil.bytesOf("root");
private static final ByteSequence password = TestUtil.randomByteSequence();
@ -73,7 +76,7 @@ public class WatchTokenExpireTest {
client.getAuthClient().roleAdd(role).get();
client.getAuthClient().userAdd(user, password).get();
// grant access only to given key
client.getAuthClient().roleGrantPermission(role, key, key, Permission.Type.READWRITE).get();
client.getAuthClient().roleGrantPermission(role, key, keyEnd, Permission.Type.READWRITE).get();
client.getAuthClient().userGrantRole(user, role).get();
client.getAuthClient().authEnable().get();
@ -87,7 +90,8 @@ public class WatchTokenExpireTest {
.user(user)
.password(password)
.authority("etcd0")
.sslContext(b -> b.trustManager(caFile)).build();
.sslContext(b -> b.trustManager(caFile))
.build();
}
@Test
@ -105,9 +109,15 @@ public class WatchTokenExpireTest {
// watch should handle token refresh automatically
// token is already expired when we attempt to create a watch
Watch.Watcher watcher = authWatchClient.watch(key, response -> {
modifications.incrementAndGet();
});
Watch.Watcher watcher = authWatchClient.watch(
key,
WatchOption.builder().withRange(keyEnd).build(),
response -> {
modifications.incrementAndGet();
},
error -> {
LoggerFactory.getLogger(getClass()).info(">>> {}", error.toString());
});
// create single thread pool, so that tasks are executed one after another
ExecutorService executor = Executors.newFixedThreadPool(1);

View File

@ -427,8 +427,7 @@ public class WatchUnitTest {
assertThat(ref.get()).isNotNull();
assertThat(ref.get()).isInstanceOf(EtcdException.class)
.hasMessageContaining(Errors.NO_LEADER_ERROR_MESSAGE);
final WatchImpl.WatcherImpl wimpl = (WatchImpl.WatcherImpl) watcher;
assertThat(wimpl.isClosed()).isTrue();
assertThat(watcher.isClosed()).isTrue();
}
}
}

View File

@ -0,0 +1,97 @@
package io.etcd.jetcd.impl.auth;
import java.io.File;
import java.util.List;
import java.util.Objects;
import java.util.concurrent.TimeUnit;
import org.junit.jupiter.api.Assertions;
import org.junit.jupiter.api.Test;
import org.junit.jupiter.api.Timeout;
import org.junit.jupiter.api.extension.RegisterExtension;
import io.etcd.jetcd.ByteSequence;
import io.etcd.jetcd.Client;
import io.etcd.jetcd.KV;
import io.etcd.jetcd.auth.Permission;
import io.etcd.jetcd.impl.TestUtil;
import io.etcd.jetcd.kv.GetResponse;
import io.etcd.jetcd.test.EtcdClusterExtension;
@Timeout(value = 30)
public class AuthTokenRefreshTest {
@RegisterExtension
public static final EtcdClusterExtension cluster = EtcdClusterExtension.builder()
.withNodes(1)
.withSsl(true)
.withAdditionalArgs(
List.of(
"--auth-token",
"jwt,pub-key=/etc/ssl/etcd/server.pem,priv-key=/etc/ssl/etcd/server-key.pem,sign-method=RS256,ttl=300s"))
.build();
private static final ByteSequence key = TestUtil.bytesOf("key");
private static final ByteSequence keyEnd = TestUtil.bytesOf("key1");
private static final ByteSequence user = TestUtil.bytesOf("root");
private static final ByteSequence password = TestUtil.randomByteSequence();
@Test
public void testTokenIsRefreshedWhenRevisionsIsOld() throws Exception {
setUpEnvironment();
Client authClient = createAuthClient();
KV kvClient = authClient.getKVClient();
ByteSequence value = TestUtil.randomByteSequence();
kvClient.put(key, value).get(1, TimeUnit.SECONDS);
//read the created key to generate a new jwt token
GetResponse getResponse = kvClient.get(key).get(1, TimeUnit.SECONDS);
Assertions.assertEquals(1, getResponse.getKvs().size());
Assertions.assertEquals(key, getResponse.getKvs().get(0).getKey());
Assertions.assertEquals(value, getResponse.getKvs().get(0).getValue());
//update auth database revision by adding a new role thus invalidating existing token of the kv client
authClient.getAuthClient().roleAdd(TestUtil.bytesOf("newRole")).get(1, TimeUnit.SECONDS);
//kv client should automatically refresh the old token and read the key
getResponse = kvClient.get(key).get(1, TimeUnit.SECONDS);
Assertions.assertEquals(1, getResponse.getKvs().size());
Assertions.assertEquals(key, getResponse.getKvs().get(0).getKey());
Assertions.assertEquals(value, getResponse.getKvs().get(0).getValue());
}
private void setUpEnvironment() throws Exception {
final File caFile = new File(Objects.requireNonNull(getClass().getResource("/ssl/cert/ca.pem")).toURI());
Client client = TestUtil.client(cluster)
.authority("etcd0")
.sslContext(b -> b.trustManager(caFile))
.build();
// enable authentication to enforce usage of access token
ByteSequence role = TestUtil.bytesOf("root");
client.getAuthClient().roleAdd(role).get();
client.getAuthClient().userAdd(user, password).get();
// grant access only to given key
client.getAuthClient().roleGrantPermission(role, key, keyEnd, Permission.Type.READWRITE).get();
client.getAuthClient().userGrantRole(user, role).get();
client.getAuthClient().authEnable().get();
client.close();
}
private Client createAuthClient() throws Exception {
final File caFile = new File(Objects.requireNonNull(getClass().getResource("/ssl/cert/ca.pem")).toURI());
return TestUtil.client(cluster)
.user(user)
.password(password)
.authority("etcd0")
.sslContext(b -> b.trustManager(caFile))
.build();
}
}

View File

@ -28,16 +28,12 @@
<!-- package loggers -->
<Logger name="org.testcontainers" level="INFO"/>
<Logger name="com.github.dockerjava" level="INFO"/>
<Logger name="🐳 [gcr.io/etcd-development/etcd:v3.3]" level="WARN"/>
<Logger name="🐳 [gcr.io/etcd-development/etcd:v3.4]" level="WARN"/>
<Logger name="🐳 [gcr.io/etcd-development/etcd:v3.4.7]" level="WARN"/>
<Logger name="io.etcd.jetcd.internal.infrastructure" level="INFO"/>
<Logger name="io.etcd.jetcd.launcher.EtcdCluster" level="INFO"/>
<Logger name="io.etcd.jetcd.launcher.EtcdContainer" level="INFO"/>
<Logger name="io.etcd" level="INFO"/>
<!-- main logger -->
<Root level="DEBUG">
<Root level="INFO">
<AppenderRef ref="STDOUT" />
</Root>
</Loggers>

View File

@ -1 +1 @@
cfssl/
cfssl/

Some files were not shown because too many files have changed in this diff Show More