Robustify node building / unbuilding#976
Open
basseche wants to merge 5 commits into
Open
Conversation
|
Caution Review failedAn error occurred during the review process. Please try again later. 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. Comment |
There was a problem hiding this comment.
Actionable comments posted: 2
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In `@src/main/java/org/gridsuite/study/server/controller/StudyController.java`:
- Line 1678: The current call
rootNetworkNodeInfoService.assertNoBuildingNode(rootNetworkUuid,
List.of(nodeUuid)) only checks the single target node; change it to collect all
UUIDs for the whole branch/path that could be affected (e.g. via the service
that resolves branch nodes — for example getBranchNodeUuids(rootNetworkUuid,
nodeUuid) or traverse parents/children) and pass that full list into
rootNetworkNodeInfoService.assertNoBuildingNode; update the code around the call
in StudyController (method handling the unbuild operation) to compute
relatedBranchUuids and call assertNoBuildingNode(rootNetworkUuid,
relatedBranchUuids) so concurrent BUILDING states on any branch node are
guarded.
In `@src/main/java/org/gridsuite/study/server/service/ConsumerService.java`:
- Around line 133-135: handleBuildSuccess(...) is currently invoked before
handleBuildResultWorkflow(...) and only JsonProcessingException is caught, so
runtime errors from workflow metadata parsing (e.g., WorkflowType.valueOf) can
crash the consumer after the build side-effects have been applied; wrap the call
to handleBuildResultWorkflow(studyUuid, receiverObj.getNodeUuid(),
receiverObj.getRootNetworkUuid(), message) in its own try/catch (catch broad
RuntimeException or IllegalArgumentException/IllegalStateException as
appropriate) so parsing or workflow-specific errors are logged/handled without
propagating and without undoing the successful path performed by
studyService.handleBuildSuccess(...).
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro
Run ID: fcb67c53-9d5a-4f4d-9761-276dd18b55c9
📒 Files selected for processing (2)
src/main/java/org/gridsuite/study/server/controller/StudyController.javasrc/main/java/org/gridsuite/study/server/service/ConsumerService.java
Signed-off-by: basseche <bassel.el-cheikh_externe@rte-france.com>
|
added 2 commits
July 16, 2026 10:19
…into robustify_node_build
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.



PR Summary
Robustify node building :