Skip to content

🎨 Add fallback traefik 503 routes 🚨⚠️ DEVOPS #7899

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

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
Copy link

Copy link

codecov bot commented Jun 13, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 88.00%. Comparing base (b4964c1) to head (c927872).
Report is 1 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #7899      +/-   ##
==========================================
+ Coverage   87.97%   88.00%   +0.02%     
==========================================
  Files        1844     1837       -7     
  Lines       71048    70858     -190     
  Branches     1220     1220              
==========================================
- Hits        62508    62361     -147     
+ Misses       8188     8145      -43     
  Partials      352      352              
Flag Coverage Δ
integrationtests 64.32% <ø> (-0.08%) ⬇️
unittests 86.59% <ø> (+0.04%) ⬆️
Components Coverage Δ
api ∅ <ø> (∅)
pkg_aws_library 93.92% <ø> (ø)
pkg_dask_task_models_library 79.62% <ø> (ø)
pkg_models_library 93.19% <ø> (ø)
pkg_notifications_library 85.26% <ø> (ø)
pkg_postgres_database 88.16% <ø> (ø)
pkg_service_integration 69.92% <ø> (ø)
pkg_service_library 72.63% <ø> (ø)
pkg_settings_library 90.90% <ø> (ø)
pkg_simcore_sdk 85.10% <ø> (-0.06%) ⬇️
agent 96.29% <ø> (ø)
api_server 91.76% <ø> (ø)
autoscaling 96.03% <ø> (ø)
catalog 92.29% <ø> (ø)
clusters_keeper 99.13% <ø> (ø)
dask_sidecar 91.79% <ø> (+0.22%) ⬆️
datcore_adapter 97.94% <ø> (ø)
director 76.73% <ø> (-0.10%) ⬇️
director_v2 91.09% <ø> (-0.10%) ⬇️
dynamic_scheduler 96.69% <ø> (ø)
dynamic_sidecar 90.09% <ø> (ø)
efs_guardian 89.65% <ø> (ø)
invitations 93.00% <ø> (ø)
payments 92.57% <ø> (ø)
resource_usage_tracker 88.98% <ø> (-0.06%) ⬇️
storage 87.53% <ø> (ø)
webclient ∅ <ø> (∅)
webserver 87.64% <ø> (+0.03%) ⬆️

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 b4964c1...c927872. 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.

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.

1 participant