diff --git a/pom.xml b/pom.xml
index f5cba19..3347660 100644
--- a/pom.xml
+++ b/pom.xml
@@ -18,7 +18,7 @@
powsybl-ws-commons
- 1.14.0-SNAPSHOT
+ 1.14.0
powsybl ws commons
Powsybl WS commons
diff --git a/src/main/java/com/powsybl/ws/commons/computation/service/AbstractWorkerService.java b/src/main/java/com/powsybl/ws/commons/computation/service/AbstractWorkerService.java
index 74f0777..3bd1155 100644
--- a/src/main/java/com/powsybl/ws/commons/computation/service/AbstractWorkerService.java
+++ b/src/main/java/com/powsybl/ws/commons/computation/service/AbstractWorkerService.java
@@ -203,13 +203,13 @@ protected R run(C runContext, UUID resultUuid, AtomicReference rootR
if (runContext.getReportInfos() != null && runContext.getReportInfos().reportUuid() != null) {
final String reportType = runContext.getReportInfos().computationType();
- String rootReporterId = runContext.getReportInfos().reporterId() == null ? reportType : runContext.getReportInfos().reporterId() + "@" + reportType;
+ String rootReporterId = runContext.getReportInfos().reporterId();
rootReporter.set(ReportNode.newRootReportNode().withMessageTemplate(rootReporterId, rootReporterId).build());
reportNode = rootReporter.get().newReportNode().withMessageTemplate(reportType, reportType + (provider != null ? " (" + provider + ")" : ""))
.withUntypedValue("providerToUse", Objects.requireNonNullElse(provider, "")).add();
// Delete any previous computation logs
observer.observe("report.delete",
- runContext, () -> reportService.deleteReport(runContext.getReportInfos().reportUuid(), reportType));
+ runContext, () -> reportService.deleteReport(runContext.getReportInfos().reportUuid()));
}
runContext.setReportNode(reportNode);
diff --git a/src/main/java/com/powsybl/ws/commons/computation/service/ReportService.java b/src/main/java/com/powsybl/ws/commons/computation/service/ReportService.java
index 92c9c2d..6d71675 100644
--- a/src/main/java/com/powsybl/ws/commons/computation/service/ReportService.java
+++ b/src/main/java/com/powsybl/ws/commons/computation/service/ReportService.java
@@ -31,7 +31,6 @@ public class ReportService {
static final String REPORT_API_VERSION = "v1";
private static final String DELIMITER = "/";
- private static final String QUERY_PARAM_REPORT_TYPE_FILTER = "reportTypeFilter";
private static final String QUERY_PARAM_REPORT_THROW_ERROR = "errorOnReportNotFound";
@Setter
private String reportServerBaseUri;
@@ -69,11 +68,10 @@ public void sendReport(UUID reportUuid, ReportNode reportNode) {
}
}
- public void deleteReport(UUID reportUuid, String reportType) {
+ public void deleteReport(UUID reportUuid) {
Objects.requireNonNull(reportUuid);
var path = UriComponentsBuilder.fromPath("{reportUuid}")
- .queryParam(QUERY_PARAM_REPORT_TYPE_FILTER, reportType)
.queryParam(QUERY_PARAM_REPORT_THROW_ERROR, false)
.buildAndExpand(reportUuid)
.toUriString();
diff --git a/src/test/java/com/powsybl/ws/commons/computation/service/ReportServiceTest.java b/src/test/java/com/powsybl/ws/commons/computation/service/ReportServiceTest.java
index 5457dcd..0b58082 100644
--- a/src/test/java/com/powsybl/ws/commons/computation/service/ReportServiceTest.java
+++ b/src/test/java/com/powsybl/ws/commons/computation/service/ReportServiceTest.java
@@ -71,19 +71,19 @@ void testSendReportFailed() {
@Test
void testDeleteReport() {
server.expect(MockRestRequestMatchers.method(HttpMethod.DELETE))
- .andExpect(MockRestRequestMatchers.requestTo("http://report-server/v1/reports/" + REPORT_UUID + "?reportTypeFilter=MockReportType&errorOnReportNotFound=false"))
+ .andExpect(MockRestRequestMatchers.requestTo("http://report-server/v1/reports/" + REPORT_UUID + "?errorOnReportNotFound=false"))
.andExpect(MockRestRequestMatchers.content().bytes(new byte[0]))
.andRespond(MockRestResponseCreators.withSuccess());
- assertThatNoException().isThrownBy(() -> reportService.deleteReport(REPORT_UUID, "MockReportType"));
+ assertThatNoException().isThrownBy(() -> reportService.deleteReport(REPORT_UUID));
}
@Test
void testDeleteReportFailed() {
server.expect(MockRestRequestMatchers.method(HttpMethod.DELETE))
- .andExpect(MockRestRequestMatchers.requestTo("http://report-server/v1/reports/" + REPORT_ERROR_UUID + "?reportTypeFilter=MockReportType&errorOnReportNotFound=false"))
+ .andExpect(MockRestRequestMatchers.requestTo("http://report-server/v1/reports/" + REPORT_ERROR_UUID + "?errorOnReportNotFound=false"))
.andExpect(MockRestRequestMatchers.content().bytes(new byte[0]))
.andRespond(MockRestResponseCreators.withServerError());
- assertThatThrownBy(() -> reportService.deleteReport(REPORT_ERROR_UUID, "MockReportType")).isInstanceOf(RestClientException.class);
+ assertThatThrownBy(() -> reportService.deleteReport(REPORT_ERROR_UUID)).isInstanceOf(RestClientException.class);
}
}