Skip to content

Wff#73

Closed
antoinebhs wants to merge 10 commits intomainfrom
wff
Closed

Wff#73
antoinebhs wants to merge 10 commits intomainfrom
wff

Conversation

@antoinebhs
Copy link
Contributor

PR Summary

@coderabbitai
Copy link

coderabbitai bot commented Mar 20, 2026

Warning

Rate limit exceeded

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

⌛ 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: f737fe75-b138-4662-871e-29d7b027fd53

📥 Commits

Reviewing files that changed from the base of the PR and between 63408ef and 193b255.

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

Walkthrough

Adjusts 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

Cohort / File(s) Summary
MapStruct & Lombok build config
monitor-server/pom.xml, pom.xml
Added MapStruct and Lombok annotation-processor configuration and properties in monitor-server/pom.xml; removed similar maven-compiler-plugin configuration and related properties from the root pom.xml (root also shows an unintended property/name change and stray line).
Resource Bundle Integration
monitor-worker-server/src/main/java/org/.../SecurityAnalysisRunComputationStep.java
Removed use/import of MonitorWorkerServerReportResourceBundle.BASE_NAME from the error-reporting catch block; error node now created without referencing that resource bundle.
Resource Bundle Testing
monitor-worker-server/src/test/java/org/.../MonitorWorkerServerReportResourceBundleTest.java
Added JUnit 5 test that asserts MonitorWorkerServerReportResourceBundle is visible via ServiceLoader and that ResourceBundle.getBundle(...) for its base name can be loaded without exception.

Suggested reviewers

  • khouadrired
🚥 Pre-merge checks | ❌ 3

❌ Failed checks (2 warnings, 1 inconclusive)

Check name Status Explanation Resolution
Description check ⚠️ Warning The pull request description is completely empty, containing only the PR summary template header without any actual content or explanation of changes. Provide a meaningful description explaining the purpose of changes across all modified files, including the MapStruct/Lombok configuration updates and the removed resource bundle coupling.
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.
Title check ❓ Inconclusive The title 'Wff' is vague and non-descriptive, providing no meaningful information about the changeset. Replace with a clear, descriptive title that summarizes the main change, such as 'Add MapStruct/Lombok annotation processor configuration' or 'Configure build-time annotation processing for MapStruct and Lombok'.

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

📝 Coding Plan
  • Generate coding plan for human review comments

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.

@antoinebhs antoinebhs marked this pull request as ready for review March 20, 2026 10:39
Copy link

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

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

📥 Commits

Reviewing files that changed from the base of the PR and between 2128270 and 2c6d624.

📒 Files selected for processing (4)
  • monitor-server/pom.xml
  • monitor-worker-server/src/main/java/org/gridsuite/monitor/worker/server/process/securityanalysis/steps/SecurityAnalysisRunComputationStep.java
  • monitor-worker-server/src/test/java/org/gridsuite/monitor/worker/server/report/MonitorWorkerServerReportResourceBundleTest.java
  • pom.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>
Copy link

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🔴 Critical

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.

Suggested change
<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.

@antoinebhs
Copy link
Contributor Author

Test PR for code rabbit

@antoinebhs antoinebhs closed this Mar 20, 2026
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.

1 participant