Skip to content

Return filters not found when getting the total count of identifiables for a list of filters#194

Merged
FranckLecuyer merged 2 commits intomainfrom
get_identifiables_count_with_missing_filters_uuids
Apr 2, 2026
Merged

Return filters not found when getting the total count of identifiables for a list of filters#194
FranckLecuyer merged 2 commits intomainfrom
get_identifiables_count_with_missing_filters_uuids

Conversation

@FranckLecuyer
Copy link
Copy Markdown
Contributor

@FranckLecuyer FranckLecuyer commented Mar 31, 2026

PR Summary

Return the filters not found in addition to the total count of identifibles for a list of filters.

…ntifiables for a list of filters

Signed-off-by: Franck LECUYER <franck.lecuyer@rte-france.com>
@FranckLecuyer FranckLecuyer marked this pull request as ready for review March 31, 2026 08:49
@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented Mar 31, 2026

📝 Walkthrough

Walkthrough

The /filters/identifiables-count endpoint return type is updated from Map<String, Long> to Map<String, CountWithMissingUuids>, a new record carrying both the identifiable count and missing filter UUIDs. Related service and test code are updated accordingly.

Changes

Cohort / File(s) Summary
Response Data Structure
src/main/java/org/gridsuite/filter/server/dto/CountWithMissingUuids.java
New record introduced with two components: Long count and List<UUID> missingUuids to encapsulate the response payload.
Service Layer
src/main/java/org/gridsuite/filter/server/FilterService.java
getIdentifiablesCountByGroup return type updated to Map<String, CountWithMissingUuids>. Logic now computes missing filter UUIDs alongside identifiable counts per group.
Controller Layer
src/main/java/org/gridsuite/filter/server/FilterController.java
getIdentifiablesCountByGroup endpoint return type updated to Map<String, CountWithMissingUuids>. Swagger/OpenAPI annotations updated to reflect the new response structure.
Test Updates
src/test/java/org/gridsuite/filter/server/FilterEntityControllerTest.java
testGetIdentifiablesCount and testGetIdentifiablesDuplicatedCount updated to deserialize responses as Map<String, CountWithMissingUuids> and assert both count and missingUuids fields. Test payloads extended to include missing-filter scenarios.
🚥 Pre-merge checks | ✅ 2 | ❌ 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 (2 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly and specifically describes the main change: returning filters not found along with the total count of identifiables, which accurately reflects the changeset.
Description check ✅ Passed The description is related to the changeset, explaining that filters not found are now returned in addition to the count of identifiables, which matches the implemented changes.

✏️ 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[bot]

This comment was marked as off-topic.

@sonarqubecloud
Copy link
Copy Markdown

sonarqubecloud Bot commented Apr 1, 2026

@thangqp thangqp self-requested a review April 1, 2026 15:54
@FranckLecuyer FranckLecuyer merged commit 45dac32 into main Apr 2, 2026
4 checks passed
@FranckLecuyer FranckLecuyer deleted the get_identifiables_count_with_missing_filters_uuids branch April 2, 2026 07:45
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.

2 participants