Skip to content

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

Open
carojeandat wants to merge 2 commits intomainfrom
remove-unused-userId
Open

Remove unused userId in SA, sensi and filters servers#972
carojeandat wants to merge 2 commits 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: 033d8df4-4a7e-4c50-8bd6-dcf6cc1c8872

📥 Commits

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

📒 Files selected for processing (3)
  • 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/StudyService.java

📝 Walkthrough

Walkthrough

Removed the userId parameter and corresponding HEADER_USER_ID propagation across controller, service, and consumer layers for security and sensitivity analysis parameter retrieval and duplication; updated downstream calls and tests to stop sending the user-id header.

Changes

Cohort / File(s) Summary
Controller
src/main/java/org/gridsuite/study/server/controller/StudyController.java
Removed @RequestHeader(HEADER_USER_ID) String userId from getSecurityAnalysisParametersValues and getSensitivityAnalysisParameters; calls updated to pass only studyUuid.
Analysis Services
src/main/java/org/gridsuite/study/server/service/SecurityAnalysisService.java, src/main/java/org/gridsuite/study/server/service/SensitivityAnalysisService.java
Dropped userId from get...Parameters(...) and duplicate...Parameters(...) method signatures; removed construction/sending of HEADER_USER_ID in HTTP calls and switched GETs to restTemplate.getForObject / POSTs to postForObject without user header.
Study / Consumer Services
src/main/java/org/gridsuite/study/server/service/StudyService.java, src/main/java/org/gridsuite/study/server/service/ConsumerService.java
Removed userId from public getters and internal duplicateStudyEntity flow; updated duplication calls to invoke analysis services without userId.
Tests
src/test/java/org/gridsuite/study/server/SensitivityAnalysisTest.java, src/test/java/org/gridsuite/study/server/rootnetworks/SecurityAnalysisTest.java
Removed USER_ID constant and eliminated HEADER_USER_ID from MockMvc GET requests; assertions unchanged.

Suggested reviewers

  • khouadrired
  • SlimaneAmar
  • Meklo
🚥 Pre-merge checks | ✅ 1 | ❌ 2

❌ Failed checks (2 warnings)

Check name Status Explanation Resolution
Description check ⚠️ Warning The PR description is completely empty, providing no information about the changeset whatsoever. Add a description explaining why userId was removed, which components are affected, and any migration notes for downstream systems.
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.
✅ Passed checks (1 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly and accurately describes the main change: removing unused userId parameters from security analysis, sensitivity analysis, and filters servers across multiple service and controller classes.

✏️ 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.42.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

sonarqubecloud Bot commented Apr 9, 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