Skip to content

Add services to study-light profile, add depends on#618

Open
antoinebhs wants to merge 22 commits into
mainfrom
add-to-profiles
Open

Add services to study-light profile, add depends on#618
antoinebhs wants to merge 22 commits into
mainfrom
add-to-profiles

Conversation

@antoinebhs

@antoinebhs antoinebhs commented May 11, 2026

Copy link
Copy Markdown
Contributor

PR Summary

This PR introduces a dedicated study-light profile and makes that profile usable with the set of services GridStudy/GridExplore actually need.
It also improve docker startup order and lower the memory footprint of the local deployment.

antoinebhs and others added 20 commits April 15, 2026 10:00
Signed-off-by: LE SAULNIER Kevin <[email protected]>
Signed-off-by: BOUHOURS Antoine <[email protected]>
Signed-off-by: BOUHOURS Antoine <[email protected]>
Signed-off-by: BOUHOURS Antoine <[email protected]>
Signed-off-by: BOUHOURS Antoine <[email protected]>
Signed-off-by: BOUHOURS Antoine <[email protected]>
Signed-off-by: BOUHOURS Antoine <[email protected]>
Signed-off-by: BOUHOURS Antoine <[email protected]>
Signed-off-by: BOUHOURS Antoine <[email protected]>
Signed-off-by: BOUHOURS Antoine <[email protected]>
Signed-off-by: BOUHOURS Antoine <[email protected]>
@coderabbitai

coderabbitai Bot commented May 11, 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: c4dd2135-cf6b-41c0-81bf-89e215aa72d6

📥 Commits

Reviewing files that changed from the base of the PR and between 2d3d31e and dfaa733.

📒 Files selected for processing (4)
  • README.md
  • docker-compose/docker-compose.base.yml
  • docker-compose/study-light/.env
  • docker-compose/study/docker-compose.study.yml
💤 Files with no reviewable changes (1)
  • docker-compose/study-light/.env

📝 Walkthrough

Walkthrough

This PR adds healthchecks for infrastructure services, gates many application services on healthy upstreams, reduces JVM/container memory settings across compose files, and introduces a study-light profile with a .env and include-based compose entry.

Changes

Health Checks and Service Dependencies

Layer / File(s) Summary
Infrastructure Health Checks
docker-compose/technical/docker-compose.technical.yml
RabbitMQ, Postgres, Elasticsearch, and MinIO receive healthcheck probes; downstream services (postgres-exporter, elasticsearch-exporter, kibana, logstash, pgadmin) switch to service_healthy dependencies.
Base Services Configuration
docker-compose/docker-compose.base.yml
Removed top-level version. Base services (case-server, actions-server, filter-server, user-admin-server, study-config-server, user-identity-server, report-server, network-store-server, network-conversion-server, loadflow-server, config-server, config-notification-server) gain health-gated depends_on entries and have reduced JAVA_TOOL_OPTIONS, memswap_limit, and deploy memory limits.
Study Services Configuration
docker-compose/study/docker-compose.study.yml
Removed top-level version. Study services updated to depend on healthy postgres/elasticsearch/rabbitmq/s3-storage where applicable; many JVM and container memory limits lowered; gridstudy-app adds study-light profile.
Monitor Services Configuration
docker-compose/monitor/docker-compose.monitor.yml
Removed top-level version. monitor-server and worker servers now depend on healthy postgres, s3-storage, and rabbitmq; worker -Xmx and memory limits reduced.
Dynamic Mapping Services Configuration
docker-compose/dynamic-mapping/docker-compose.dynamic-mapping.yml
Removed top-level version. dynamic-mapping-server now depends on postgres service_healthy; -Xmx and container memory limits reduced.

Study-Light Profile Composition

Layer / File(s) Summary
Study-Light Profile Configuration
docker-compose/study-light/.env, docker-compose/study-light/docker-compose.yml
New .env configures COMPOSE_PROJECT_NAME, COMPOSE_PROFILES, and lines-catalog init flag. New compose file includes ../docker-compose.base.yml, ../technical/docker-compose.technical.yml, and ../study/docker-compose.study.yml.

Documentation Updates

Layer / File(s) Summary
Deployment Guidance and Profile Documentation
README.md
Application profiles note clarified to point to the profiles documentation for non-folder-associated profiles; added explicit cd + docker compose up example for docker-compose/study-light; services-by-profile table rewritten to reflect updated service coverage.

Suggested reviewers

  • EtienneLt
🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The title accurately describes the main changes: adding the study-light profile to services and improving Docker startup ordering with depends_on configurations.
Description check ✅ Passed The description is clearly related to the changeset, explaining the introduction of the study-light profile, improved Docker startup order, and reduced memory footprint.
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.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.


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 and usage tips.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 5

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (1)
docker-compose/study/docker-compose.study.yml (1)

280-302: ⚠️ Potential issue | 🟡 Minor | ⚡ Quick win

Verify that UI gracefully handles missing backends or add services to study-light.

gridstudy-app is now in the study-light profile, but several analysis and calculation servers remain outside it: geo-data-server, cgmes-gl-server, odre-server, security-analysis-server, sensitivity-analysis-server, shortcircuit-server, voltage-init-server, and timeseries-server. If the UI exposes features that call these services, users will encounter errors rather than disabled menu items. Either confirm the light variant intentionally omits these features, or perform a functional smoke test to verify graceful degradation.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@docker-compose/study/docker-compose.study.yml` around lines 280 - 302, The UI
container gridstudy-app was added to the study-light profile while backend
services (geo-data-server, cgmes-gl-server, odre-server,
security-analysis-server, sensitivity-analysis-server, shortcircuit-server,
voltage-init-server, timeseries-server) remain outside that profile, which can
cause runtime UI errors; either add the missing services to the study-light
profile in docker-compose.study.yml so the light profile includes those backend
services, or modify the UI (gridstudy-app) to detect and gracefully disable/hide
features that call those specific services (check client-side code that
references those service endpoints) and implement fallbacks/error-handling for
absent backends. Ensure you update service profiles for each listed service or
add feature-gating in the UI code paths that call endpoints for geo-data-server,
cgmes-gl-server, odre-server, security-analysis-server,
sensitivity-analysis-server, shortcircuit-server, voltage-init-server, and
timeseries-server.
🧹 Nitpick comments (4)
docker-compose/technical/docker-compose.technical.yml (2)

9-13: ⚡ Quick win

Consider adding start_period to healthchecks.

The healthchecks have retries: 10 with interval: 10s (≈100s tolerance), but no start_period. During slow boots (e.g., Postgres running init-databases.sh to bootstrap geo data / lines catalog, or Elasticsearch cluster bootstrap), early probe failures will count toward retries, which can flap dependent services that rely on condition: service_healthy. A start_period (e.g., 30s60s) prevents early failures from being counted.

🛠️ Example for postgres
     healthcheck:
       test: ["CMD-SHELL", "pg_isready -U $$POSTGRES_USER -d $$POSTGRES_DEFAULT_DB"]
       interval: 10s
       timeout: 5s
       retries: 10
+      start_period: 30s

Also applies to: 51-55, 88-92, 192-196

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@docker-compose/technical/docker-compose.technical.yml` around lines 9 - 13,
The RabbitMQ healthcheck block (healthcheck with test: ["CMD-SHELL",
"rabbitmq-diagnostics ping"]) currently uses interval and retries but no
start_period, so add a start_period (e.g., start_period: 30s–60s) to that
healthcheck so early boot failures aren’t counted toward retries; apply the same
change to the other healthcheck blocks referenced (the ones using healthcheck,
interval, timeout, retries) to ensure dependent services using condition:
service_healthy don’t flap during slow initialization.

192-196: ⚡ Quick win

Use mc ready local for the healthcheck probe.

The current curl-based healthcheck works (curl is present in the image), but MinIO's official guidance recommends ["CMD", "mc", "ready", "local"] instead. This is more reliable as it directly checks local node readiness without depending on HTTP endpoints.

Consider updating line 193 to:

test: ["CMD", "mc", "ready", "local"]
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@docker-compose/technical/docker-compose.technical.yml` around lines 192 -
196, The healthcheck currently uses a curl-based probe in the healthcheck.test
block which relies on HTTP and is less reliable; replace the test command to use
MinIO's CLI readiness check by switching the healthcheck.test from the curl
invocation to use mc ready local (i.e., update the healthcheck.test entry to
call ["CMD", "mc", "ready", "local"]); ensure the healthcheck section
(healthcheck.test, interval, timeout, retries) remains intact and that the
container image includes the mc binary so mc ready can run successfully.
README.md (1)

96-113: 💤 Low value

Profile/service matrix is hard to scan — consider stable row ordering.

The table mixes per-row multi-service grouping with single-service rows, and the grouping criterion is the matching profile set. Two small polish items:

  • The rows aren’t alphabetized within each grouping (e.g., line 108 lists directory-notification-server<br>explore-server<br>gridexplore-app<br>... which is correct, but other rows like line 112 start with apps-metadata-server<br>case-server<br>... ordering — make sure ordering is consistent across rows so reviewers can diff quickly).
  • A study-light column was added; consider adding a leading legend row (e.g., what (none) means vs blank cells in newly added profiles) so the asymmetry between (none) getting only on the infra row (line 113) and other rows being blank is explicit.
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@README.md` around lines 96 - 113, The profile/service matrix is hard to scan
because grouped cell lists are inconsistently ordered and the meaning of the
“_(none)_” column vs blank cells is unclear; fix by alphabetizing service names
within each multi-service row (e.g., rows containing
directory-notification-server, explore-server, gridexplore-app, gridstudy-app,
network-map-server, single-line-diagram-server, study-notification-server,
study-server) to a stable lexical order and ensure all grouped rows follow the
same ordering rule, and add a leading legend row above the table that explains
the “_(none)_” column vs empty cells (and confirm the infra row with
elasticsearch/postgres/rabbitmq/s3-storage retains the ✅ under “_(none)_” if
that denotes required infra).
docker-compose/docker-compose.base.yml (1)

