postgres-operator icon indicating copy to clipboard operation
postgres-operator copied to clipboard

Operator logging for database init SQL failures

Open jmartin127 opened this issue 3 years ago • 2 comments

If there is an error in the init SQL that runs as part of reconcileDatabaseInitSQL, then there is no way for the user to know what the error is. Adding this additional log statement will make it easier for users to know when init sql operations have succeeded and/or failed. It also brings this part of the code up to par with other similar operations in the codebase.

Checklist:

  • [x] Have you added an explanation of what your changes do and why you'd like them to be included?
  • [x] Have you updated or added documentation for the change, as applicable?
  • [ ] Have you tested your changes on all related environments with successful results, as applicable? No. I tried to build the Docker image locally but ran into some issues, likely because my local env is a mac I'm guessing. Any tips here would be appreciated.
    • [x] Have you added automated tests? (n/a)

Type of Changes:

  • [ ] New feature
  • [ ] Bug fix
  • [ ] Documentation
  • [ ] Testing enhancement
  • [x] Other (logging addition)

What is the current behavior (link to any open issues here)? Issue: #3029

What is the new behavior (if this is a feature change)? Additional Logging to help users diagnose failures

Other Information: None

jmartin127 avatar Feb 10 '22 20:02 jmartin127

Is there a maintainer who could review this PR? Thank you in advance.

jmartin127 avatar Feb 28 '22 16:02 jmartin127

@cbandy @tjmoore4 @jmckulk Would one of you have a moment to review this PR?

jmartin127 avatar Apr 14 '22 14:04 jmartin127

Thanks for the PR -- approved and merged! Hope that helps debug init sql issues.

benjaminjb avatar Oct 18 '22 14:10 benjaminjb