Skip to content

Remove unused userId in SA, sensi and filters servers#972

Open
carojeandat wants to merge 1 commit intomainfrom
remove-unused-userId
Open

Remove unused userId in SA, sensi and filters servers#972
carojeandat wants to merge 1 commit intomainfrom
remove-unused-userId

Conversation

@carojeandat
Copy link
Copy Markdown
Contributor

PR Summary

Signed-off-by: Caroline Jeandat <caroline.jeandat@rte-france.com>
@coderabbitai
Copy link
Copy Markdown

coderabbitai bot commented Mar 26, 2026

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 9abb4e0a-cce7-431a-bb98-71bfd6a4e29e

📥 Commits

Reviewing files that changed from the base of the PR and between b41b0b8 and b2b78a4.

📒 Files selected for processing (7)
  • src/main/java/org/gridsuite/study/server/controller/StudyController.java
  • src/main/java/org/gridsuite/study/server/service/ConsumerService.java
  • src/main/java/org/gridsuite/study/server/service/SecurityAnalysisService.java
  • src/main/java/org/gridsuite/study/server/service/SensitivityAnalysisService.java
  • src/main/java/org/gridsuite/study/server/service/StudyService.java
  • src/test/java/org/gridsuite/study/server/SensitivityAnalysisTest.java
  • src/test/java/org/gridsuite/study/server/rootnetworks/SecurityAnalysisTest.java

📝 Walkthrough

Walkthrough

This pull request removes the userId parameter from various service method signatures across the study server codebase. The parameter is no longer passed through the call chain for security analysis and sensitivity analysis parameter operations, and corresponding HTTP headers are removed from service-to-service requests.

Changes

Cohort / File(s) Summary
Controller API Layer
src/main/java/org/gridsuite/study/server/controller/StudyController.java
Removed HEADER_USER_ID from method parameters in getSecurityAnalysisParametersValues and getSensitivityAnalysisParameters endpoints; service calls updated to not pass userId.
Security and Sensitivity Analysis Services
src/main/java/org/gridsuite/study/server/service/SecurityAnalysisService.java, src/main/java/org/gridsuite/study/server/service/SensitivityAnalysisService.java
Removed userId parameter from getSecurityAnalysisParameters, duplicateSecurityAnalysisParameters, getSensitivityAnalysisParameters, and duplicateSensitivityAnalysisParameters methods; removed HEADER_USER_ID header construction from HTTP requests.
Study and Consumer Services
src/main/java/org/gridsuite/study/server/service/StudyService.java, src/main/java/org/gridsuite/study/server/service/ConsumerService.java
Removed userId parameter from getSecurityAnalysisParametersValues, getSensitivityAnalysisParameters, and private duplicateStudyEntity method; updated downstream service calls to exclude userId.
Test Cases
src/test/java/org/gridsuite/study/server/SensitivityAnalysisTest.java, src/test/java/org/gridsuite/study/server/rootnetworks/SecurityAnalysisTest.java
Removed USER_ID constant and HEADER_USER_ID header assertions from GET requests to sensitivity and security analysis parameter endpoints.
🚥 Pre-merge checks | ✅ 1 | ❌ 2

❌ Failed checks (1 warning, 1 inconclusive)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 3.57% 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 pull request description is empty, providing no meaningful information about the changeset despite the title being clear. Add a detailed description explaining why userId was removed, what services were affected, and any breaking API changes or migration steps needed.
✅ Passed checks (1 passed)
Check name Status Explanation
Title check ✅ Passed The title accurately summarizes the main change: removing unused userId parameters from Security Analysis and Sensitivity Analysis services.

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

Warning

There were issues while running some tools. Please review the errors and either fix the tool's configuration or disable the tool if it's a critical failure.

🔧 ast-grep (0.41.1)
src/main/java/org/gridsuite/study/server/controller/StudyController.java
src/main/java/org/gridsuite/study/server/service/StudyService.java

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.

@sonarqubecloud
Copy link
Copy Markdown

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