-
Notifications
You must be signed in to change notification settings - Fork 58
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
adds basic database access test to ensure connectivity #118
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should this functionality be in a /healthz
or /readyz
endpoint instead?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
are we talking about leveraging the existing healthz/ready endpoing for liveness/readiness? Or is this a different implementation? I only ask because it seems like hitting the DB on every probe seems a bit much but agree long term it should be checked. Is this maybe future state when we look into more definitive implementation (see thread about circuit breaker)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah, whichever endpoint (readyz makes sense to me) that is configured as a pod readinessProbe eventually. We wouldn't want to send requests to the frontend if it isn't able to connect to the database yet and the period/failure threshold for the probe is tunable. I'm ok to implement it later
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
tested locally, which worked, but had to update the deploy make target to use the "resource group" as the "deployment name" when setting FRONTEND_MI_CLIENT_ID
.
75d0a3d
to
cff6a37
Compare
cff6a37
to
3892904
Compare
What this PR does
With the velocity of changes happening to this repo and getting development processes updated and defined, it seemed adding a very basic db connectivity test to frontend was worth it. This way folks working on frontend updates, who need to test database CRUD transactions, can at least confirm connectivity is there and functioning by reviewing start up logs.
database.go
which in the future will likely get more use, but for now its just to house a very basic checkDBConnectionTest
on startup in mainoc process
command, even if no DB has been deployedJira:
Link to demo recording:
Special notes for your reviewer
Checklist
This checklist is not enforcing, but it's a reminder of items that could be relevant to every PR.
Approvers are expected to review this list.