Commit Graph

453 Commits

Author SHA1 Message Date
Spring Builds
db47bc66fd Next development version (v2.0.9-SNAPSHOT) 2024-08-16 13:22:40 -04:00
Artem Bilan
81a2cdd434 Downgrade to Micrometer 1.10.13
This is for compatibility with the Spring Framework `6.0.x` version we rely on so far
2024-08-16 12:09:02 -04:00
Stéphane Nicoll
8b8c3887ce Upgrade to Spring Framework 6.0.23
Closes gh-462
2024-08-16 15:25:14 +02:00
Artem Bilan
9d8df3b4d0 GH-458: Introduce MetricsRetryListener
Fixes: #458

* Fix code formatting violations

* * Make `retryContextToSample` as an `IdentityHashMap` and use `RetryContext` as a key
* Change `setCustomTags()` to the `@Nullable Iterable<Tag>` argument
* Use `exception = none` tag for successful executions to avoid time-series conflicts
2024-08-13 12:34:43 -04:00
Vicente Soriano
8e5cafe200 GH-460: Fix required Java version in README
Fixes: #460
2024-08-13 12:06:10 -04:00
Marcin Zajączkowski
9df8d6cc90 Add @Nullable in RetryContext to easier detect possible NPE
* Add @Nullable in RetryContext to easier detect possible NPE

Both getParent() and getLastThrowable() might return null, as mentioned
in javadoc. @Nullable helps an IDE warns developers about potential NPE.

* Rephrase Javadoc for RetryContext.getLastThrowable()

* Review fixes
2024-07-25 17:28:04 -04:00
Artem Bilan
a9b329af55 GH-456: Fix EnableRetryWithBackoffTests.randomExponential() for random
Fixes: #456

The random logic in the `ExponentialRandomBackOffPolicy` may end up with close to the `1`.
And after casting to `long` we got the same `1000`

* Fix test respectively to include that possibility.
2024-07-18 10:57:09 -04:00
Stéphane Nicoll
04f12a7d96 Remove concourse configuration 2024-07-14 10:48:23 +02:00
Stéphane Nicoll
ab1190dbf7 Fix CI badge in README to use GHA 2024-07-14 10:48:06 +02:00
Stéphane Nicoll
caa0d72d16 Fix formatting of Maven Central check url
Closes gh-455
2024-07-13 11:19:06 +02:00
Stéphane Nicoll
d09e100869 Next development version (v2.0.8-SNAPSHOT) 2024-07-13 11:14:43 +02:00
Stéphane Nicoll
98d5e6a633 Upgrade to Maven 3.9.8
Closes gh-454
2024-07-13 10:28:19 +02:00
Stéphane Nicoll
ef14f9342d Upgrade to Maven Surefire Plugin 3.3.0
Closes gh-453
2024-07-13 10:26:11 +02:00
Stéphane Nicoll
1efd8c4017 Upgrade to Maven Javadoc Plugin 3.7.0
Closes gh-452
2024-07-13 10:25:23 +02:00
Stéphane Nicoll
ae71211dbc Upgrade to AssertJ 3.26.2
Closes gh-451
2024-07-13 10:24:10 +02:00
Stéphane Nicoll
7f84572438 Upgrade to JUnit 5.10.3
Closes gh-450
2024-07-13 10:22:36 +02:00
Stéphane Nicoll
11cad72e44 Upgrade to Spring Framework 6.0.22
Closes gh-449
2024-07-13 10:21:23 +02:00
Stéphane Nicoll
ee44dcec66 Release from GitHub Actions
To harmonize the release process, this commit moves it to GHA.

Closes gh-448
2024-07-13 10:19:26 +02:00
Stéphane Nicoll
686dd9d11a Move CI to GitHub actions
This commit moves the regular build and snapshot deployment to GitHub
actions, based on a standard actions that are reusable.

Closes gh-447
2024-07-13 09:55:54 +02:00
Marcin Grzejszczak
0bcc787ad5 Remove repo.spring.io/release reference (#445) 2024-06-27 10:53:19 -04:00
Morulay Planinski
5b69d8059d GH-441: Introduce PredicateRetryPolicy
Fixes: #441

* Replace `Classifier` with more widely used `Predicate` in `RetryTemplateBuilder`
* Introduce `PredicateRetryPolicy` to avoid backward incompatible changes
2024-06-04 13:40:34 -04:00
Spring Builds
8339dfa472 Next development version (v2.0.7-SNAPSHOT) 2024-05-16 13:32:11 +00:00
Stéphane Nicoll
f2ec7212c5 Upgrade to Spring Framework 6.0.20
Closes gh-435
2024-05-16 15:22:40 +02:00
Stéphane Nicoll
22228f8c8e Polish 2024-05-15 18:41:48 +02:00
Stéphane Nicoll
f069b3966e Upgrade to Maven Surefire Plugin 3.2.5
Closes gh-439
2024-05-15 18:41:09 +02:00
Stéphane Nicoll
3bd7e17232 Upgrade to Maven Sources Plugin 3.3.1
Closes gh-438
2024-05-15 18:40:17 +02:00
Stéphane Nicoll
edd221cd7e Upgrade to Maven Compiler Plugin 3.13.0
Closes gh-437
2024-05-15 18:39:16 +02:00
Stéphane Nicoll
09f8c0a2ff Upgrade to spring javaformat 0.0.41
Closes gh-436
2024-05-15 18:38:15 +02:00
Stéphane Nicoll
7d9b887b3a Start building against Spring Framework 6.0.20 snapshots
See gh-435
2024-05-15 18:32:58 +02:00
Stéphane Nicoll
a5788841a9 Upgrade to Mockito 5.11.0
Closes gh-434
2024-05-15 18:31:32 +02:00
Stéphane Nicoll
c87be51012 Upgrade to Log4J 2.23.1
Closes gh-433
2024-05-15 18:30:45 +02:00
Stéphane Nicoll
3b559e8afe Upgrade to JUnit 5.10.2
Closes gh-432
2024-05-15 18:29:40 +02:00
Stéphane Nicoll
cd54196989 Upgrade to AssertJ 3.25.3
Closes gh-431
2024-05-15 18:28:42 +02:00
Stéphane Nicoll
3648a4eada Upgrade to AspectJ 1.9.22
Closes gh-430
2024-05-15 18:27:32 +02:00
Artem Bilan
f6977d77b9 GH-137: Improve RetryTemplate.setThrowLastExceptionOnExhausted() JavaDocs
Fixes: #137

* Fix couple code smells for arrays in the `RetryTemplate`
2024-05-13 15:50:24 -04:00
Artem Bilan
26697ea098 GH-418: Add spring-retry Maven coordinates into README
Fixes: #418
2024-05-10 15:45:53 -04:00
Artem Bilan
d3698b8cf4 GH-82: Expose @CircuitBreaker.throwLastExceptionOnExhausted()
Fixes: #82

There are some use-cases when `ExhaustedRetryException` does not fit into the logic around Circuit Breaker pattern.

The `RetryTemplate` has already a `throwLastExceptionOnExhausted` flag for stateful retries

* Expose `@CircuitBreaker.throwLastExceptionOnExhausted()` and propagate it down to the `RetryTemplate`
in the `AnnotationAwareRetryOperationsInterceptor`
2024-05-10 15:32:09 -04:00
Yaozeyu
1c539502b7 Fix potential NPE in the ExpressionRetryPolicy 2024-05-10 13:39:41 -04:00
aftab
f94bfff82e GH-427: Fix multiplierExpression & multiplierExpression
Fixes: #427

No randomness with configuration like:
```
@Retryable(retryFor = {RuntimeException.class}, maxAttemptsExpression = "${retry.max-attempts}", backoff = @Backoff(delayExpression = "${retry.delay}", multiplierExpression = "${retry.multiplier}", randomExpression = "${retry.random}"))
```

The random logic in the `AnnotationAwareRetryOperationsInterceptor` if  `multiplierExpression` is for runtime evaluation.

* Fix `AnnotationAwareRetryOperationsInterceptor` to check for `if (multiplier > 0 || parsedMultExp != null) {` before evaluating `random`
* Fix `@BackOff(randomExpression)` Javadoc to indicate that it is always evaluated on configuration phase.
2024-05-10 13:36:52 -04:00
Kamil Łopuszański
94424350e1 Update README for runtimeOnly
Fixes: #423 

* And also uses `retryFor` instead of deprecated `include` or `value`
2024-02-16 17:16:33 -05:00
Artem Bilan
e19f5d7d5f GH-422: Log label in RetryTemplate
Fixes: #422

* Push `MethodInvocationRetryCallback.getLabel()` to the `default` method in the `RetryCallback`
* Use `ClassUtils.getQualifiedMethodName(invocation.getMethod())` for default label in the `MethodInvocationRetryCallback`
if not provided from the outside
* Refactor some logic in the `RetryOperationsInterceptor` to cover `context.removeAttribute("__proxy__")`
for use-case when `recoverer` is not provided.
Remove extra label resolution since it is already done in the `MethodInvocationRetryCallback`
* Fix Javadoc typos in the affected classes
2024-01-11 14:52:53 -05:00
Spring Builds
6656151fa7 Next development version (v2.0.6-SNAPSHOT) 2023-12-15 06:31:20 +00:00
Artem Bilan
8b87e8a646 GH-212: Optimise SubclassClassifier.classify()
Fixes #212

The `classifiable` class checked twice: by itself
and then as a first iteration for the next loop for subclasses.

* Fix `SubclassClassifier.classify()` to start subclasses loop
from the `exceptionClass.getSuperclass()`
2023-12-14 17:52:25 -05:00
Stéphane Nicoll
561d41ae25 Upgrade CI to Java 17.0.9 2023-12-14 15:03:47 +01:00
Stéphane Nicoll
a3b7a8098e Remove outdated config now we have moved to Java 17 2023-12-14 11:12:09 +01:00
Stéphane Nicoll
83a2888c27 Upgrade to Maven Wrapper 3.9.6
Closes gh-415
2023-12-14 11:11:44 +01:00
Stéphane Nicoll
b7b88b07df Upgrade to Maven Surefire Plugin 3.2.2
Closes gh-414
2023-12-14 11:10:24 +01:00
Stéphane Nicoll
10cfe08671 Upgrade to Maven Javadoc Plugin 3.6.3
Closes gh-413
2023-12-14 11:09:22 +01:00
Stéphane Nicoll
b35b87f903 Upgrade to Spring Javaformat 0.0.40
Closes gh-412
2023-12-14 11:08:07 +01:00
Stéphane Nicoll
7742af88a2 Use Log4j BOM 2023-12-14 11:06:53 +01:00