-
Notifications
You must be signed in to change notification settings - Fork 105
GCI604 [Team ELAN][2025] - Changelog add rule #397
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
|
Hi @zizou-ben , thank you for this interesting rule. Do not forget to update CHANGELOG.md and RULES.md files ! |
|
Hello, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR introduces a new rule (GCI604) to enforce a maximum retry timeout for Spring Retry and updates the changelog accordingly.
- Added Asciidoc documentation detailing the rule’s rationale, examples, and threshold
- Added JSON metadata for the new rule
- Updated CHANGELOG with an Unreleased entry for GCI604
Reviewed Changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| src/main/rules/GCI604/java/GCI604.asciidoc | Documentation for GCI604 explaining inconsistent retry configuration |
| src/main/rules/GCI604/GCI604.json | JSON metadata for rule GCI604 |
| CHANGELOG.md | Added Unreleased changelog entry for rule GCI604 |
Comments suppressed due to low confidence (4)
src/main/rules/GCI604/java/GCI604.asciidoc:1
- The first line duplicates the document title; consider removing it or converting it into a proper Asciidoc heading (e.g., prefixing with
=) to avoid redundancy.
Spring Retry: Inconsistent configuration
src/main/rules/GCI604/GCI604.json:2
- The JSON title is too generic and doesn't match the Asciidoc title; consider updating it to 'Inconsistent Spring Retry Configuration' or another descriptive name.
"title": "limit retry",
src/main/rules/GCI604/GCI604.json:1
- The rule metadata lacks a configurable parameter for
max.timeout; add apropertiessection defining this parameter with a default value and description.
{
CHANGELOG.md:11
- There's a duplicated
## [Unreleased]header in the changelog; remove the redundant section to keep a single Unreleased block.
## [Unreleased]
| "sobriety", | ||
| "environment", | ||
| "creedengo", | ||
| "spring-boot", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
not only for spring-boot but also for "spring"
| Spring Retry: Inconsistent configuration | ||
| = Inconsistent Spring Retry Configuration | ||
|
|
||
| An inconsistent configuration of Spring Retry can lead to blocking threads and increased energy usage. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
could you please add some references like :
- https://medium.com/@adriancanton/spring-retry-implementing-retries-in-your-spring-boot-applications-43dd4c52f93f
- https://dzone.com/articles/implementing-exponential-backoff-with-spring-retry
if we respect our process for a new rule ... we have to give evidence to prove that its a good idea like :
- web documentation
- performance tests (on web documentation or local benchmark)
- link on the rule idea inside green-code-initiative : I think this is this one, isn't it ? [WEB][42108] Spring Retry: Inconsistent configuration creedengo-challenge#78
|
|
||
| [source,java] | ||
| ---- | ||
| @Retryable(maxAttempts = 5, backoff = @Backoff(delay = 10)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
maybe give some other compliant examples with acceptable "multiplier" or the "maxDelay" given to limit the maximum timeout
because we can have a relevant use case that the multiplier is relevant (for example, call an external URL to limit de spend of too much call tokens) ... but I agree, we have to control it not to consume a lot of resources.
| @@ -0,0 +1,17 @@ | |||
| { | |||
| "title": "limit retry", | |||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
please change the title to something more explicit
| This rule applies to usages of `@Retryable` only. | ||
| A threshold `max.timeout` defines the maximum acceptable blocking time (in milliseconds). | ||
|
|
||
| `max.timeout=50000` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
what is the good value for max timeout ? maybe also describe de "maxDelay" parameter
|
Hi @zizou-ben, after checking some web documentation, this rule is a good idea but there is a lack on some subjects like explained here https://www.baeldung.com/spring-retry
|
|
This PR has been automatically marked as stale because it has no activity for 60 days. |
No description provided.