posit-dev / publisher

MIT License
3 stars 0 forks source link

Publishing Log: expand section on error and add bullets to log message lines #1908

Closed sagerb closed 16 hours ago

sagerb commented 3 days ago

Intent

Resolves #1790

This PR will cause Publishing Log sections to automatically expand themselves upon receiving a failure message.

I've also taken the opportunity to add a small bullet to the beginning of each log message, as well as suppressing newline characters received in the log messages, since we can't display those correctly.

Type of Change

Approach

Simple set of changes. When encounter failure and viewing publisher log, you'll now see something like this:

2024-06-28 at 3 01 PM

Final success or failure messages do not have icons as a prefix, as shown in the following screenshot.

2024-06-28 at 3 10 PM

NOTE: This behavior only occurs when the log is actively being updated. If you open the log after the publishing has occurred, the node will be closed by default.

Automated Tests

Directions for Reviewers

Easiest way to force failure that I've found is to either specify the wrong python version (which will fail fast), or add a bogus package requirement to your requirements.txt file.

Please verify: [ ] a successful deployment - only impact should be seeing bullets in the log messages except for the final success message. [ ] a failed deployment - which should result in the publishing log section which encountered the error to be automatically expanded (with then the log messages having bullets visible). In this case, the final failure message should not have a bullet.