317-321: 💤 Low value

Quote unit-suffixed memory limits to avoid YAML/Compose ambiguity.

memswap_limit: 1g, memory: 1g, and the new 1280m values are written unquoted. Docker Compose accepts these, but mixing quoted ("512m") and unquoted forms across the same file is inconsistent and historically has bitten teams when a value like 1g (with a trailing space, as on line 317/321) is parsed by older toolchains. Quoting them as strings ("1g", "1280m") is the documented form and removes the trailing-space risk visible here.

Docker Compose memswap_limit and deploy.resources.limits.memory accepted formats and trailing whitespace handling

Also applies to: 354-358, 279-283

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@docker-compose/docker-compose.base.yml` around lines 317 - 321, Update the
YAML to quote all unit-suffixed memory values to avoid parsing ambiguity: change
occurrences of memswap_limit and deploy.resources.limits.memory (and any other
memory keys like those at the other noted blocks) from unquoted forms such as
1g, 1280m or 512m to quoted strings like "1g" and "1280m", ensuring no trailing
spaces remain inside the quotes; apply this to the memswap_limit and
deploy.resources.limits.memory entries referenced in the diff and the other
blocks called out.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@docker-compose/docker-compose.base.yml`:
- Around line 377-381: The docker-compose.services for config-server and
config-notification-server unintentionally lost the optional logspout ordering
dependency; restore a depends_on entry mirroring other services by adding a
logspout: { condition: service_started, required: false } under the existing
depends_on block for both config-server and config-notification-server (look for
the depends_on: postgres/rabbitmq blocks in docker-compose.base.yml and add the
logspout entry similarly, and apply the same fix at the other occurrence
referenced around lines ~409-411).
- Around line 18-29: The depends_on entry for rabbitmq under the case-server
service is too strict; remove or relax it so case-server startup isn't blocked
by transient RabbitMQ issues: locate the depends_on block for the case-server
service (the rabbitmq sub-entry) and either remove the rabbitmq dependency
entirely, or change its condition from service_healthy to "service_started" and
add required: false; alternatively verify in case-server application config
(case-server-application.yml) and code that it actually binds to Spring Cloud
Stream at boot—if it does, keep the dependency but document why it's needed.

In `@docker-compose/study-light/.env`:
- Line 1: The env flag SHOULD_INIT_GEO_DATA is enabling geo-data initialization
even though the geo-data-server service is excluded from the study-light
profile; either set SHOULD_INIT_GEO_DATA=false in the study-light .env to
prevent Postgres from loading unused geo data, or add the geo-data-server
service to the study-light profile in your docker-compose study configuration so
the data loading is actually served; locate the SHOULD_INIT_GEO_DATA entry in
the study-light .env and the geo-data-server service definition/profile key
(profile "study-light") in the docker-compose study compose file to apply one of
these two fixes.

In `@docker-compose/study/docker-compose.study.yml`:
- Around line 350-356: The three services dynamic-simulation-server,
dynamic-security-analysis-server, and dynamic-margin-calculation-server dropped
the optional logspout ordering hint; restore a depends_on entry for logspout
with condition: service_started and required: false for each of these services
(i.e., add the same "logspout: { condition: service_started, required: false }"
block alongside the existing postgres/s3-storage/rabbitmq depends_on entries) so
their startup ordering matches the other study services.

