Skip to content

Commit 2ec29e9

Browse files
Merge branch 'main' into extract-specification-system
2 parents 231bf0e + f03b2ff commit 2ec29e9

File tree

9 files changed

+42
-15
lines changed

9 files changed

+42
-15
lines changed

.github/workflows/build.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ on:
88

99
jobs:
1010
build:
11-
uses: powsybl/github-ci/.github/workflows/build-backend-app-generic.yml@39565de6fd7d394ed76fa09e5197ffb1350ff1e6
11+
uses: powsybl/github-ci/.github/workflows/build-backend-app-generic.yml@69b162754c0728d9aeb2ea568eaf47f28f60fafb
1212
with:
1313
dockerImage: docker.io/gridsuite/security-analysis-server
1414
dockerUsername: gridsuiteci

.github/workflows/patch.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ on:
99

1010
jobs:
1111
run-patch:
12-
uses: powsybl/github-ci/.github/workflows/patch-backend-app-generic.yml@39565de6fd7d394ed76fa09e5197ffb1350ff1e6
12+
uses: powsybl/github-ci/.github/workflows/patch-backend-app-generic.yml@69b162754c0728d9aeb2ea568eaf47f28f60fafb
1313
with:
1414
githubappId: ${{ vars.GRIDSUITE_ACTIONS_APPID }}
1515
dockerImage: docker.io/gridsuite/security-analysis-server

.github/workflows/release.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ on:
1212

1313
jobs:
1414
run-release:
15-
uses: powsybl/github-ci/.github/workflows/release-backend-app-generic.yml@39565de6fd7d394ed76fa09e5197ffb1350ff1e6
15+
uses: powsybl/github-ci/.github/workflows/release-backend-app-generic.yml@69b162754c0728d9aeb2ea568eaf47f28f60fafb
1616
with:
1717
githubappId: ${{ vars.GRIDSUITE_ACTIONS_APPID }}
1818
dockerImage: docker.io/gridsuite/security-analysis-server

pom.xml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919

2020
<groupId>org.gridsuite</groupId>
2121
<artifactId>gridsuite-security-analysis-server</artifactId>
22-
<version>2.17.0-SNAPSHOT</version>
22+
<version>2.18.0-SNAPSHOT</version>
2323

2424
<packaging>jar</packaging>
2525
<name>Security analysis server</name>
@@ -43,7 +43,7 @@
4343

4444
<properties>
4545
<jib.from.image>powsybl/java-dynawo:3.0.0</jib.from.image>
46-
<gridsuite-dependencies.version>38.0.0</gridsuite-dependencies.version>
46+
<gridsuite-dependencies.version>39.0.0</gridsuite-dependencies.version>
4747
<liquibase-hibernate-package>org.gridsuite.securityanalysis.server</liquibase-hibernate-package>
4848
<db-util.version>1.0.5</db-util.version>
4949
<mockwebserver3.version>5.0.0-alpha.14</mockwebserver3.version>
Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
/**
2+
* Copyright (c) 2025, RTE (http://www.rte-france.com)
3+
* This Source Code Form is subject to the terms of the Mozilla Public
4+
* License, v. 2.0. If a copy of the MPL was not distributed with this
5+
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
6+
* SPDX-License-Identifier: MPL-2.0
7+
*/
8+
package org.gridsuite.securityanalysis.server.report;
9+
10+
import com.google.auto.service.AutoService;
11+
import com.powsybl.commons.report.ReportResourceBundle;
12+
13+
/**
14+
* @author Charly Boutier {@literal <charly.boutier at rte-france.com>}
15+
*/
16+
@AutoService(ReportResourceBundle.class)
17+
public final class SecurityAnalysisServerReportResourceBundle implements ReportResourceBundle {
18+
19+
public static final String BASE_NAME = "org.gridsuite.securityanalysis.server.reports";
20+
21+
public String getBaseName() {
22+
return BASE_NAME;
23+
}
24+
}

src/main/java/org/gridsuite/securityanalysis/server/service/SecurityAnalysisWorkerService.java

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -228,14 +228,13 @@ private static void logContingencyEquipmentsNotFound(SecurityAnalysisRunContext
228228
}
229229

