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: SQL Statement on QUERY_LOGGER prints none to log #14358

Merged
merged 2 commits into from May 6, 2021

Conversation

cccs-rc
Copy link
Contributor

@cccs-rc cccs-rc commented Apr 26, 2021

SUMMARY

Attempting to fix issue described here: #11356

TEST PLAN

As per issue linked above:

  1. Set QUERY_LOGGER to a function that will log the query (e.g. def log_sql_statements(database, query, schema, user, client, security_manager, log_params): logger.info("query is:" + str(query)) QUERY_LOGGER = log_sql_statements
  2. Run any query from sql_lab
  3. Check the logs

ADDITIONAL INFORMATION

  • Has associated issue: SQL Statement on QUERY_LOGGER prints none to log #11356
  • 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

Copy link
Member

@villebro villebro left a comment

Choose a reason for hiding this comment

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

LGTM - thanks so much for the fix!

@codecov
Copy link

codecov bot commented May 6, 2021

Codecov Report

Merging #14358 (d1aa81e) into master (a548b69) will increase coverage by 0.14%.
The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master   #14358      +/-   ##
==========================================
+ Coverage   79.78%   79.92%   +0.14%     
==========================================
  Files         943      944       +1     
  Lines       47748    47999     +251     
  Branches     6026     6026              
==========================================
+ Hits        38094    38363     +269     
+ Misses       9533     9515      -18     
  Partials      121      121              
Flag Coverage Δ
hive 80.77% <100.00%> (+0.29%) ⬆️
mysql 81.03% <100.00%> (+0.28%) ⬆️
postgres 81.06% <100.00%> (+0.28%) ⬆️
python 81.44% <100.00%> (+0.25%) ⬆️
sqlite 80.67% <100.00%> (+0.28%) ⬆️

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

Impacted Files Coverage Δ
superset/sql_lab.py 81.56% <100.00%> (ø)
superset/db_engine_specs/__init__.py 65.90% <0.00%> (-34.10%) ⬇️
superset/db_engine_specs/hive.py 87.60% <0.00%> (-3.24%) ⬇️
superset/datasets/commands/importers/v1/utils.py 57.14% <0.00%> (-1.77%) ⬇️
...erset/dashboards/commands/importers/v1/__init__.py 98.50% <0.00%> (-1.50%) ⬇️
superset/dashboards/dao.py 95.45% <0.00%> (-0.52%) ⬇️
superset/models/core.py 88.85% <0.00%> (-0.25%) ⬇️
superset/viz.py 55.49% <0.00%> (-0.16%) ⬇️
superset/reports/commands/execute.py 92.88% <0.00%> (-0.08%) ⬇️
superset/views/core.py 75.65% <0.00%> (-0.06%) ⬇️
... and 40 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update a548b69...d1aa81e. Read the comment docs.

@villebro villebro merged commit f55882e into apache:master May 6, 2021
@villebro villebro added the v1.2 label May 7, 2021
amitmiran137 pushed a commit that referenced this pull request May 7, 2021
cccs-RyanS pushed a commit to CybercentreCanada/superset that referenced this pull request Sep 8, 2021
cccs-RyanS pushed a commit to CybercentreCanada/superset that referenced this pull request Dec 17, 2021
QAlexBall pushed a commit to QAlexBall/superset that referenced this pull request Dec 29, 2021
cccs-rc added a commit to CybercentreCanada/superset that referenced this pull request Mar 6, 2024
@mistercrunch mistercrunch added 🍒 1.2.0 🏷️ bot A label used by `supersetbot` to keep track of which PR where auto-tagged with release labels 🚢 1.3.0 labels Mar 12, 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 v1.2 🍒 1.2.0 🚢 1.3.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants