Skip to content
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

fix: add logging to alerts and reports to find non-triggering issues #21684

Merged
merged 3 commits into from
Oct 3, 2022

Conversation

pkdotson
Copy link
Member

@pkdotson pkdotson commented Oct 3, 2022

SUMMARY

Alerts and reports has had some issues where some users report their reports not triggering at their validate time. This pr is the first step in adding some logs to gather error feedback to correct this problem.

BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF

TESTING INSTRUCTIONS

ADDITIONAL INFORMATION

  • Has associated issue:
  • Required feature flags:
  • Changes UI
  • Includes DB Migration (follow approval process in SIP-59)
    • Migration is atomic, supports rollback & is backwards-compatible
    • Confirm DB migration upgrade and downgrade tested
    • Runtime estimates and downtime expectations provided
  • Introduces new feature or API
  • Removes existing feature or API

@@ -166,6 +166,9 @@ def _execute_query(self) -> pd.DataFrame:
logger.warning("A timeout occurred while executing the alert query: %s", ex)
raise AlertQueryTimeout() from ex
except Exception as ex:
logger.warning(
"A general exception occurred while executing the alert query: %s", ex
)
raise AlertQueryError(message=str(ex)) from ex
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

does this exception already log this error?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes but i'm curious to see what this error is on it's face because it could be empty.

@codecov
Copy link

codecov bot commented Oct 3, 2022

Codecov Report

Merging #21684 (79932ca) into master (4245bc3) will increase coverage by 0.02%.
The diff coverage is 100.00%.

@@            Coverage Diff             @@
##           master   #21684      +/-   ##
==========================================
+ Coverage   66.80%   66.82%   +0.02%     
==========================================
  Files        1799     1799              
  Lines       68825    68830       +5     
  Branches     7314     7314              
==========================================
+ Hits        45976    45994      +18     
+ Misses      20970    20957      -13     
  Partials     1879     1879              
Flag Coverage Δ
hive 52.88% <0.00%> (-0.01%) ⬇️
mysql 78.20% <100.00%> (-0.01%) ⬇️
postgres 78.26% <100.00%> (-0.01%) ⬇️
presto 52.78% <0.00%> (-0.01%) ⬇️
python 81.41% <100.00%> (+0.04%) ⬆️
sqlite 76.76% <100.00%> (?)
unit 50.92% <0.00%> (-0.01%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
superset/reports/commands/execute.py 91.57% <100.00%> (+0.02%) ⬆️
superset/models/helpers.py 39.04% <0.00%> (-0.18%) ⬇️
superset/db_engine_specs/base.py 89.64% <0.00%> (+0.31%) ⬆️
superset/views/core.py 76.04% <0.00%> (+0.60%) ⬆️
superset/result_set.py 97.77% <0.00%> (+1.48%) ⬆️
superset/connectors/sqla/utils.py 89.21% <0.00%> (+1.96%) ⬆️
superset/utils/celery.py 89.65% <0.00%> (+3.44%) ⬆️
superset/db_engine_specs/sqlite.py 96.42% <0.00%> (+7.14%) ⬆️

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

@pkdotson pkdotson merged commit 84c3cf6 into apache:master Oct 3, 2022
@sadpandajoe
Copy link
Member

🏷️ preset:2022.39

sadpandajoe pushed a commit to preset-io/superset that referenced this pull request Oct 3, 2022
@mistercrunch mistercrunch added 🏷️ bot A label used by `supersetbot` to keep track of which PR where auto-tagged with release labels 🚢 2.1.0 and removed 🚢 2.1.3 labels Mar 13, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🏷️ bot A label used by `supersetbot` to keep track of which PR where auto-tagged with release labels size/XS 🚢 2.1.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants