Skip to content

remove stash data when un loading study - #1062

Open
EtienneLt wants to merge 6 commits into
mainfrom
remove-stashed-data-when-unloading-study
Open

remove stash data when un loading study#1062
EtienneLt wants to merge 6 commits into
mainfrom
remove-stashed-data-when-unloading-study

Conversation

@EtienneLt

Copy link
Copy Markdown
Contributor

PR Summary

Signed-off-by: Etienne LESOT <etienne.lesot@rte-france.com>
@EtienneLt EtienneLt self-assigned this Aug 17, 2026
@coderabbitai

coderabbitai Bot commented Aug 17, 2026

Copy link
Copy Markdown

Important

  • 🔍 Trigger review

This repository does not receive automatic reviews because it has fewer than 10 stars.

⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: 8ba75227-59e5-4454-be37-d19dbc31f3a0


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.

Signed-off-by: Etienne LESOT <etienne.lesot@rte-france.com>
Signed-off-by: Etienne LESOT <etienne.lesot@rte-france.com>
// remove stashed modification on not stashed nodes
List<NetworkModificationNode> networkModificationNodeInfos = networkModificationNodeInfoRepository
.findAllById(notStashedNodes.stream().map(NodeEntity::getIdNode).toList())
.stream().map(NetworkModificationNodeInfoEntity::toDto).toList();

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Why do you need to pass throught the DTO, this is strange, NetworkModificationNodeInfoEntity already has the modificationGroupUuid member

// remove modification on stashed nodes
List<NetworkModificationNode> networkModificationNodeInfosToDelete = networkModificationNodeInfoRepository
.findAllById(stashedNodes.stream().map(NodeEntity::getIdNode).toList())
.stream().map(NetworkModificationNodeInfoEntity::toDto).toList();

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

same remark here

List<UUID> stashedModificationGroupUuids = networkModificationNodeInfos.stream()
.map(NetworkModificationNode::getModificationGroupUuid)
.toList();
networkModificationService.deleteStashedModificationsGroups(stashedModificationGroupUuids);

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Does a stashed modification exists in a group which contain a non stashed modification in a non stashed node ?
I see that when we stash a node, we call deleteStashedModifications. it's not clear for me i will investigate.

Signed-off-by: Etienne LESOT <etienne.lesot@rte-france.com>

@sBouzols sBouzols left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Maybe add a comment in the Supervision Controller here:

@DeleteMapping(value = "/studies/{studyUuid}/invalidate")
@Operation(summary = "Invalidate built nodes and delete root node network")

suggestion:

@DeleteMapping(value = "/studies/{studyUuid}/invalidate")
@Operation(summary = "Invalidate all node tree, clean stashed elements and delete root networks")

Signed-off-by: Etienne LESOT <etienne.lesot@rte-france.com>
@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.

2 participants