Conversation
Signed-off-by: Franck LECUYER <franck.lecuyer@rte-france.com>
📝 WalkthroughWalkthroughConfiguration property for the load flow server base URI was standardized from Changes
🚥 Pre-merge checks | ✅ 1 | ❌ 2❌ Failed checks (1 warning, 1 inconclusive)
✅ Passed checks (1 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. 📝 Coding Plan
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: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In
`@monitor-worker-server/src/main/java/org/gridsuite/monitor/worker/server/clients/LoadFlowRestClient.java`:
- Line 28: The constructor parameter loadFlowServerBaseUri in LoadFlowRestClient
currently binds only to gridsuite.services.loadflow-server.base-uri which breaks
environments using the old key gridsuite.services.load-flow-server.base-uri;
update the `@Value` binding on the constructor (or the property resolution logic
used by LoadFlowRestClient) to read from the new key first and fall back to the
legacy key, and then to the default "http://loadflow-server/" if neither is set,
ensuring both gridsuite.services.loadflow-server.base-uri and
gridsuite.services.load-flow-server.base-uri are supported; also update/add
unit/integration tests to assert that legacy-key binding still resolves
correctly.
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro
Run ID: 06730994-ac33-4829-9df8-7ab2e6125003
📒 Files selected for processing (3)
monitor-worker-server/src/main/java/org/gridsuite/monitor/worker/server/clients/LoadFlowRestClient.javamonitor-worker-server/src/main/resources/application-local.yamlmonitor-worker-server/src/test/java/org/gridsuite/monitor/worker/server/clients/LoadFlowRestClientTest.java
| public LoadFlowRestClient( | ||
| RestClient.Builder restClientBuilder, | ||
| @Value("${gridsuite.services.load-flow-server.base-uri:http://load-flow-server/}") String loadFlowServerBaseUri) { | ||
| @Value("${gridsuite.services.loadflow-server.base-uri:http://loadflow-server/}") String loadFlowServerBaseUri) { |
There was a problem hiding this comment.
Preserve backward compatibility for the renamed property key.
On Line 28, the key rename is breaking for environments still using gridsuite.services.load-flow-server.base-uri; they will silently fall back to the default URL. Please support both keys during migration (downstream impact: add/adjust tests for legacy-key binding).
Proposed backward-compatible binding
- `@Value`("${gridsuite.services.loadflow-server.base-uri:http://loadflow-server/}") String loadFlowServerBaseUri) {
+ `@Value`("${gridsuite.services.loadflow-server.base-uri:${gridsuite.services.load-flow-server.base-uri:http://loadflow-server/}}")
+ String loadFlowServerBaseUri) {🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.
In
`@monitor-worker-server/src/main/java/org/gridsuite/monitor/worker/server/clients/LoadFlowRestClient.java`
at line 28, The constructor parameter loadFlowServerBaseUri in
LoadFlowRestClient currently binds only to
gridsuite.services.loadflow-server.base-uri which breaks environments using the
old key gridsuite.services.load-flow-server.base-uri; update the `@Value` binding
on the constructor (or the property resolution logic used by LoadFlowRestClient)
to read from the new key first and fall back to the legacy key, and then to the
default "http://loadflow-server/" if neither is set, ensuring both
gridsuite.services.loadflow-server.base-uri and
gridsuite.services.load-flow-server.base-uri are supported; also update/add
unit/integration tests to assert that legacy-key binding still resolves
correctly.



PR Summary