Fix an issue logging connection information in upgrade failure logs.

Review Request #13400 — Created Nov. 3, 2023 and submitted

Information

Review Board
release-6.x

Reviewers

When rb-site upgrade fails to upgrade a database, it outputs a lot of
debug information to a log file in order to help diagnose the issue.
Part of this process logs connection information for the database as a
JSON string. This doesn't always work, as the data there is not
guaranteed to be JSON-compatible. This failure is sandboxed and does not
affect the rest of the log, but does mean we don't always get useful
information here.

This change switches this to log a pformat() of the connection
information, rather than a JSON log, in order to guarantee successful
logging.

Tested logging the information. Saw that the log was successful.

Summary ID
Fix an issue logging connection information in upgrade failure logs.
When `rb-site upgrade` fails to upgrade a database, it outputs a lot of debug information to a log file in order to help diagnose the issue. Part of this process logs connection information for the database as a JSON string. This doesn't always work, as the data there is not guaranteed to be JSON-compatible. This failure is sandboxed and does not affect the rest of the log, but does mean we don't always get useful information here. This change switches this to log a `pformat()` of the connection information, rather than a JSON log, in order to guarantee successful logging.
79d982c585391d4e9d1c294cec8fc50ebff6e6fe
david
  1. Ship It!
  2. 
      
maubin
  1. Ship It!
  2. 
      
chipx86
Review request changed
Status:
Completed
Change Summary:
Pushed to release-6.x (8d219b3)