Skip to content

Conversation

@YuryHrytsuk
Copy link
Contributor

@YuryHrytsuk YuryHrytsuk commented Jun 13, 2025

What do these changes do?

Add fallback routes that will take effect once main services (e.g. webserver is not in running state). This fallback routes will trigger 503 traefik default response which is a proper response when simcore service is not in running state.

By default traefik removes configuration of services that are not in running state (this leads to 404) traefik/traefik#7842

image

Next steps

Ship relevant html / json content back to users. We need to discuss what is proper content and in which scenarios we need to serve it.

Implementation details

https://doc.traefik.io/traefik/providers/swarm/#allowemptyservices traefik configuration setting was tested but had no effect as reported in traefik/traefik#11827

We don't have traefik healthcheck for simcore traefik. Since we need to introduce healthcheck per traefik-service and simcore traefik defines multiple of those, introducing extra 3 calls on traefik service might be an overkill. It is not clear is this healthcheck makes sense in general as it runs against traefik itself 🤷

Related issue/s

Related PR(s)

How to test

Scale exposed simcore service (e.g. webserver to 0 replicas). Open platform in browser and ensure you get 503 error with Unavailable service message (instead of 404 not found)

Dev-ops

  • No changes ENV

Add fallback routes that will take effect once main services (e.g.
webserver is not in `running` state). Once service is not in `running`
state, its configuration is removed from traefik leading to 404.

Related Issue(s):
* ITISFoundation/osparc-ops-environments#218

Related PR(s):
* ITISFoundation/osparc-ops-environments#950
@YuryHrytsuk YuryHrytsuk added this to the Engage milestone Jun 13, 2025
@YuryHrytsuk YuryHrytsuk self-assigned this Jun 13, 2025
@codecov
Copy link

codecov bot commented Jun 13, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 87.93%. Comparing base (f98ad3a) to head (36807f8).
Report is 1 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #7899      +/-   ##
==========================================
+ Coverage   87.89%   87.93%   +0.04%     
==========================================
  Files        1841     1834       -7     
  Lines       70996    70806     -190     
  Branches     1227     1227              
==========================================
- Hits        62400    62266     -134     
+ Misses       8242     8186      -56     
  Partials      354      354              
Flag Coverage Δ
integrationtests 64.22% <ø> (-0.07%) ⬇️
unittests 86.53% <ø> (+0.04%) ⬆️
Components Coverage Δ
api ∅ <ø> (∅)
pkg_aws_library 93.92% <ø> (ø)
pkg_celery_library ∅ <ø> (∅)
pkg_dask_task_models_library 79.62% <ø> (ø)
pkg_models_library 93.27% <ø> (ø)
pkg_notifications_library 85.26% <ø> (ø)
pkg_postgres_database 88.18% <ø> (ø)
pkg_service_integration 69.92% <ø> (ø)
pkg_service_library 71.57% <ø> (ø)
pkg_settings_library 90.90% <ø> (ø)
pkg_simcore_sdk 85.05% <ø> (-0.06%) ⬇️
agent 96.29% <ø> (ø)
api_server 92.64% <ø> (ø)
autoscaling 96.03% <ø> (ø)
catalog 92.29% <ø> (ø)
clusters_keeper 99.13% <ø> (ø)
dask_sidecar 92.35% <ø> (+0.56%) ⬆️
datcore_adapter 97.94% <ø> (ø)
director 76.82% <ø> (+0.09%) ⬆️
director_v2 91.07% <ø> (-0.03%) ⬇️
dynamic_scheduler 96.69% <ø> (ø)
dynamic_sidecar 90.09% <ø> (ø)
efs_guardian 89.65% <ø> (ø)
invitations 93.60% <ø> (ø)
payments 92.57% <ø> (ø)
resource_usage_tracker 89.00% <ø> (-0.06%) ⬇️
storage 86.64% <ø> (+0.28%) ⬆️
webclient ∅ <ø> (∅)
webserver 87.66% <ø> (+0.01%) ⬆️

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 f98ad3a...36807f8. 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.

Copy link
Member

@sanderegg sanderegg left a comment

Choose a reason for hiding this comment

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

thanks!

@YuryHrytsuk YuryHrytsuk added the 🤖-automerge marks PR as ready to be merged for Mergify label Jun 16, 2025
@YuryHrytsuk
Copy link
Contributor Author

@Mergifyio queue

@mergify
Copy link
Contributor

mergify bot commented Jun 16, 2025

queue