In `@README.md`:
- Line 60: The in-page anchor in the sentence containing "profiles as explained
in the [next section](`#docker-compose-profiles`)" doesn't match the header text
"### Docker-compose with profiles"; update the link target to the correct anchor
`#docker-compose-with-profiles` (or alternatively rename the header to
"Docker-compose with profiles" -> "Docker-compose profiles" to match
`#docker-compose-profiles`) so the link points to the actual "Docker-compose
with profiles" section; locate the link text in README.md and adjust the anchor
or the header text accordingly.

---

Outside diff comments:
In `@docker-compose/study/docker-compose.study.yml`:
- Around line 280-302: The UI container gridstudy-app was added to the
study-light profile while backend services (geo-data-server, cgmes-gl-server,
odre-server, security-analysis-server, sensitivity-analysis-server,
shortcircuit-server, voltage-init-server, timeseries-server) remain outside that
profile, which can cause runtime UI errors; either add the missing services to
the study-light profile in docker-compose.study.yml so the light profile
includes those backend services, or modify the UI (gridstudy-app) to detect and
gracefully disable/hide features that call those specific services (check
client-side code that references those service endpoints) and implement
fallbacks/error-handling for absent backends. Ensure you update service profiles
for each listed service or add feature-gating in the UI code paths that call
endpoints for geo-data-server, cgmes-gl-server, odre-server,
security-analysis-server, sensitivity-analysis-server, shortcircuit-server,
voltage-init-server, and timeseries-server.

---

Nitpick comments:
In `@docker-compose/docker-compose.base.yml`:
- Around line 317-321: Update the YAML to quote all unit-suffixed memory values
to avoid parsing ambiguity: change occurrences of memswap_limit and
deploy.resources.limits.memory (and any other memory keys like those at the
other noted blocks) from unquoted forms such as 1g, 1280m or 512m to quoted
strings like "1g" and "1280m", ensuring no trailing spaces remain inside the
quotes; apply this to the memswap_limit and deploy.resources.limits.memory
entries referenced in the diff and the other blocks called out.

In `@docker-compose/technical/docker-compose.technical.yml`:
- Around line 9-13: The RabbitMQ healthcheck block (healthcheck with test:
["CMD-SHELL", "rabbitmq-diagnostics ping"]) currently uses interval and retries
but no start_period, so add a start_period (e.g., start_period: 30s–60s) to that
healthcheck so early boot failures aren’t counted toward retries; apply the same
change to the other healthcheck blocks referenced (the ones using healthcheck,
interval, timeout, retries) to ensure dependent services using condition:
service_healthy don’t flap during slow initialization.
- Around line 192-196: The healthcheck currently uses a curl-based probe in the
healthcheck.test block which relies on HTTP and is less reliable; replace the
test command to use MinIO's CLI readiness check by switching the
healthcheck.test from the curl invocation to use mc ready local (i.e., update
the healthcheck.test entry to call ["CMD", "mc", "ready", "local"]); ensure the
healthcheck section (healthcheck.test, interval, timeout, retries) remains
intact and that the container image includes the mc binary so mc ready can run
successfully.

In `@README.md`:
- Around line 96-113: The profile/service matrix is hard to scan because grouped
cell lists are inconsistently ordered and the meaning of the “_(none)_” column
vs blank cells is unclear; fix by alphabetizing service names within each
multi-service row (e.g., rows containing directory-notification-server,
explore-server, gridexplore-app, gridstudy-app, network-map-server,
single-line-diagram-server, study-notification-server, study-server) to a stable
lexical order and ensure all grouped rows follow the same ordering rule, and add
a leading legend row above the table that explains the “_(none)_” column vs
empty cells (and confirm the infra row with
elasticsearch/postgres/rabbitmq/s3-storage retains the ✅ under “_(none)_” if
that denotes required infra).
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: e7a6c336-64ae-4296-bc3d-30b31869cd6e

📥 Commits

Reviewing files that changed from the base of the PR and between 359fc74 and 0a17fb2.

📒 Files selected for processing (8)
  • README.md
  • docker-compose/docker-compose.base.yml
  • docker-compose/dynamic-mapping/docker-compose.dynamic-mapping.yml
  • docker-compose/monitor/docker-compose.monitor.yml
  • docker-compose/study-light/.env
  • docker-compose/study-light/docker-compose.yml
  • docker-compose/study/docker-compose.study.yml
  • docker-compose/technical/docker-compose.technical.yml

Comment thread docker-compose/docker-compose.base.yml
Comment thread docker-compose/docker-compose.base.yml
Comment thread docker-compose/study-light/.env Outdated
Comment thread docker-compose/study/docker-compose.study.yml
Comment thread README.md Outdated
Signed-off-by: BOUHOURS Antoine <[email protected]>
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.

2 participants