Skip to content

Share a composite modification nested in another composite - #1089

Merged
flomillot merged 3 commits into
mainfrom
feat/share-nested-composite-modification
Sep 16, 2026
Merged

flomillot merged 3 commits into
mainfrom
feat/share-nested-composite-modification

Conversation

@flomillot

@flomillot flomillot commented Sep 10, 2026 •

Copy link
Copy Markdown
Contributor

Follow-up of #1070.

A composite modification nested in another composite of a node can now be shared. The network modification server returns the reference left in place of the composite, which is registered in the directory server as belonging to the node when it stands in the node group (STUDY_NODE), or to the parent composite otherwise (STUDY_NODE_NETWORK_MODIFICATION).

Requires gridsuite/network-modification-server#893.

The reference left behind by the shared composite belongs to its parent composite when it was nested in one, and to the node otherwise. Also expose whether a composite modification contains a shared modification.

Signed-off-by: Florent MILLOT <75525996+flomillot@users.noreply.github.com>
@coderabbitai

coderabbitai Bot commented Sep 10, 2026 •

Copy link
Copy Markdown

Review Change StackReview Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Advanced

Run ID: 4f27df8d-b89d-43a7-9726-fa9e00154cdb

📥 Commits

Reviewing files that changed from the base of the PR and between 7e0a512 and 99759ff.

📒 Files selected for processing (3)
  • src/main/java/org/gridsuite/study/server/service/NetworkModificationService.java
  • src/main/java/org/gridsuite/study/server/service/StudyService.java
  • src/test/java/org/gridsuite/study/server/NetworkModificationTest.java
🚧 Files skipped from review as they are similar to previous changes (3)
  • src/main/java/org/gridsuite/study/server/service/StudyService.java
  • src/main/java/org/gridsuite/study/server/service/NetworkModificationService.java
  • src/test/java/org/gridsuite/study/server/NetworkModificationTest.java

Included review availability: Your plan provides up to 1 included review per hour; 0 remain after this review.


📝 Walkthrough

Walkthrough

The composite sharing flow now uses the ModificationReference returned by extraction. Tests cover node-level and nested-composite sharing. The related Javadoc wording is corrected.

Changes

Network modification sharing

Layer / File(s) Summary
Composite sharing reference flow
src/main/java/org/gridsuite/study/server/service/NetworkModificationService.java, src/main/java/org/gridsuite/study/server/service/StudyService.java, src/test/java/org/gridsuite/study/server/NetworkModificationTest.java
shareCompositeNetworkModification passes the extracted ModificationReference directly to createElementsReferences. Tests return that reference from the share endpoint and validate node-level and nested-composite references. The Javadoc wording is corrected.

Suggested reviewers: ghazwarhili

Priority: ⬇️ Low

Merge Risk: ⚪ Minimal · up to 99759

The composite-sharing ownership cases are covered by the current implementation and tests, with no actionable merge risk identified.

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 11.76% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 17 functions across 6 files. 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 clearly identifies the main change: sharing a composite modification nested in another composite.
Description check ✅ Passed The description accurately explains the nested composite sharing behavior, reference registration, and required dependency.
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.
  • Fix all pre-merge checks with AI

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.

The reference left in place of the shared composite modification is now returned by the network modification server and registered through createElementsReferences, so that a reference standing in a parent composite is registered too.

The contains-shared-modification relay is removed in favour of /containers/references/exists.

Signed-off-by: Florent MILLOT <florent.millot_externe@rte-france.com>
… composite modification

Signed-off-by: Florent MILLOT <florent.millot_externe@rte-france.com>
@sonarqubecloud

Copy link
Copy Markdown

@flomillot
flomillot merged commit 25537cb into main Sep 16, 2026
5 checks passed
@flomillot
flomillot deleted the feat/share-nested-composite-modification branch September 16, 2026 10:30
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