230230
ReportNode elementsNotFoundSubReporter = runContext.getReportNode().newReportNode()
231-
.withMessageTemplate("notFoundEquipments", "Equipments not found")
231+
.withMessageTemplate("security.analysis.server.notFoundEquipments")
232232
.add();
233233

234234
contingencyInfosList.forEach(contingencyInfos -> {
235235
String elementsIds = String.join(", ", contingencyInfos.getNotFoundElements());
236236
elementsNotFoundSubReporter.newReportNode()
237-
.withMessageTemplate("contingencyEquipmentNotFound",
238-
"Cannot find the following equipments ${elementsIds} in contingency ${contingencyId}")
237+
.withMessageTemplate("security.analysis.server.contingencyEquipmentNotFound")
239238
.withUntypedValue("elementsIds", elementsIds)
240239
.withUntypedValue("contingencyId", contingencyInfos.getId())
241240
.withSeverity(TypedValue.WARN_SEVERITY)
@@ -252,14 +251,13 @@ private void logContingencyEquipmentsNotConnected(SecurityAnalysisRunContext run
252251
}
253252

254253
ReportNode elementsNotConnectedSubReporter = runContext.getReportNode().newReportNode()
255-
.withMessageTemplate("notConnectedEquipments", "Equipments not connected")
254+
.withMessageTemplate("security.analysis.server.notConnectedEquipments")
256255
.add();
257256

258257
contingencyInfosList.forEach(contingencyInfos -> {
259258
String elementsIds = String.join(", ", contingencyInfos.getNotConnectedElements());
260259
elementsNotConnectedSubReporter.newReportNode()
261-
.withMessageTemplate("contingencyEquipmentNotConnected",
262-
"The following equipments ${elementsIds} in contingency ${contingencyId} are not connected")
260+
.withMessageTemplate("security.analysis.server.contingencyEquipmentNotConnected")
263261
.withUntypedValue("elementsIds", elementsIds)
264262
.withUntypedValue("contingencyId", contingencyInfos.getId())
265263
.withSeverity(TypedValue.WARN_SEVERITY)
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
security.analysis.server.notFoundEquipments = Equipments not found
2+
security.analysis.server.contingencyEquipmentNotFound = Cannot find the following equipments ${elementsIds} in contingency ${contingencyId}
3+
security.analysis.server.notConnectedEquipments = Equipments not connected
4+
security.analysis.server.contingencyEquipmentNotConnected = The following equipments ${elementsIds} in contingency ${contingencyId} are not connected
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+

src/test/java/org/gridsuite/securityanalysis/server/SecurityAnalysisControllerTest.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -722,11 +722,11 @@ void runWithReportTestElementsNotFoundAndNotConnected() throws Exception {
722722
SecurityAnalysisResult securityAnalysisResult = mapper.readValue(resultAsString, SecurityAnalysisResult.class);
723723
assertThat(RESULT, new MatcherJson<>(mapper, securityAnalysisResult));
724724

725-
assertLogMessage("Equipments not found", "notFoundEquipments", reportService);
726-
assertLogMessage("Cannot find the following equipments wrongId1, wrongId2 in contingency l1", "contingencyEquipmentNotFound", reportService);
725+
assertLogMessage("Equipments not found", "security.analysis.server.notFoundEquipments", reportService);
726+
assertLogMessage("Cannot find the following equipments wrongId1, wrongId2 in contingency l1", "security.analysis.server.contingencyEquipmentNotFound", reportService);
727727

728-
assertLogMessage("Equipments not connected", "notConnectedEquipments", reportService);
729-
assertLogMessage("The following equipments notConnectedId1 in contingency l4 are not connected", "contingencyEquipmentNotConnected", reportService);
728+
assertLogMessage("Equipments not connected", "security.analysis.server.notConnectedEquipments", reportService);
729+
assertLogMessage("The following equipments notConnectedId1 in contingency l4 are not connected", "security.analysis.server.contingencyEquipmentNotConnected", reportService);
730730
}
731731

732732
@Test

0 commit comments

Comments
 (0)