Skip to content
This repository has been archived by the owner on Nov 30, 2022. It is now read-only.

512 db redis health #686

Merged
merged 11 commits into from
Jun 22, 2022
Merged

512 db redis health #686

merged 11 commits into from
Jun 22, 2022

Conversation

eastandwestwind
Copy link
Contributor

@eastandwestwind eastandwestwind commented Jun 21, 2022

Purpose

Surface more helpful error messages on app startup for both db and cache connection failures. See associated ticket for examples of the error messages.

Changes

  • Removes unneeded dependences from celery in docker-compose.yml. This allows celery to not swallow errors for postgres, specifically.
  • Catches exceptions when attempting to init db on app startup
  • Attempts to connect to cache on app startup so that connection errors are caught early instead of when trying to process privacy requests
  • If connection fails to either db or cache, does not start webserver

Checklist

  • Update CHANGELOG.md file
    • Merge in main so the most recent CHANGELOG.md file is being appended to
    • Add description within the Unreleased section in an appropriate category. Add a new category from the list at the top of the file if the needed one isn't already there.
    • Add a link to this PR at the end of the description with the PR number as the text. example: #1
  • Applicable documentation updated (guides, quickstart, postman collections, tutorial, fidesdemo, database diagram.
  • If docs updated (select one):
    • documentation complete, or draft/outline provided (tag docs-team to complete/review on this branch)
    • documentation issue created (tag docs-team to complete issue separately)
  • Good unit test/integration test coverage
  • This PR contains a DB migration. If checked, the reviewer should confirm with the author that the down_revision correctly references the previous migration before merging
  • The Run Unsafe PR Checks label has been applied, and checks have passed, if this PR touches any external services

Ticket

Fixes #512

@seanpreston seanpreston self-assigned this Jun 22, 2022
Copy link
Contributor

@seanpreston seanpreston left a comment

Choose a reason for hiding this comment

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

@seanpreston seanpreston merged commit 106f29d into main Jun 22, 2022
@seanpreston seanpreston deleted the 512-db-redis-health branch June 22, 2022 22:36
sanders41 pushed a commit that referenced this pull request Sep 22, 2022
* catches exceptions from db/redis and provides better errors on startup

* move health endpoint changes to separate branch

* update changelog

* catch appropriate redis err, stop app upon db and cache connection failure

* adds check for cache enabled
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Update the webserver to run healthchecks on the app database & Redis cache on startup
2 participants