Skip to content

Return ID of process config at creation or duplication#196

Merged
carojeandat merged 3 commits into
mainfrom
caroline/return-create-element-id
Jul 9, 2026
Merged

Return ID of process config at creation or duplication#196
carojeandat merged 3 commits into
mainfrom
caroline/return-create-element-id

Conversation

@carojeandat

Copy link
Copy Markdown
Contributor

PR Summary

@coderabbitai

coderabbitai Bot commented Jul 7, 2026

Copy link
Copy Markdown

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: b0d22298-a774-4a98-ac84-0507a528a33c

📥 Commits

Reviewing files that changed from the base of the PR and between 641b94c and ae26940.

📒 Files selected for processing (1)
  • src/test/java/org/gridsuite/explore/server/MonitorTest.java

📝 Walkthrough

Walkthrough

createProcessConfig and duplicateProcessConfig now return a UUID from ExploreService, the controller forwards that UUID in the HTTP response body, and the matching tests now assert the returned body value.

Changes

Process-config UUID return

Layer / File(s) Summary
Service methods return UUID
src/main/java/org/gridsuite/explore/server/services/ExploreService.java
createProcessConfig and duplicateProcessConfig changed return type from void to UUID, returning the UUID computed via monitorService after the create/duplicate directory-element operation; updateProcessConfig unchanged.
Controller endpoints expose UUID
src/main/java/org/gridsuite/explore/server/ExploreController.java
Both endpoints changed from ResponseEntity<Void> with ok().build() to ResponseEntity<UUID> with ok().body(...), returning the UUID from the corresponding service call.
Response body assertions
src/test/java/org/gridsuite/explore/server/MonitorTest.java
The create and duplicate endpoint tests now deserialize the response body as a UUID and assert it matches the expected ID.

Sequence Diagram(s)

sequenceDiagram
  participant Client
  participant ExploreController
  participant ExploreService
  participant monitorService

  Client->>ExploreController: POST create/duplicate process-config
  ExploreController->>ExploreService: createProcessConfig/duplicateProcessConfig(...)
  ExploreService->>monitorService: compute UUID
  monitorService-->>ExploreService: UUID
  ExploreService-->>ExploreController: UUID
  ExploreController-->>Client: 200 OK with UUID body
Loading

Suggested reviewers: khouadrired, FranckLecuyer

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 inconclusive)

Check name Status Explanation Resolution
Description check ❓ Inconclusive The description is just a template placeholder and does not describe the change in any meaningful way. Replace the placeholder with a brief summary of what changed, what the previous behavior was, and any reviewer notes.
✅ Passed checks (4 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly describes the main change: returning the process config ID on create or duplicate.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
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.

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.

@antoinebhs antoinebhs 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.

small UT to verify return of controlleR?

@sonarqubecloud

sonarqubecloud Bot commented Jul 9, 2026

Copy link
Copy Markdown

@carojeandat
carojeandat merged commit 7de623a into main Jul 9, 2026
5 checks passed
@carojeandat
carojeandat deleted the caroline/return-create-element-id branch July 9, 2026 16:00
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