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

Expose database upgrade errors during infra start #117

Merged
merged 3 commits into from
Oct 27, 2020
Merged

Conversation

zanieb
Copy link
Contributor

@zanieb zanieb commented Oct 27, 2020

Summary

An error during database upgrade is hidden with a message "Database is not ready..."

Changes

  • Only displays that the database is not ready when the exception is a refused connection
  • Other exceptions are displayed and reraised

Example output

prefect-3.7 ❯ prefect-server dev infrastructure
Pulling postgres ... done
Pulling hasura   ... done
Database upgrade encountered fatal error:

(psycopg2.OperationalError) FATAL:  role "prefect" does not exist

(Background on this error at: http://sqlalche.me/e/13/e3q8)

Exception caught; killing services (press ctrl-C to force)

... full traceback

Importance

Silencing exceptions during database setup makes it challenging to troubleshoot

Checklist

This PR:

  • adds new tests (if appropriate)
  • adds a change file in the changes/ directory (if appropriate)

@zanieb
Copy link
Contributor Author

zanieb commented Oct 27, 2020

I'm still unsure on the scope of changes/ and there are no CLI tests. Let me know if either is appropriate.

@zanieb zanieb marked this pull request as ready for review October 27, 2020 17:10
@zanieb zanieb requested review from cicdw and jlowin as code owners October 27, 2020 17:10
@codecov-io
Copy link

codecov-io commented Oct 27, 2020

Codecov Report

Merging #117 into master will decrease coverage by 0.07%.
The diff coverage is n/a.

@joshmeek
Copy link
Contributor

@madkinsz I think a changes entry is still helpful here 👍

Copy link
Member

@cicdw cicdw left a comment

Choose a reason for hiding this comment

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

LGTM

In general, think of the changes/ of server as a bookkeeping system so we know what we've released and not released. Because of that, pretty much any behavioral or UX change is worthy of mention IMO

@cicdw cicdw merged commit 9f25675 into master Oct 27, 2020
@cicdw cicdw deleted the expose-database-err branch October 27, 2020 22:03
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.

4 participants