mattermost / mattermost-plugin-apps

Powers the Mattermost App Framework
https://developers.mattermost.com/integrate/apps/
Apache License 2.0
34 stars 29 forks source link

[MM-50054] Fix panic on server with invalid configuration #440

Closed hanzei closed 1 year ago

hanzei commented 1 year ago

Summary

If the server config is invalid, e.g. because SITE_URL is not set, the logger returned from config.MakeService is nil. In that case, the plugin logger should be used instead.

Ticket Link

https://mattermost.atlassian.net/browse/MM-50054

codecov-commenter commented 1 year ago

Codecov Report

Base: 20.73% // Head: 20.72% // Decreases project coverage by -0.01% :warning:

Coverage data is based on head (d887d8d) compared to base (461e9e6). Patch coverage: 5.26% of modified lines in pull request are covered.

Additional details and impacted files ```diff @@ Coverage Diff @@ ## master #440 +/- ## ========================================== - Coverage 20.73% 20.72% -0.01% ========================================== Files 80 80 Lines 5310 5312 +2 ========================================== Hits 1101 1101 - Misses 4080 4082 +2 Partials 129 129 ``` | [Impacted Files](https://codecov.io/gh/mattermost/mattermost-plugin-apps/pull/440?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=mattermost) | Coverage Δ | | |---|---|---| | [server/config/service.go](https://codecov.io/gh/mattermost/mattermost-plugin-apps/pull/440?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=mattermost#diff-c2VydmVyL2NvbmZpZy9zZXJ2aWNlLmdv) | `0.00% <0.00%> (ø)` | | | [server/plugin.go](https://codecov.io/gh/mattermost/mattermost-plugin-apps/pull/440?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=mattermost#diff-c2VydmVyL3BsdWdpbi5nbw==) | `42.15% <100.00%> (ø)` | | Help us with your feedback. Take ten seconds to tell us [how you rate us](https://about.codecov.io/nps?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=mattermost). Have a feature suggestion? [Share it here.](https://app.codecov.io/gh/feedback/?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=mattermost)

:umbrella: View full report at Codecov.
:loudspeaker: Do you have feedback about the report comment? Let us know in this issue.