Skip to content
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

Add Backend Message and Frontend Banner for Service Maintenance #294

Merged
merged 9 commits into from
Mar 1, 2024

Conversation

sunank200
Copy link
Collaborator

@sunank200 sunank200 commented Feb 12, 2024

Description

  • I am taking over this draft PR to implement display of service maintenance banner selectively based on environment variables
  • Added health_status endpoint on backend that reads from the env var
  • Frontend displays maintenance banner if health status is maintenance or if backend has no response coming back

Tests

  • When backend is down OR when backend has environment variable SERVICE_MAINTENANCE_BANNER=True
image - Other times (when env var is empty or if banner set to False) image - Slack image

closes #302

Copy link

cloudflare-pages bot commented Feb 12, 2024

Deploying with  Cloudflare Pages  Cloudflare Pages

Latest commit: 1384ddd
Status: ✅  Deploy successful!
Preview URL: https://4b4ca580.ask-astro.pages.dev
Branch Preview URL: https://banner-alert.ask-astro.pages.dev

View logs

@davidgxue davidgxue self-assigned this Feb 28, 2024
@davidgxue
Copy link
Collaborator

Commandeering this PR to me as I am picking up the issue #302

@davidgxue davidgxue changed the title Add banner for ask-astro down time Add Backend Message and Frontend Banner for Service Maintenance Feb 29, 2024
@davidgxue davidgxue marked this pull request as ready for review February 29, 2024 17:15
api/ask_astro/services/questions.py Outdated Show resolved Hide resolved
api/ask_astro/settings.py Outdated Show resolved Hide resolved
ui/src/routes/+page.server.ts Show resolved Hide resolved
Copy link
Collaborator Author

@sunank200 sunank200 left a comment

Choose a reason for hiding this comment

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

LGTM. But requesting to add the test cases for the changes in general.

@davidgxue davidgxue merged commit 3836ee8 into main Mar 1, 2024
8 checks passed
@davidgxue davidgxue deleted the banner-alert branch March 1, 2024 19:39
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.

Add Service Maintenance Banner on UI and Slack During Downtime
4 participants