Conversation
|
Warning Rate limit exceeded
⌛ How to resolve this issue?After the wait time has elapsed, a review can be triggered using the 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. 📝 WalkthroughWalkthroughAdjusts Maven annotation-processor configuration for MapStruct/Lombok across POMs, removes a resource-bundle reference from an error handler, and adds a JUnit test to verify report resource-bundle discovery and loading. Changes
Suggested reviewers
🚥 Pre-merge checks | ❌ 3❌ Failed checks (2 warnings, 1 inconclusive)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. 📝 Coding Plan
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. Comment |
There was a problem hiding this comment.
Actionable comments posted: 1
🧹 Nitpick comments (1)
monitor-worker-server/src/test/java/org/gridsuite/monitor/worker/server/report/MonitorWorkerServerReportResourceBundleTest.java (1)
30-35: Consider strengthening the assertion (optional).The current test verifies the bundle loads without exception, which is sufficient for discoverability. For additional confidence, you could capture the bundle and verify it's non-empty or contains an expected key.
💡 Optional: verify bundle has content
`@Test` void reportBundleIsFound() { - assertThatNoException().isThrownBy(() -> - ResourceBundle.getBundle(MonitorWorkerServerReportResourceBundle.BASE_NAME) - ); + ResourceBundle bundle = ResourceBundle.getBundle(MonitorWorkerServerReportResourceBundle.BASE_NAME); + assertThat(bundle.getKeys().hasMoreElements()) + .as("Resource bundle should contain at least one key") + .isTrue(); }🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@monitor-worker-server/src/test/java/org/gridsuite/monitor/worker/server/report/MonitorWorkerServerReportResourceBundleTest.java` around lines 30 - 35, Update the test reportBundleIsFound to not only assert no exception but also validate the bundle has content: call ResourceBundle.getBundle(MonitorWorkerServerReportResourceBundle.BASE_NAME) into a variable and assert the returned ResourceBundle is not null and contains expected content (e.g., check that keySet() is not empty or that a specific key exists). Modify the test method reportBundleIsFound to perform these additional assertions against the retrieved ResourceBundle to strengthen the verification.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In `@pom.xml`:
- Line 45: The pom.xml contains a misspelled Sonar property element
<sonar.projecttetedddKey> which Sonar ignores; replace that element name with
the correct <sonar.projectKey> so the project identifier becomes
org.gridsuite:monitor-core (leave the element value unchanged), ensuring the
Sonar scanner picks up the intended project key.
---
Nitpick comments:
In
`@monitor-worker-server/src/test/java/org/gridsuite/monitor/worker/server/report/MonitorWorkerServerReportResourceBundleTest.java`:
- Around line 30-35: Update the test reportBundleIsFound to not only assert no
exception but also validate the bundle has content: call
ResourceBundle.getBundle(MonitorWorkerServerReportResourceBundle.BASE_NAME) into
a variable and assert the returned ResourceBundle is not null and contains
expected content (e.g., check that keySet() is not empty or that a specific key
exists). Modify the test method reportBundleIsFound to perform these additional
assertions against the retrieved ResourceBundle to strengthen the verification.
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro
Run ID: 4177ed62-0053-4032-b37d-64cf3ff6d0a5
📒 Files selected for processing (4)
monitor-server/pom.xmlmonitor-worker-server/src/main/java/org/gridsuite/monitor/worker/server/process/securityanalysis/steps/SecurityAnalysisRunComputationStep.javamonitor-worker-server/src/test/java/org/gridsuite/monitor/worker/server/report/MonitorWorkerServerReportResourceBundleTest.javapom.xml
💤 Files with no reviewable changes (1)
- monitor-worker-server/src/main/java/org/gridsuite/monitor/worker/server/process/securityanalysis/steps/SecurityAnalysisRunComputationStep.java
| <sonar.projectKey>org.gridsuite:monitor-core</sonar.projectKey> | ||
| <mapstruct.version>1.6.3</mapstruct.version> | ||
| <lombok-mapstruct-bindings.version>0.2.0</lombok-mapstruct-bindings.version> | ||
| <sonar.projecttetedddKey>org.gridsuite:monitor-core</sonar.projecttetedddKey> |
There was a problem hiding this comment.
Restore the recognized Sonar property name.
Line 45 uses sonar.projecttetedddKey, which Sonar ignores. That makes the scanner fall back to org.gridsuite:gridsuite-monitor-core, matching the failing CI in this PR, so analysis stays broken until this is renamed back to sonar.projectKey.
🔧 Proposed fix
- <sonar.projecttetedddKey>org.gridsuite:monitor-core</sonar.projecttetedddKey>
+ <sonar.projectKey>org.gridsuite:monitor-core</sonar.projectKey>📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
| <sonar.projecttetedddKey>org.gridsuite:monitor-core</sonar.projecttetedddKey> | |
| <sonar.projectKey>org.gridsuite:monitor-core</sonar.projectKey> |
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.
In `@pom.xml` at line 45, The pom.xml contains a misspelled Sonar property element
<sonar.projecttetedddKey> which Sonar ignores; replace that element name with
the correct <sonar.projectKey> so the project identifier becomes
org.gridsuite:monitor-core (leave the element value unchanged), ensuring the
Sonar scanner picks up the intended project key.
|
Test PR for code rabbit |
PR Summary