Skip to content

Use computation to configure load balancing for consumeRun#143

Merged
klesaulnier merged 5 commits intomainfrom
consume-run-loadbalancing
Apr 3, 2026
Merged

Use computation to configure load balancing for consumeRun#143
klesaulnier merged 5 commits intomainfrom
consume-run-loadbalancing

Conversation

@klesaulnier
Copy link
Copy Markdown
Contributor

PR Summary

Signed-off-by: LE SAULNIER Kevin <kevin.lesaulnier.pro@gmail.com>
Copy link
Copy Markdown
Contributor

@antoinebhs antoinebhs left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code OK

@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented Mar 31, 2026

Warning

Rate limit exceeded

@klesaulnier has exceeded the limit for the number of commits that can be reviewed per hour. Please wait 3 minutes and 16 seconds before requesting another review.

Your organization is not enrolled in usage-based pricing. Contact your admin to enable usage-based pricing to continue reviews beyond the rate limit, or try again in 3 minutes and 16 seconds.

⌛ How to resolve this issue?

After the wait time has elapsed, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

We recommend that you space out your commits to avoid hitting the rate limit.

🚦 How do rate limits work?

CodeRabbit enforces hourly rate limits for each developer per organization.

Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout.

Please see our FAQ for further information.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 4780b5b6-7a81-4b39-baca-da02290323eb

📥 Commits

Reviewing files that changed from the base of the PR and between 8fe99c1 and 986fd09.

📒 Files selected for processing (1)
  • pom.xml
📝 Walkthrough

Walkthrough

The consumeRun Spring Cloud Function bean was split into two separate consumer bindings, consumeRun1 and consumeRun2, each delegating to the parent class implementation. Corresponding configuration updates reflect the new bindings with reusable YAML anchors for DRY principles.

Changes

Cohort / File(s) Summary
Spring Bean Method Reorganization
src/main/java/.../VoltageInitWorkerService.java
Removed single consumeRun() bean override and introduced two new beans consumeRun1() and consumeRun2() that both delegate to super.consumeRun(). The consumeCancel() bean remains unchanged.
Spring Cloud Stream Bindings Configuration
src/main/resources/config/application.yaml, src/test/resources/application-default.yml
Updated function definitions and bindings from consumeRun;consumeCancel to consumeRun1;consumeRun2;consumeCancel. Added YAML anchors for consumer and Rabbit configuration reuse across bindings. Removed explicit concurrency setting and added computation.rabbit.loadbalanced-group configuration.
🚥 Pre-merge checks | ✅ 1 | ❌ 2

❌ Failed checks (1 warning, 1 inconclusive)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
Description check ❓ Inconclusive The description is empty, providing no information about the changeset. Add a brief description explaining what changes were made and why, such as how the load balancing is configured or what problem it solves.
✅ Passed checks (1 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly describes the main change: configuring load balancing for consumeRun using computation, which aligns with the key addition of 'computation.rabbit.loadbalanced-group' configuration.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Signed-off-by: LE SAULNIER Kevin <kevin.lesaulnier.pro@gmail.com>
Copy link
Copy Markdown

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🧹 Nitpick comments (1)
src/test/resources/application-default.yml (1)

13-14: Add one integration path that exercises both run consumers.

Line 13-Line 14 intentionally disables consumeRun2, which keeps tests stable, but it also means the new dual-consumer wiring is never exercised in tests. Consider adding one dedicated integration scenario with consumeRun1;consumeRun2;consumeCancel to catch binding regressions early.

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@src/test/resources/application-default.yml` around lines 13 - 14, Add a
dedicated integration scenario in the test configuration so the dual-consumer
wiring is exercised: create an additional test profile or entry in
application-default.yml that sets the message binding "definition" to
"consumeRun1;consumeRun2;consumeCancel" (instead of the current single-line
disabling of consumeRun2) and ensure your integration test(s) pick up that
profile or config; update any test bootstrap or `@ActiveProfiles` usage to run
this scenario so binding regressions for consumeRun2 are caught.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Nitpick comments:
In `@src/test/resources/application-default.yml`:
- Around line 13-14: Add a dedicated integration scenario in the test
configuration so the dual-consumer wiring is exercised: create an additional
test profile or entry in application-default.yml that sets the message binding
"definition" to "consumeRun1;consumeRun2;consumeCancel" (instead of the current
single-line disabling of consumeRun2) and ensure your integration test(s) pick
up that profile or config; update any test bootstrap or `@ActiveProfiles` usage to
run this scenario so binding regressions for consumeRun2 are caught.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 83863a7f-7677-4480-b7aa-12e188330377

📥 Commits

Reviewing files that changed from the base of the PR and between 7d7d986 and 8fe99c1.

📒 Files selected for processing (3)
  • src/main/java/org/gridsuite/voltageinit/server/service/VoltageInitWorkerService.java
  • src/main/resources/config/application.yaml
  • src/test/resources/application-default.yml

klesaulnier and others added 2 commits April 3, 2026 09:51
Signed-off-by: LE SAULNIER Kevin <kevin.lesaulnier.pro@gmail.com>
@sonarqubecloud
Copy link
Copy Markdown

sonarqubecloud Bot commented Apr 3, 2026

@klesaulnier klesaulnier merged commit 2090990 into main Apr 3, 2026
4 checks passed
@klesaulnier klesaulnier deleted the consume-run-loadbalancing branch April 3, 2026 08:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants