Skip to content

FS: Handle unavailable backend #108544

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

Merged
merged 9 commits into from
Jul 25, 2025
Merged

FS: Handle unavailable backend #108544

merged 9 commits into from
Jul 25, 2025

Conversation

joshhunt
Copy link
Contributor

This PR adds handling of 503 Service Unavailable from the /bootdata endpoint in the new frontend-service index.html. The page will poll the endpoint until it's available and then load the frontend.

  • Add special /-/down and /-/up routes to the dev stack to simulate backend behaviour
  • Remove the orange frame from the new index.html
  • Adds a new styled loader to the page - a simple spinner
  • Handles 503 error from /bootdata:
    • When first encountered, it will show "Grafana is starting up..." below the spinner
    • Polls every second the endpoint to see if it's up again

Discussion points (for later work):

  1. This is now too much critical, inline javsacript in the HTML file that's untyped and untested. I want to move this out into a seperate file, build it with eslint, and inject it into the html file at build time. This will make things a bit more complicated, but I think its worth it
  2. Related to the above, I would like to find a way to make the theme tokens available properly in the HTML file, rather than hard coding them.

Fixes #107626

@joshhunt joshhunt requested review from a team as code owners July 23, 2025 16:32
@joshhunt joshhunt requested review from jackw, samsch and ashharrison90 and removed request for a team July 23, 2025 16:32
@github-actions github-actions bot added this to the 12.1.x milestone Jul 23, 2025
@joshhunt joshhunt added the no-changelog Skip including change in changelog/release notes label Jul 23, 2025
@joshhunt joshhunt force-pushed the jh/fs-unavail-backend branch from 5782e9d to b3f1691 Compare July 25, 2025 10:53
@joshhunt joshhunt requested a review from samsch July 25, 2025 11:09
Copy link
Contributor

@ashharrison90 ashharrison90 left a comment

Choose a reason for hiding this comment

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

couple of questions 🙏

Copy link
Contributor

@ashharrison90 ashharrison90 left a comment

Choose a reason for hiding this comment

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

noice 👍

@joshhunt joshhunt merged commit c1c5c2d into main Jul 25, 2025
102 checks passed
@joshhunt joshhunt deleted the jh/fs-unavail-backend branch July 25, 2025 16:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/frontend no-changelog Skip including change in changelog/release notes
Projects
None yet
Development

Successfully merging this pull request may close these issues.

FrontendService: Handle paused instances
3 participants