From 9e0d2f83415224ac0d993149f038cb34d215f079 Mon Sep 17 00:00:00 2001 From: jamal-khey Date: Fri, 3 Jan 2025 13:08:27 +0100 Subject: [PATCH 1/5] add locationId to loadflow results (#660) Signed-off-by: jamal-khey Co-authored-by: Slimane AMAR --- .../org/gridsuite/study/server/dto/LimitViolationInfos.java | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/main/java/org/gridsuite/study/server/dto/LimitViolationInfos.java b/src/main/java/org/gridsuite/study/server/dto/LimitViolationInfos.java index 0311daee9..e0795e316 100644 --- a/src/main/java/org/gridsuite/study/server/dto/LimitViolationInfos.java +++ b/src/main/java/org/gridsuite/study/server/dto/LimitViolationInfos.java @@ -24,6 +24,8 @@ public class LimitViolationInfos { private String subjectId; + private String locationId; + private Double limit; private String limitName; From c518091d43fcc3eb3de3838c5663d62aeb41479e Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Mon, 6 Jan 2025 12:26:03 +0000 Subject: [PATCH 2/5] Update SNAPSHOT version to v2.12.0 --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index bfdf559f6..068808f5b 100644 --- a/pom.xml +++ b/pom.xml @@ -19,7 +19,7 @@ org.gridsuite gridsuite-study-server - 2.11.0-SNAPSHOT + 2.12.0-SNAPSHOT jar Study Server From b98929ffafe09fb5994b559fa197ff2d947d3966 Mon Sep 17 00:00:00 2001 From: Ayoub LABIDI <117761394+ayolab@users.noreply.github.com> Date: Tue, 7 Jan 2025 16:25:11 +0100 Subject: [PATCH 3/5] Add endpoints to retreive aggregated severities (#663) Signed-off-by: Ayoub LABIDI --- .../study/server/StudyController.java | 19 ++++++++++++++++ .../study/server/service/ReportService.java | 8 +++++++ .../study/server/service/StudyService.java | 16 ++++++++++++++ .../server/service/ReportServiceTest.java | 22 +++++++++++++++++++ 4 files changed, 65 insertions(+) diff --git a/src/main/java/org/gridsuite/study/server/StudyController.java b/src/main/java/org/gridsuite/study/server/StudyController.java index d888cab06..b2ee6bbe9 100644 --- a/src/main/java/org/gridsuite/study/server/StudyController.java +++ b/src/main/java/org/gridsuite/study/server/StudyController.java @@ -1071,6 +1071,25 @@ public ResponseEntity> getNodeReportLogs(@Parameter(description return ResponseEntity.ok().contentType(MediaType.APPLICATION_JSON).body(studyService.getReportLogs(reportId, messageFilter, severityLevels)); } + @GetMapping(value = "/studies/{studyUuid}/nodes/{nodeUuid}/report/{reportId}/aggregated-severities", produces = MediaType.APPLICATION_JSON_VALUE) + @Operation(summary = "Get node report severities") + @ApiResponses(value = {@ApiResponse(responseCode = "200", description = "The node report severities"), @ApiResponse(responseCode = "404", description = "The study/node is not found")}) + public ResponseEntity> getNodeReportAggregatedSeverities(@Parameter(description = "Study uuid") @PathVariable("studyUuid") UUID studyUuid, + @Parameter(description = "node id") @PathVariable("nodeUuid") UUID nodeUuid, + @Parameter(description = "reportId") @PathVariable("reportId") UUID reportId) { + studyService.assertIsStudyAndNodeExist(studyUuid, nodeUuid); + return ResponseEntity.ok().contentType(MediaType.APPLICATION_JSON).body(studyService.getNodeReportAggregatedSeverities(reportId)); + } + + @GetMapping(value = "/studies/{studyUuid}/nodes/{nodeUuid}/report/aggregated-severities", produces = MediaType.APPLICATION_JSON_VALUE) + @Operation(summary = "Get the report severities of the given node and all its parents") + @ApiResponses(value = {@ApiResponse(responseCode = "200", description = "The report severities of the node and all its parent"), @ApiResponse(responseCode = "404", description = "The study/node is not found")}) + public ResponseEntity> getParentNodesAggregatedReportSeverities(@Parameter(description = "Study uuid") @PathVariable("studyUuid") UUID studyUuid, + @Parameter(description = "node id") @PathVariable("nodeUuid") UUID nodeUuid) { + studyService.assertIsStudyAndNodeExist(studyUuid, nodeUuid); + return ResponseEntity.ok().contentType(MediaType.APPLICATION_JSON).body(studyService.getParentNodesAggregatedReportSeverities(nodeUuid, studyService.getStudyFirstRootNetworkUuid(studyUuid))); + } + @GetMapping(value = "/studies/{studyUuid}/nodes/{nodeUuid}/report/logs", produces = MediaType.APPLICATION_JSON_VALUE) @Operation(summary = "Get the report logs of the given node and all its parents") @ApiResponses(value = {@ApiResponse(responseCode = "200", description = "The report logs of the node and all its parent"), @ApiResponse(responseCode = "404", description = "The study/node is not found")}) diff --git a/src/main/java/org/gridsuite/study/server/service/ReportService.java b/src/main/java/org/gridsuite/study/server/service/ReportService.java index 0ad3951fe..b73318338 100644 --- a/src/main/java/org/gridsuite/study/server/service/ReportService.java +++ b/src/main/java/org/gridsuite/study/server/service/ReportService.java @@ -111,4 +111,12 @@ public UUID duplicateReport(@NonNull UUID id) { return UUID.randomUUID(); } } + + public Set getReportAggregatedSeverities(@NonNull UUID id) { + var path = UriComponentsBuilder.fromPath("{id}/aggregated-severities").buildAndExpand(id).toUriString(); + HttpHeaders headers = new HttpHeaders(); + headers.setContentType(MediaType.APPLICATION_JSON); + return restTemplate.exchange(this.getReportsServerURI() + path, HttpMethod.GET, new HttpEntity<>(headers), new ParameterizedTypeReference>() { + }).getBody(); + } } diff --git a/src/main/java/org/gridsuite/study/server/service/StudyService.java b/src/main/java/org/gridsuite/study/server/service/StudyService.java index c872cbf9e..bde34ed8e 100644 --- a/src/main/java/org/gridsuite/study/server/service/StudyService.java +++ b/src/main/java/org/gridsuite/study/server/service/StudyService.java @@ -1785,6 +1785,22 @@ public List getReportLogs(String reportId, String messageFilter, Set< return reportService.getReportLogs(UUID.fromString(reportId), messageFilter, severityLevels); } + public Set getNodeReportAggregatedSeverities(UUID reportId) { + return reportService.getReportAggregatedSeverities(reportId); + } + + public Set getParentNodesAggregatedReportSeverities(UUID nodeUuid, UUID rootNetworkUuid) { + List nodeIds = nodesTree(nodeUuid); + Set severities = new HashSet<>(); + Map modificationReportsMap = networkModificationTreeService.getModificationReports(nodeUuid, rootNetworkUuid); + + for (UUID nodeId : nodeIds) { + UUID reportId = modificationReportsMap.getOrDefault(nodeId, networkModificationTreeService.getReportUuid(nodeId, rootNetworkUuid)); + severities.addAll(reportService.getReportAggregatedSeverities(reportId)); + } + return severities; + } + @Transactional(readOnly = true) public List getParentNodesReportLogs(UUID nodeUuid, UUID rootNetworkUuid, String messageFilter, Set severityLevels) { List nodeIds = nodesTree(nodeUuid); diff --git a/src/test/java/org/gridsuite/study/server/service/ReportServiceTest.java b/src/test/java/org/gridsuite/study/server/service/ReportServiceTest.java index 70fad6fa0..160f44243 100644 --- a/src/test/java/org/gridsuite/study/server/service/ReportServiceTest.java +++ b/src/test/java/org/gridsuite/study/server/service/ReportServiceTest.java @@ -49,6 +49,7 @@ import java.util.ArrayList; import java.util.List; import java.util.Objects; +import java.util.Set; import java.util.UUID; import java.util.stream.Stream; @@ -128,6 +129,12 @@ public MockResponse dispatch(RecordedRequest request) { return new MockResponse(HttpStatus.OK.value(), Headers.of(HttpHeaders.CONTENT_TYPE, MediaType.APPLICATION_JSON_VALUE), mapper.writeValueAsString(getNodeReport(UUID.fromString(reportId), reportId))); } else if (path.matches("/v1/reports/" + NOT_FOUND_REPORT_UUID + "/duplicate")) { return new MockResponse(HttpStatus.NOT_FOUND.value()); + } else if (path.matches("/v1/reports/" + MODIFICATION_CHILD_NODE1_REPORT_UUID + "/aggregated-severities")) { + return new MockResponse(HttpStatus.OK.value(), Headers.of(HttpHeaders.CONTENT_TYPE, MediaType.APPLICATION_JSON_VALUE), mapper.writeValueAsString(Set.of("INFO"))); + } else if (path.matches("/v1/reports/" + ROOT_NODE_REPORT_UUID + "/aggregated-severities")) { + return new MockResponse(HttpStatus.OK.value(), Headers.of(HttpHeaders.CONTENT_TYPE, MediaType.APPLICATION_JSON_VALUE), mapper.writeValueAsString(Set.of("WARN"))); + } else if (path.matches("/v1/reports/.*/aggregated-severities")) { + return new MockResponse(HttpStatus.OK.value(), Headers.of(HttpHeaders.CONTENT_TYPE, MediaType.APPLICATION_JSON_VALUE), mapper.writeValueAsString(Set.of("UNKNOWN"))); } else { LOGGER.error("Unhandled method+path: {} {}", request.getMethod(), request.getPath()); return new MockResponse.Builder().code(HttpStatus.I_AM_A_TEAPOT.value()).body("Unhandled method+path: " + request.getMethod() + " " + request.getPath()).build(); @@ -236,6 +243,14 @@ void testMultipleReport(final MockWebServer server) throws Exception { checkReports(child1Reports, List.of(child1ExpectedReport)); assertTrue(TestUtils.getRequestsDone(1, server).stream().anyMatch(r -> r.matches("/v1/reports/.*"))); + // get only Child1 aggregated severities + mvcResult = mockMvc.perform(get("/v1/studies/{studyUuid}/nodes/{nodeUuid}/report/{reportId}/aggregated-severities", rootNode.getStudyId(), child1.getId(), MODIFICATION_CHILD_NODE1_REPORT_UUID)) + .andExpectAll(status().isOk(), content().contentType(MediaType.APPLICATION_JSON)) + .andReturn(); + Set child1AggregatedSeverities = mapper.readValue(mvcResult.getResponse().getContentAsString(), new TypeReference<>() { }); + assertEquals(Set.of("INFO"), child1AggregatedSeverities); + assertTrue(TestUtils.getRequestsDone(1, server).stream().anyMatch(r -> r.matches("/v1/reports/.*/aggregated-severities"))); + // get Child2 report + parents mvcResult = mockMvc.perform(get("/v1/studies/{studyUuid}/nodes/{nodeUuid}/parent-nodes-report?nodeOnlyReport=false&reportType=NETWORK_MODIFICATION", rootNode.getStudyId(), child2.getId())) .andExpectAll(status().isOk(), content().contentType(MediaType.APPLICATION_JSON)) @@ -249,6 +264,13 @@ void testMultipleReport(final MockWebServer server) throws Exception { checkReports(child2AndParentsReports, childrenAndParentsExpectedReports); assertTrue(TestUtils.getRequestsDone(childrenAndParentsExpectedReports.size(), server).stream().anyMatch(r -> r.matches("/v1/reports/.*"))); + mvcResult = mockMvc.perform(get("/v1/studies/{studyUuid}/nodes/{nodeUuid}/report/aggregated-severities", rootNode.getStudyId(), node.getId())) + .andExpectAll(status().isOk(), content().contentType(MediaType.APPLICATION_JSON)) + .andReturn(); + Set child2AggregatedSeverities = mapper.readValue(mvcResult.getResponse().getContentAsString(), new TypeReference<>() { }); + assertEquals(Set.of("WARN", "UNKNOWN"), child2AggregatedSeverities); + assertTrue(TestUtils.getRequestsDone(2, server).stream().anyMatch(r -> r.matches("/v1/reports/.*/aggregated-severities"))); + // get Child1 report + parents mvcResult = mockMvc.perform(get("/v1/studies/{studyUuid}/nodes/{nodeUuid}/parent-nodes-report?nodeOnlyReport=false&reportType=NETWORK_MODIFICATION", rootNode.getStudyId(), child1.getId())) .andExpectAll(status().isOk(), content().contentType(MediaType.APPLICATION_JSON)) From 53985f168dbdc8d163c6c012ed39cbe5e3b779fb Mon Sep 17 00:00:00 2001 From: dbraquart <107846716+dbraquart@users.noreply.github.com> Date: Tue, 7 Jan 2025 17:31:09 +0100 Subject: [PATCH 4/5] Rename spreadsheet-config-server remote service (#664) Signed-off-by: David BRAQUART --- .../study/server/service/client/RemoteServiceName.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/java/org/gridsuite/study/server/service/client/RemoteServiceName.java b/src/main/java/org/gridsuite/study/server/service/client/RemoteServiceName.java index a6193171d..d4eff59ed 100644 --- a/src/main/java/org/gridsuite/study/server/service/client/RemoteServiceName.java +++ b/src/main/java/org/gridsuite/study/server/service/client/RemoteServiceName.java @@ -49,9 +49,9 @@ public enum RemoteServiceName { SENSITIVITY_ANALYSIS_SERVER, SHORTCIRCUIT_SERVER, SINGLE_LINE_DIAGRAM_SERVER, - SPREADSHEET_CONFIG_SERVER, STATE_ESTIMATION_ORCHESTRATOR_SERVER, STATE_ESTIMATION_SERVER, + STUDY_CONFIG_SERVER, STUDY_NOTIFICATION_SERVER, STUDY_SERVER, TIMESERIES_SERVER, From 25b800300907b11260c9631cc979a773d5396b20 Mon Sep 17 00:00:00 2001 From: Joris Mancini <53527338+TheMaskedTurtle@users.noreply.github.com> Date: Wed, 8 Jan 2025 09:59:44 +0100 Subject: [PATCH 5/5] feat: plug on DLQs to handle computation and build failures (#648) Signed-off-by: Joris Mancini --- .../study/server/StudyConstants.java | 1 + .../study/server/service/ConsumerService.java | 5 ++- src/main/resources/config/application.yaml | 41 +++++++++---------- .../gridsuite/study/server/LoadFlowTest.java | 2 +- .../study/server/NetworkModificationTest.java | 3 +- .../study/server/NonEvacuatedEnergyTest.java | 2 +- .../study/server/SecurityAnalysisTest.java | 2 +- .../study/server/SensitivityAnalysisTest.java | 2 +- .../study/server/ShortCircuitTest.java | 2 +- .../study/server/StateEstimationTest.java | 2 +- .../StudyControllerDynamicSimulationTest.java | 2 +- .../org/gridsuite/study/server/StudyTest.java | 2 +- .../study/server/VoltageInitTest.java | 2 +- 13 files changed, 35 insertions(+), 33 deletions(-) diff --git a/src/main/java/org/gridsuite/study/server/StudyConstants.java b/src/main/java/org/gridsuite/study/server/StudyConstants.java index e8e67afa8..2efae5f70 100644 --- a/src/main/java/org/gridsuite/study/server/StudyConstants.java +++ b/src/main/java/org/gridsuite/study/server/StudyConstants.java @@ -69,6 +69,7 @@ private StudyConstants() { public static final String HEADER_IMPORT_PARAMETERS = "importParameters"; public static final String HEADER_MESSAGE = "message"; public static final String HEADER_USER_ID = "userId"; + public static final String HEADER_ERROR_MESSAGE = "x-exception-message"; public static final String QUERY_PARAM_ONLY_STASHED = "onlyStashed"; public static final String QUERY_PARAM_STASHED = "stashed"; public static final String QUERY_PARAM_ACTIVATED = "activated"; diff --git a/src/main/java/org/gridsuite/study/server/service/ConsumerService.java b/src/main/java/org/gridsuite/study/server/service/ConsumerService.java index acd9b131b..f719f9570 100644 --- a/src/main/java/org/gridsuite/study/server/service/ConsumerService.java +++ b/src/main/java/org/gridsuite/study/server/service/ConsumerService.java @@ -11,6 +11,7 @@ import com.fasterxml.jackson.databind.ObjectMapper; import org.apache.commons.lang3.StringUtils; import org.apache.logging.log4j.util.Strings; +import org.gridsuite.study.server.StudyConstants; import org.gridsuite.study.server.dto.*; import org.gridsuite.study.server.dto.caseimport.CaseImportAction; import org.gridsuite.study.server.dto.caseimport.CaseImportReceiver; @@ -164,7 +165,7 @@ public Consumer> consumeBuildFailed() { // send notification UUID studyUuid = networkModificationTreeService.getStudyUuidForNodeId(receiverObj.getNodeUuid()); - notificationService.emitNodeBuildFailed(studyUuid, receiverObj.getNodeUuid(), message.getHeaders().get(HEADER_MESSAGE, String.class)); + notificationService.emitNodeBuildFailed(studyUuid, receiverObj.getNodeUuid(), message.getHeaders().get(StudyConstants.HEADER_ERROR_MESSAGE, String.class)); } catch (JsonProcessingException e) { LOGGER.error(e.toString()); } @@ -409,7 +410,7 @@ public Consumer> consumeCaseImportFailed() { */ public void consumeCalculationFailed(Message msg, ComputationType computationType) { String receiver = msg.getHeaders().get(HEADER_RECEIVER, String.class); - String errorMessage = msg.getHeaders().get(HEADER_MESSAGE, String.class); + String errorMessage = msg.getHeaders().get(StudyConstants.HEADER_ERROR_MESSAGE, String.class); String userId = msg.getHeaders().get(HEADER_USER_ID, String.class); UUID resultUuid = null; // resultUuid is only used for the voltage initialization computation, I don't know why diff --git a/src/main/resources/config/application.yaml b/src/main/resources/config/application.yaml index d446338eb..59c5014fe 100644 --- a/src/main/resources/config/application.yaml +++ b/src/main/resources/config/application.yaml @@ -3,7 +3,6 @@ spring: name: study-server main: allow-circular-references: true - cloud: function: definition: "consumeSaResult;consumeSaStopped;consumeSaFailed;consumeSaCancelFailed;\ @@ -32,8 +31,8 @@ spring: destination: ${powsybl-ws.rabbitmq.destination.prefix:}sa.cancelfailed group: studySaCancelFailedGroup consumeSaFailed-in-0: - destination: ${powsybl-ws.rabbitmq.destination.prefix:}sa.failed - group: studySaFailedGroup + destination: ${powsybl-ws.rabbitmq.destination.prefix:}sa.run.dlx + group: dlq consumeDsResult-in-0: destination: ${powsybl-ws.rabbitmq.destination.prefix:}ds.result group: studyDsResultGroup @@ -41,8 +40,8 @@ spring: destination: ${powsybl-ws.rabbitmq.destination.prefix:}ds.stopped group: studyDsStoppedGroup consumeDsFailed-in-0: - destination: ${powsybl-ws.rabbitmq.destination.prefix:}ds.failed - group: studyDsFailedGroup + destination: ${powsybl-ws.rabbitmq.destination.prefix:}ds.run.dlx + group: dlq consumeBuildResult-in-0: destination: ${powsybl-ws.rabbitmq.destination.prefix:}build.result group: studyBuildResultGroup @@ -50,8 +49,8 @@ spring: destination: ${powsybl-ws.rabbitmq.destination.prefix:}build.stopped group: studyBuildStoppedGroup consumeBuildFailed-in-0: - destination: ${powsybl-ws.rabbitmq.destination.prefix:}build.failed - group: studyBuildFailedGroup + destination: ${powsybl-ws.rabbitmq.destination.prefix:}build.run.dlx + group: dlq consumeLoadFlowResult-in-0: destination: ${powsybl-ws.rabbitmq.destination.prefix:}loadflow.result group: studyLoadFlowResultGroup @@ -59,8 +58,8 @@ spring: destination: ${powsybl-ws.rabbitmq.destination.prefix:}loadflow.stopped group: studyLoadFlowStoppedGroup consumeLoadFlowFailed-in-0: - destination: ${powsybl-ws.rabbitmq.destination.prefix:}loadflow.failed - group: studyLoadFlowFailedGroup + destination: ${powsybl-ws.rabbitmq.destination.prefix:}loadflow.run.dlx + group: dlq consumeLoadFlowCancelFailed-in-0: destination: ${powsybl-ws.rabbitmq.destination.prefix:}loadflow.cancelfailed group: studyLoadFlowCancelFailedGroup @@ -71,8 +70,8 @@ spring: destination: ${powsybl-ws.rabbitmq.destination.prefix:}sensitivityanalysis.stopped group: studySensitivityAnalysisStoppedGroup consumeSensitivityAnalysisFailed-in-0: - destination: ${powsybl-ws.rabbitmq.destination.prefix:}sensitivityanalysis.failed - group: studySensitivityAnalysisFailedGroup + destination: ${powsybl-ws.rabbitmq.destination.prefix:}sensitivityanalysis.run.dlx + group: dlq consumeSensitivityAnalysisCancelFailed-in-0: destination: ${powsybl-ws.rabbitmq.destination.prefix:}sensitivityanalysis.cancelfailed group: studySensitivityAnalysisCancelFailedGroup @@ -83,8 +82,8 @@ spring: destination: ${powsybl-ws.rabbitmq.destination.prefix:}nonEvacuatedEnergy.stopped group: studyNonEvacuatedEnergyStoppedGroup consumeNonEvacuatedEnergyFailed-in-0: - destination: ${powsybl-ws.rabbitmq.destination.prefix:}nonEvacuatedEnergy.failed - group: studyNonEvacuatedEnergyFailedGroup + destination: ${powsybl-ws.rabbitmq.destination.prefix:}nonEvacuatedEnergy.run.dlx + group: dlq consumeNonEvacuatedEnergyCancelFailed-in-0: destination: ${powsybl-ws.rabbitmq.destination.prefix:}nonEvacuatedEnergy.cancelfailed group: studyNonEvacuatedEnergyCancelFailedGroup @@ -95,8 +94,8 @@ spring: destination: ${powsybl-ws.rabbitmq.destination.prefix:}shortcircuitanalysis.stopped group: studyShortCircuitAnalysisStoppedGroup consumeShortCircuitAnalysisFailed-in-0: - destination: ${powsybl-ws.rabbitmq.destination.prefix:}shortcircuitanalysis.failed - group: studyShortCircuitAnalysisFailedGroup + destination: ${powsybl-ws.rabbitmq.destination.prefix:}shortcircuitanalysis.run.dlx + group: dlq consumeShortCircuitAnalysisCancelFailed-in-0: destination: ${powsybl-ws.rabbitmq.destination.prefix:}shortcircuitanalysis.cancelfailed group: studyShortCircuitAnalysisCancelFailedGroup @@ -107,8 +106,8 @@ spring: destination: ${powsybl-ws.rabbitmq.destination.prefix:}voltageinit.stopped group: studyVoltageInitStoppedGroup consumeVoltageInitFailed-in-0: - destination: ${powsybl-ws.rabbitmq.destination.prefix:}voltageinit.failed - group: studyVoltageInitFailedGroup + destination: ${powsybl-ws.rabbitmq.destination.prefix:}voltageinit.run.dlx + group: dlq consumeVoltageInitCancelFailed-in-0: destination: ${powsybl-ws.rabbitmq.destination.prefix:}voltageinit.cancelfailed group: studyVoltageInitCancelFailedGroup @@ -119,14 +118,14 @@ spring: destination: ${powsybl-ws.rabbitmq.destination.prefix:}stateestimation.stopped group: studyStateEstimationStoppedGroup consumeStateEstimationFailed-in-0: - destination: ${powsybl-ws.rabbitmq.destination.prefix:}stateestimation.failed - group: studyStateEstimationFailedGroup + destination: ${powsybl-ws.rabbitmq.destination.prefix:}stateestimation.run.dlx + group: dlq consumeCaseImportSucceeded-in-0: destination: ${powsybl-ws.rabbitmq.destination.prefix:}case.import.succeeded group: studyCaseImportSucceededGroup consumeCaseImportFailed-in-0: - destination: ${powsybl-ws.rabbitmq.destination.prefix:}case.import.failed - group: studyCaseImportFailedGroup + destination: ${powsybl-ws.rabbitmq.destination.prefix:}case.import.start.dlx + group: dlq output-bindings: publishStudyUpdate-out-0;publishElementUpdate-out-0 powsybl: diff --git a/src/test/java/org/gridsuite/study/server/LoadFlowTest.java b/src/test/java/org/gridsuite/study/server/LoadFlowTest.java index 870647602..02e580c30 100644 --- a/src/test/java/org/gridsuite/study/server/LoadFlowTest.java +++ b/src/test/java/org/gridsuite/study/server/LoadFlowTest.java @@ -141,7 +141,7 @@ class LoadFlowTest { private static final String ELEMENT_UPDATE_DESTINATION = "element.update"; private static final String LOADFLOW_RESULT_DESTINATION = "loadflow.result"; private static final String LOADFLOW_STOPPED_DESTINATION = "loadflow.stopped"; - private static final String LOADFLOW_FAILED_DESTINATION = "loadflow.failed"; + private static final String LOADFLOW_FAILED_DESTINATION = "loadflow.run.dlx"; @Autowired private MockMvc mockMvc; diff --git a/src/test/java/org/gridsuite/study/server/NetworkModificationTest.java b/src/test/java/org/gridsuite/study/server/NetworkModificationTest.java index 7ecd342c7..9258399ca 100644 --- a/src/test/java/org/gridsuite/study/server/NetworkModificationTest.java +++ b/src/test/java/org/gridsuite/study/server/NetworkModificationTest.java @@ -71,6 +71,7 @@ import java.util.*; import static com.github.tomakehurst.wiremock.core.WireMockConfiguration.wireMockConfig; +import static org.gridsuite.study.server.StudyConstants.HEADER_ERROR_MESSAGE; import static org.gridsuite.study.server.StudyConstants.QUERY_PARAM_RECEIVER; import static org.gridsuite.study.server.utils.ImpactUtils.createModificationResultWithElementImpact; import static org.gridsuite.study.server.utils.MatcherCreatedStudyBasicInfos.createMatcherCreatedStudyBasicInfos; @@ -263,7 +264,7 @@ void setup(final MockWebServer server) { .withPostServeAction(POST_ACTION_SEND_INPUT, Map.of("payload", DEFAULT_BUILD_RESULT, "destination", "build.result")) .willReturn(WireMock.ok())).getId(); buildFailedStubId = wireMockServer.stubFor(WireMock.post(WireMock.urlPathEqualTo("/v1/networks/" + NETWORK_UUID_2_STRING + "/build")) - .withPostServeAction(POST_ACTION_SEND_INPUT, Map.of("payload", "", "destination", "build.failed", "message", ERROR_MESSAGE)) + .withPostServeAction(POST_ACTION_SEND_INPUT, Map.of("payload", "", "destination", "build.run.dlx", HEADER_ERROR_MESSAGE, ERROR_MESSAGE)) .willReturn(WireMock.ok())).getId(); buildErrorStubId = wireMockServer.stubFor(WireMock.post(WireMock.urlPathEqualTo("/v1/networks/" + NETWORK_UUID_3_STRING + "/build")) .willReturn(WireMock.serverError())).getId(); diff --git a/src/test/java/org/gridsuite/study/server/NonEvacuatedEnergyTest.java b/src/test/java/org/gridsuite/study/server/NonEvacuatedEnergyTest.java index 215759173..c5bb49c84 100644 --- a/src/test/java/org/gridsuite/study/server/NonEvacuatedEnergyTest.java +++ b/src/test/java/org/gridsuite/study/server/NonEvacuatedEnergyTest.java @@ -154,7 +154,7 @@ class NonEvacuatedEnergyTest { private static final String STUDY_UPDATE_DESTINATION = "study.update"; private static final String NON_EVACUATED_ENERGY_RESULT_DESTINATION = "nonEvacuatedEnergy.result"; private static final String NON_EVACUATED_ENERGY_STOPPED_DESTINATION = "nonEvacuatedEnergy.stopped"; - private static final String NON_EVACUATED_ENERGY_FAILED_DESTINATION = "nonEvacuatedEnergy.failed"; + private static final String NON_EVACUATED_ENERGY_FAILED_DESTINATION = "nonEvacuatedEnergy.run.dlx"; @Autowired private RootNetworkNodeInfoService rootNetworkNodeInfoService; @Autowired diff --git a/src/test/java/org/gridsuite/study/server/SecurityAnalysisTest.java b/src/test/java/org/gridsuite/study/server/SecurityAnalysisTest.java index 9e20f91eb..ffa017473 100644 --- a/src/test/java/org/gridsuite/study/server/SecurityAnalysisTest.java +++ b/src/test/java/org/gridsuite/study/server/SecurityAnalysisTest.java @@ -182,7 +182,7 @@ class SecurityAnalysisTest { private final String studyUpdateDestination = "study.update"; private final String saResultDestination = "sa.result"; private final String saStoppedDestination = "sa.stopped"; - private final String saFailedDestination = "sa.failed"; + private final String saFailedDestination = "sa.run.dlx"; @Autowired private RootNetworkNodeInfoService rootNetworkNodeInfoService; @Autowired diff --git a/src/test/java/org/gridsuite/study/server/SensitivityAnalysisTest.java b/src/test/java/org/gridsuite/study/server/SensitivityAnalysisTest.java index 6fbe7431a..615f4f212 100644 --- a/src/test/java/org/gridsuite/study/server/SensitivityAnalysisTest.java +++ b/src/test/java/org/gridsuite/study/server/SensitivityAnalysisTest.java @@ -179,7 +179,7 @@ class SensitivityAnalysisTest { private static final String ELEMENT_UPDATE_DESTINATION = "element.update"; private static final String SENSITIVITY_ANALYSIS_RESULT_DESTINATION = "sensitivityanalysis.result"; private static final String SENSITIVITY_ANALYSIS_STOPPED_DESTINATION = "sensitivityanalysis.stopped"; - private static final String SENSITIVITY_ANALYSIS_FAILED_DESTINATION = "sensitivityanalysis.failed"; + private static final String SENSITIVITY_ANALYSIS_FAILED_DESTINATION = "sensitivityanalysis.run.dlx"; private static final byte[] SENSITIVITY_RESULTS_AS_CSV = {0x00, 0x01}; diff --git a/src/test/java/org/gridsuite/study/server/ShortCircuitTest.java b/src/test/java/org/gridsuite/study/server/ShortCircuitTest.java index 59f1119e3..c8ae15b17 100644 --- a/src/test/java/org/gridsuite/study/server/ShortCircuitTest.java +++ b/src/test/java/org/gridsuite/study/server/ShortCircuitTest.java @@ -166,7 +166,7 @@ class ShortCircuitTest implements WithAssertions { private final String elementUpdateDestination = "element.update"; private final String shortCircuitAnalysisResultDestination = "shortcircuitanalysis.result"; private final String shortCircuitAnalysisStoppedDestination = "shortcircuitanalysis.stopped"; - private final String shortCircuitAnalysisFailedDestination = "shortcircuitanalysis.failed"; + private final String shortCircuitAnalysisFailedDestination = "shortcircuitanalysis.run.dlx"; @Autowired private StudyService studyService; diff --git a/src/test/java/org/gridsuite/study/server/StateEstimationTest.java b/src/test/java/org/gridsuite/study/server/StateEstimationTest.java index b98ec4e23..71cc6f2e8 100644 --- a/src/test/java/org/gridsuite/study/server/StateEstimationTest.java +++ b/src/test/java/org/gridsuite/study/server/StateEstimationTest.java @@ -100,7 +100,7 @@ class StateEstimationTest { private static final String STUDY_UPDATE_DESTINATION = "study.update"; private static final String ESTIM_RESULT_JSON_DESTINATION = "stateestimation.result"; private static final String ESTIM_STOPPED_DESTINATION = "stateestimation.stopped"; - private static final String ESTIM_FAILED_DESTINATION = "stateestimation.failed"; + private static final String ESTIM_FAILED_DESTINATION = "stateestimation.run.dlx"; @Autowired private MockMvc mockMvc; diff --git a/src/test/java/org/gridsuite/study/server/StudyControllerDynamicSimulationTest.java b/src/test/java/org/gridsuite/study/server/StudyControllerDynamicSimulationTest.java index 6987a9079..152ff5a75 100644 --- a/src/test/java/org/gridsuite/study/server/StudyControllerDynamicSimulationTest.java +++ b/src/test/java/org/gridsuite/study/server/StudyControllerDynamicSimulationTest.java @@ -202,7 +202,7 @@ class StudyControllerDynamicSimulationTest { private static final String STUDY_UPDATE_DESTINATION = "study.update"; private static final String DS_RESULT_DESTINATION = "ds.result"; private static final String DS_STOPPED_DESTINATION = "ds.stopped"; - private static final String DS_FAILED_DESTINATION = "ds.failed"; + private static final String DS_FAILED_DESTINATION = "ds.run.dlx"; @BeforeEach public void setup() { diff --git a/src/test/java/org/gridsuite/study/server/StudyTest.java b/src/test/java/org/gridsuite/study/server/StudyTest.java index 77c1eeaf2..3daf74d98 100644 --- a/src/test/java/org/gridsuite/study/server/StudyTest.java +++ b/src/test/java/org/gridsuite/study/server/StudyTest.java @@ -676,7 +676,7 @@ private void sendCaseImportFailedMessage(String requestPath, String errorMessage String receiverUrlString = matcher.group(1); input.send(MessageBuilder.withPayload("").setHeader("receiver", URLDecoder.decode(receiverUrlString, StandardCharsets.UTF_8)) .setHeader("errorMessage", errorMessage) - .build(), "case.import.failed"); + .build(), "case.import.start.dlx"); } } diff --git a/src/test/java/org/gridsuite/study/server/VoltageInitTest.java b/src/test/java/org/gridsuite/study/server/VoltageInitTest.java index 318edc5a1..7e055ddda 100644 --- a/src/test/java/org/gridsuite/study/server/VoltageInitTest.java +++ b/src/test/java/org/gridsuite/study/server/VoltageInitTest.java @@ -223,7 +223,7 @@ class VoltageInitTest { private final String studyUpdateDestination = "study.update"; private final String voltageInitResultDestination = "voltageinit.result"; private final String voltageInitStoppedDestination = "voltageinit.stopped"; - private final String voltageInitFailedDestination = "voltageinit.failed"; + private final String voltageInitFailedDestination = "voltageinit.run.dlx"; private final String voltageInitCancelFailedDestination = "voltageinit.cancelfailed"; private final String elementUpdateDestination = "element.update"; @Autowired