🟠 Waiting for conditions to match

  • any of: [🔀 queue conditions]
    • all of: [📌 queue conditions of queue default]
      • #review-threads-unresolved = 0 [🛡 GitHub branch protection]
      • #review-threads-unresolved=0
      • any of: [🛡 GitHub branch protection]
        • check-neutral = system-tests
        • check-skipped = system-tests
        • check-success = system-tests
      • any of: [🛡 GitHub branch protection]
        • check-neutral = unit-tests
        • check-skipped = unit-tests
        • check-success = unit-tests
      • #approved-reviews-by >= 2 [🛡 GitHub branch protection]
      • #approved-reviews-by>=2
      • #changes-requested-reviews-by = 0 [🛡 GitHub branch protection]
      • #changes-requested-reviews-by=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 = 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
  • -closed [📌 queue requirement]
  • -conflict [📌 queue requirement]
  • -draft [📌 queue requirement]
  • any of: [📌 queue -> configuration change requirements]
    • -mergify-configuration-changed
    • check-success = Configuration changed

@YuryHrytsuk YuryHrytsuk added 🤖-do-not-merge (optional) blocks Mergify from merging the PR and removed 🤖-automerge marks PR as ready to be merged for Mergify labels Jun 16, 2025
Copy link
Member

@mrnicegyu11 mrnicegyu11 left a comment

Choose a reason for hiding this comment

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

🚀 🪨

comment see parent PR ITISFoundation/osparc-ops-environments#950 (review)

@YuryHrytsuk YuryHrytsuk added 🤖-automerge marks PR as ready to be merged for Mergify and removed 🤖-do-not-merge (optional) blocks Mergify from merging the PR labels Jun 16, 2025
@YuryHrytsuk
Copy link
Contributor Author

@Mergifyio queue

@mergify
Copy link
Contributor

mergify bot commented Jun 16, 2025

queue

🟠 Waiting for conditions to match

  • any of: [🔀 queue conditions]
    • all of: [📌 queue conditions of queue default]
      • label!=🤖-do-not-merge
      • label=🤖-automerge
      • any of: [🛡 GitHub branch protection]
        • check-neutral = system-tests
        • check-skipped = system-tests
        • check-success = system-tests
      • #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]
      • 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 = 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
  • -closed [📌 queue requirement]
  • -conflict [📌 queue requirement]
  • -draft [📌 queue requirement]
  • any of: [📌 queue -> configuration change requirements]
    • -mergify-configuration-changed
    • check-success = Configuration changed

@YuryHrytsuk YuryHrytsuk removed the 🤖-automerge marks PR as ready to be merged for Mergify label Jun 16, 2025
@YuryHrytsuk
Copy link
Contributor Author

YuryHrytsuk commented Jun 16, 2025

Do not merge before

Release v1.83.0

@YuryHrytsuk YuryHrytsuk requested a review from pcrespov June 16, 2025 13:52
@YuryHrytsuk YuryHrytsuk added the 🤖-do-not-merge (optional) blocks Mergify from merging the PR label Jun 16, 2025
Copy link
Member

@pcrespov pcrespov left a comment

Choose a reason for hiding this comment

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

thx

@YuryHrytsuk YuryHrytsuk added 🤖-automerge marks PR as ready to be merged for Mergify and removed 🤖-do-not-merge (optional) blocks Mergify from merging the PR labels Jun 25, 2025
@YuryHrytsuk
Copy link
Contributor Author

@Mergifyio queue

@mergify
Copy link
Contributor

mergify bot commented Jun 25, 2025

queue

✅ The pull request has been merged automatically

The pull request has been merged automatically at bfb683d

YuryHrytsuk and others added 3 commits June 25, 2025 10:04
Test expects services to have exposed ports (either in Dockerfile or in
docker compose spec). "traefik-configuration-placeholder" uses busybox
image which has no exposed ports in Dockerfile and we don't expose ports
in docker compose as we don't need them (this services is simply a
placeholder for traefik rules that we want to configure on simcore
traefik)
@sonarqubecloud
Copy link

@mergify mergify bot merged commit bfb683d into ITISFoundation:master Jun 25, 2025
97 of 98 checks passed
@YuryHrytsuk YuryHrytsuk deleted the add-fallback-traefik-503-routes branch June 25, 2025 12:13
YuryHrytsuk added a commit to YuryHrytsuk/osparc-simcore that referenced this pull request Aug 14, 2025
The name is service name is too long and causes >64 len char issue when
deploying in prod. This fixes the problem by using a short name

Related PR/s
* original introduction of this servicehttps://github.com/ITISFoundation/pull/7899
* corresponding ops changes ITISFoundation/osparc-ops-environments#1177
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.

5 participants