Skip to content

Conversation

@giancarloromeo
Copy link
Contributor

@giancarloromeo giancarloromeo commented Jun 5, 2025

What do these changes do?

This PR introduces changes to generate unique Celery worker names by appending a Task ID to hostnames in the Docker Compose configuration.

As you can see in the example below, the Celery workers won't collide anymore: e.g. celery@sto-worker-romeo-wkst-l854yndv9usxrqv1ccxn4vat5.

[2025-06-05 09:54:29,227: INFO/MainProcess] mingle: searching for neighbors
[2025-06-05 09:54:30,241: INFO/MainProcess] mingle: sync with 1 nodes
[2025-06-05 09:54:30,241: INFO/MainProcess] mingle: sync complete
[2025-06-05 09:54:30,247: INFO/MainProcess] celery@sto-worker-romeo-wkst-l854yndv9usxrqv1ccxn4vat5 ready.

The issue happened during roll-out of new version of worker services.

Related issue/s

How to test

Dev-ops

@giancarloromeo giancarloromeo self-assigned this Jun 5, 2025
@giancarloromeo giancarloromeo added this to the Bazinga! milestone Jun 5, 2025
@codecov
Copy link

codecov bot commented Jun 5, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 84.96%. Comparing base (7cbacf2) to head (8405ae4).
Report is 1 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #7827      +/-   ##
==========================================
- Coverage   85.06%   84.96%   -0.11%     
==========================================
  Files        1803     1807       +4     
  Lines       70100    69649     -451     
  Branches     1218     1218              
==========================================
- Hits        59628    59174     -454     
- Misses      10130    10134       +4     
+ Partials      342      341       -1     
Flag Coverage Δ
integrationtests 64.18% <ø> (+0.03%) ⬆️
unittests 84.64% <ø> (-0.11%) ⬇️
Components Coverage Δ
api ∅ <ø> (∅)
pkg_aws_library 93.92% <ø> (ø)
pkg_dask_task_models_library 79.62% <ø> (ø)
pkg_models_library 93.17% <ø> (ø)
pkg_notifications_library 85.26% <ø> (ø)
pkg_postgres_database 88.16% <ø> (ø)
pkg_service_integration 69.92% <ø> (ø)
pkg_service_library 71.98% <ø> (+0.04%) ⬆️
pkg_settings_library 90.90% <ø> (ø)
pkg_simcore_sdk 85.10% <ø> (+0.05%) ⬆️
agent 96.29% <ø> (ø)
api_server 91.75% <ø> (ø)
autoscaling ∅ <ø> (∅)
catalog 92.29% <ø> (∅)
clusters_keeper 99.13% <ø> (ø)
dask_sidecar 91.60% <ø> (ø)
datcore_adapter 97.94% <ø> (ø)
director 76.73% <ø> (ø)
director_v2 91.06% <ø> (ø)
dynamic_scheduler 96.69% <ø> (ø)
dynamic_sidecar 90.08% <ø> (ø)
efs_guardian 89.65% <ø> (ø)
invitations 93.00% <ø> (ø)
payments 92.57% <ø> (ø)
resource_usage_tracker 89.19% <ø> (+0.21%) ⬆️
storage 87.71% <ø> (+0.17%) ⬆️
webclient ∅ <ø> (∅)
webserver 78.75% <ø> (ø)

Continue to review full report in Codecov by Sentry.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 7cbacf2...8405ae4. Read the comment docs.

🚀 New features to boost your workflow:
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@giancarloromeo giancarloromeo requested a review from Copilot June 5, 2025 10:20
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR introduces changes to generate unique Celery worker names by appending a Task ID to hostnames in the Docker Compose configuration.

  • Updated hostname for "sto-worker" to include Task.ID
  • Updated hostname for "sto-worker-cpu-bound" to include Task.ID
Comments suppressed due to low confidence (2)

services/docker-compose.yml:1249

  • Appending Task.ID to the hostname enhances uniqueness. Please verify that Task.ID is consistently available and fits the overall worker naming scheme.
hostname: "sto-worker-{{.Node.Hostname}}-{{.Task.Slot}}-{{.Task.ID}}"

services/docker-compose.yml:1259

  • The updated hostname for CPU-bound workers now includes Task.ID, which should help in generating unique worker names. Ensure that this new format is compatible with all related systems.
hostname: "sto-worker-cpu-bound-{{.Node.Hostname}}-{{.Task.Slot}}-{{.Task.ID}}"

@sonarqubecloud
Copy link

sonarqubecloud bot commented Jun 5, 2025

@giancarloromeo giancarloromeo enabled auto-merge (squash) June 5, 2025 20:06
@giancarloromeo
Copy link
Contributor Author

@Mergifyio queue

@mergify
Copy link
Contributor

mergify bot commented Jun 5, 2025

queue

🟠 Waiting for conditions to match

  • -closed [📌 queue requirement]
  • -conflict [📌 queue requirement]
  • -draft [📌 queue requirement]
  • any of: [📌 queue -> configuration change requirements]
    • -mergify-configuration-changed
    • check-success = Configuration changed
  • any of: [🔀 queue conditions]
    • all of: [📌 queue conditions of queue default]
      • #approved-reviews-by >= 2 [🛡 GitHub branch protection]
      • #approved-reviews-by>=2
      • #changes-requested-reviews-by = 0 [🛡 GitHub branch protection]
      • #changes-requested-reviews-by=0
      • #review-threads-unresolved = 0 [🛡 GitHub branch protection]
      • #review-threads-unresolved=0
      • -conflict
      • -draft
      • base=master
      • branch-protection-review-decision = APPROVED [🛡 GitHub branch protection]
      • label!=🤖-do-not-merge
      • label=🤖-automerge
      • any of: [🛡 GitHub branch protection]
        • check-skipped = deploy to dockerhub
        • check-neutral = deploy to dockerhub
        • check-success = deploy to dockerhub
      • any of: [🛡 GitHub branch protection]
        • check-success = system-tests
        • check-neutral = system-tests
        • check-skipped = system-tests
      • any of: [🛡 GitHub branch protection]
        • check-success = unit-tests
        • check-neutral = unit-tests
        • check-skipped = unit-tests
      • any of: [🛡 GitHub branch protection]
        • check-success = check OAS' are up to date
        • check-neutral = check OAS' are up to date
        • check-skipped = check OAS' are up to date
      • any of: [🛡 GitHub branch protection]
        • check-success = integration-tests
        • check-neutral = integration-tests
        • check-skipped = integration-tests
      • any of: [🛡 GitHub branch protection]
        • check-success = build-test-images (frontend) / build-test-images
        • check-neutral = build-test-images (frontend) / build-test-images
        • check-skipped = build-test-images (frontend) / build-test-images

@giancarloromeo giancarloromeo added the 🤖-automerge marks PR as ready to be merged for Mergify label Jun 5, 2025
@giancarloromeo giancarloromeo merged commit 5cc2bdd into ITISFoundation:master Jun 5, 2025
141 of 149 checks passed
@giancarloromeo giancarloromeo deleted the generate-unique-worker-hostname branch June 6, 2025 07:11
@matusdrobuliak66 matusdrobuliak66 mentioned this pull request Jun 6, 2025
92 tasks
@matusdrobuliak66 matusdrobuliak66 mentioned this pull request Aug 5, 2025
88 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

🤖-automerge marks PR as ready to be merged for Mergify

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Storage celery worker can not start with current rollout policy

5 participants