Skip to content

Conversation

@khouadrired
Copy link

No description provided.

@coderabbitai
Copy link

coderabbitai bot commented Feb 6, 2026

📝 Walkthrough

Walkthrough

This pull request reorganizes the monitor-server service architecture by restructuring package hierarchies. Services are relocated into dedicated layers: internal services, external REST clients, messaging services, and adapters. Class names are updated to reflect their roles (e.g., ReportService → ReportRestClient). Dependencies are adjusted accordingly to reference the new package locations and renamed classes.

Changes

Cohort / File(s) Summary
Core Service Relocation
monitor-server/src/main/java/org/gridsuite/monitor/server/services/internal/MonitorService.java, monitor-server/src/main/java/org/gridsuite/monitor/server/services/internal/ResultService.java, monitor-server/src/main/java/org/gridsuite/monitor/server/services/internal/ResultProvider.java
Services moved to internal package. MonitorService dependency updated from ReportService to ReportRestClient with corresponding method call updates.
REST Client Migration
monitor-server/src/main/java/org/gridsuite/monitor/server/services/external/client/ReportRestClient.java, monitor-server/src/main/java/org/gridsuite/monitor/server/services/external/client/SecurityAnalysisRestClient.java
ReportService and SecurityAnalysisService renamed and relocated to external client package to reflect their role as REST client wrappers.
External Adapter
monitor-server/src/main/java/org/gridsuite/monitor/server/services/external/adapter/SecurityAnalysisResultProvider.java
Relocated to external adapter package and refactored to depend on SecurityAnalysisRestClient instead of SecurityAnalysisService.
Messaging Services
monitor-server/src/main/java/org/gridsuite/monitor/server/services/messaging/NotificationService.java, monitor-server/src/main/java/org/gridsuite/monitor/server/services/messaging/ConsumerService.java
Services moved to messaging package with import updates to reference new internal MonitorService location.
Controller Updates
monitor-server/src/main/java/org/gridsuite/monitor/server/controllers/MonitorController.java
Import path updated to use MonitorService from new internal package location.
Test Package Reorganization
monitor-server/src/test/java/org/gridsuite/monitor/server/services/internal/..., monitor-server/src/test/java/org/gridsuite/monitor/server/services/external/client/..., monitor-server/src/test/java/org/gridsuite/monitor/server/services/messaging/...
Test files relocated and updated to match new source package structure. Service test classes renamed and refactored to test REST clients and use updated dependencies.
Integration Test Updates
monitor-server/src/test/java/org/gridsuite/monitor/server/MonitorIntegrationTest.java, monitor-server/src/test/java/org/gridsuite/monitor/server/controllers/MonitorControllerTest.java, monitor-server/src/test/java/org/gridsuite/monitor/server/services/external/adapter/SecurityAnalysisResultProviderTest.java
Import paths adjusted to reference relocated services and REST clients. Mocked dependencies updated from service classes to REST client variants with corresponding assertion updates.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~25 minutes

Suggested reviewers

  • klesaulnier
  • thangqp
  • antoinebhs

Poem

🐰 Hop hop, the services now organize,
Internal, external, in layers so wise,
REST clients emerge from the service disguise,
Messaging queues and adapters arise,
A cleaner architecture—how neat it complies! 📦✨

🚥 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 No pull request description was provided by the author, making it impossible to assess whether the description relates to the changeset. Add a meaningful pull request description explaining the rationale and scope of the service reorganization.
✅ Passed checks (1 passed)
Check name Status Explanation
Title check ✅ Passed The title accurately summarizes the main objective of the changeset, which is reorganizing the monitor-server services into a new package structure (internal, external.client, external.adapter, messaging).

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

✨ Finishing touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch GRD-3891-refactor-monitor-server-services-structure

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.

@khouadrired khouadrired force-pushed the GRD-3891-refactor-monitor-server-services-structure branch from e3484f7 to 154a2c5 Compare February 6, 2026 15:04
@sonarqubecloud
Copy link

sonarqubecloud bot commented Feb 6, 2026

@khouadrired khouadrired requested a review from thangqp February 9, 2026 10:37
@khouadrired khouadrired changed the title [GRD-3891] organize monitor-server services organize monitor-server services Feb 10, 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