-
Notifications
You must be signed in to change notification settings - Fork 137
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 database overview to the logs of the csi driver on error and startup #618
Conversation
@@ -95,6 +95,22 @@ const ( | |||
WHERE TenantUUID = ?; | |||
` | |||
|
|||
// GET ALL | |||
getAllDynakubesStatement = ` | |||
SELECT Name, TenantUUID, LatestVersion |
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.
Would remove one tab to be identical with the previous statements
|
||
dynakubes, err := db.GetAllDynakubes() | ||
assert.NoError(t, err) | ||
assert.Equal(t, 2, len(dynakubes)) |
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.
Would even check if the returned objects are dk1 & dk2
Similar for the next tests
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.
Beside of the small changes you could make, seems to be fine
Description
We don't have a good way to check whats in the database, so on startup after the correction logic runs we log the content of the database. We also do this when the csi server stops.
How can this be tested?
When you deploy the csi driver, in the logs there should be a line around the top (~3 line or so) that has the contents of the database on that node.
Checklist