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 health checks for server processes #227

Merged

Conversation

racheldaniel
Copy link
Contributor

@racheldaniel racheldaniel commented May 16, 2023

What is this PR?

This is a:

  • documentation update
  • bug fix with no breaking changes
  • new functionality
  • a breaking change

All pull requests from community contributors should target the main branch (default).

Description & motivation

Adds liveliness tracking using celery signals and a shell script that can be used to check readiness and liveliness. This PR is in conjunction with dbt-cloud PR #7344.

The bash script:

  1. Sends an http request to the /ready endpoint of dbt-server to make sure server itself is up
  2. Makes sure the broker can be accessed via the command redis-cli and sending a ping
  3. Verifies that a file /tmp/worker_heartbeat exists and has been touched in the last 10 seconds (this touch command is executed once the worker is ready, then again as a part of the celery worker's steps, making use of celery signals)

These steps should confirm that the server is started and running, the redis broker can be connected to, and the celery workers are live.

Checklist

  • I have verified that these changes work locally on the following warehouses (Note: it's okay if you do not have access to all warehouses, this helps us understand what has been covered)
    • BigQuery
    • Postgres
    • Redshift
    • Snowflake
    • Databricks
    • Spark
  • I have updated the README.md (if applicable)
  • I have added tests & descriptions to my models
  • I have added an entry to CHANGELOG.md

@cla-bot cla-bot bot added the cla:yes label May 16, 2023
@github-actions
Copy link

Thank you for your pull request! We could not find a changelog entry for this change. For details on how to document a change, see the contributing guide.

@racheldaniel racheldaniel changed the title Racheld/xp 2150/add health checks for server processes Add health checks for server processes May 16, 2023
@racheldaniel racheldaniel merged commit 9e24ec3 into main May 17, 2023
17 of 18 checks passed
@racheldaniel racheldaniel deleted the racheld/XP-2150/add-health-checks-for-server-processes branch May 17, 2023 15:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant