-
Notifications
You must be signed in to change notification settings - Fork 14.5k
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
chore: prevent prophet from logging non-errors as errors #27053
Conversation
f4dca0e
to
95b5281
Compare
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #27053 +/- ##
==========================================
+ Coverage 67.19% 69.52% +2.33%
==========================================
Files 1899 1899
Lines 74369 74379 +10
Branches 8274 8274
==========================================
+ Hits 49970 51710 +1740
+ Misses 22344 20614 -1730
Partials 2055 2055
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
|
||
|
||
@contextmanager | ||
def suppress_logging( |
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.
Not blocking: could we add some tests here? https://github.com/apache/superset/blob/master/tests/unit_tests/utils/test_decorators.py
(cherry picked from commit cf84f36)
SUMMARY
Prophet will log errors when optional dependencies are not installed:
(It does something similar for
matplotlib
.)These calls to
logger.error
will pollute and trigger unnecessary alerts.This PR introduces a decorator
suppress_logging
that can be used in cases like this to suppress the logging:BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF
TESTING INSTRUCTIONS
ADDITIONAL INFORMATION