Skip to content

Remove userId from filter-server call#165

Merged
antoinebhs merged 4 commits into
mainfrom
adapt-to-filter-server-endpoints
May 12, 2026
Merged

Remove userId from filter-server call#165
antoinebhs merged 4 commits into
mainfrom
adapt-to-filter-server-endpoints

Conversation

@carojeandat

@carojeandat carojeandat commented Apr 14, 2026

Copy link
Copy Markdown
Contributor

PR Summary

This PR updates the actions-server so that it no longer sends the userId body parameter when calling certain filter-server endpoints, as it is no longer required.

@coderabbitai

coderabbitai Bot commented Apr 14, 2026

Copy link
Copy Markdown

Review Change Stack

📝 Walkthrough

Walkthrough

The PR removes the userId parameter from the filter-based contingency list retrieval flow, simplifying the API contract across the controller, service, and filter layers. Additionally, the pom.xml is updated to explicitly manage the gridsuite-actions dependency version as 0.7.0.

Changes

Remove userId from filter-based contingency list flow

Layer / File(s) Summary
Filter Service signature and request header
src/main/java/org/gridsuite/actions/server/service/FilterService.java
getFiltersAttributes method signature removes userId parameter; HTTP request no longer includes userId header.
Contingency List Service integration
src/main/java/org/gridsuite/actions/server/ContingencyListService.java
getFilterBasedContingencyList removes userId parameter and calls FilterService without user scoping; FilterAttributes construction updated to use new signature.
REST controller endpoint
src/main/java/org/gridsuite/actions/server/ContingencyListController.java
getFilterBasedContingencyList endpoint removes userId request header and passes only the contingency list id to the service.
Test fixtures and assertions
src/test/java/org/gridsuite/actions/server/ContingencyListControllerTest.java
Test helper methods generate FilterAttributes without names; WireMock stub matchers and MVC requests updated to remove userId header requirements.

Dependency version management

Layer / File(s) Summary
Version property and managed dependency
pom.xml
Maven property gridsuite-actions.version defined as 0.7.0; dependencyManagement entry added to manage org.gridsuite:gridsuite-actions version through this property.

Suggested reviewers

  • thangqp
🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

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.
✅ Passed checks (4 passed)
Check name Status Explanation
Title check ✅ Passed The title accurately summarizes the main change: removing userId from filter-server calls, which is directly reflected in the updated method signatures and API calls across multiple files.
Description check ✅ Passed The description is directly related to the changeset, explaining that the PR removes userId parameter from filter-server calls because it is no longer required, which matches the actual code changes.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

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


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.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🧹 Nitpick comments (1)
pom.xml (1)

49-50: ⚖️ Poor tradeoff

Ensure the temporary dependency override doesn't persist beyond the gridsuite-dependencies upgrade.

The FIXME comments at lines 49-50 and 89-96 correctly flag this version override as temporary. Create a tracking issue to ensure it's removed when gridsuite-dependencies is upgraded from 50.1.0. The FilterAttributes API changes are evident in the codebase (constructor simplification and userId removal are in active use), confirming the override is necessary for current compatibility.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@pom.xml` around lines 49 - 50, Add a tracking issue to remove the temporary
gridsuite-actions.version override (the <gridsuite-actions.version> property set
to 0.7.0) once gridsuite-dependencies is upgraded from 50.1.0; reference the
FIXME comment currently adjacent to that property, note that the override exists
to accommodate FilterAttributes API changes (constructor simplification and
removal of userId), and include acceptance criteria in the issue to remove the
override, run unit/integration tests that exercise FilterAttributes usage, and
verify compilation against the upgraded gridsuite-dependencies.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Nitpick comments:
In `@pom.xml`:
- Around line 49-50: Add a tracking issue to remove the temporary
gridsuite-actions.version override (the <gridsuite-actions.version> property set
to 0.7.0) once gridsuite-dependencies is upgraded from 50.1.0; reference the
FIXME comment currently adjacent to that property, note that the override exists
to accommodate FilterAttributes API changes (constructor simplification and
removal of userId), and include acceptance criteria in the issue to remove the
override, run unit/integration tests that exercise FilterAttributes usage, and
verify compilation against the upgraded gridsuite-dependencies.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: b279893e-2bb2-494c-8fbf-3775b2261797

📥 Commits

Reviewing files that changed from the base of the PR and between 248efa7 and 6b66375.

📒 Files selected for processing (5)
  • pom.xml
  • src/main/java/org/gridsuite/actions/server/ContingencyListController.java
  • src/main/java/org/gridsuite/actions/server/ContingencyListService.java
  • src/main/java/org/gridsuite/actions/server/service/FilterService.java
  • src/test/java/org/gridsuite/actions/server/ContingencyListControllerTest.java

@sonarqubecloud

Copy link
Copy Markdown

@antoinebhs antoinebhs merged commit d7f413b into main May 12, 2026
4 of 5 checks passed
@antoinebhs antoinebhs deleted the adapt-to-filter-server-endpoints branch May 12, 2026 13:41
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.

3 participants