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

chore: allow logs to show error levels for ssh tunnel #23536

Merged
merged 3 commits into from
Mar 30, 2023
Merged

Conversation

hughhhh
Copy link
Member

@hughhhh hughhhh commented Mar 30, 2023

SUMMARY

allow debug level logs to show all error from the internal package

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

@codecov
Copy link

codecov bot commented Mar 30, 2023

Codecov Report

Merging #23536 (e10067f) into master (63751c6) will increase coverage by 11.18%.
The diff coverage is 100.00%.

❗ Current head e10067f differs from pull request most recent head aebca34. Consider uploading reports for the commit aebca34 to get more accurate results

@@             Coverage Diff             @@
##           master   #23536       +/-   ##
===========================================
+ Coverage   56.48%   67.66%   +11.18%     
===========================================
  Files        1914     1914               
  Lines       73926    73919        -7     
  Branches     8020     8018        -2     
===========================================
+ Hits        41758    50020     +8262     
+ Misses      30125    21856     -8269     
  Partials     2043     2043               
Flag Coverage Δ
hive 52.73% <100.00%> (+<0.01%) ⬆️
postgres 78.54% <100.00%> (?)
presto 52.65% <100.00%> (+<0.01%) ⬆️
python 82.34% <100.00%> (+23.09%) ⬆️
sqlite 77.05% <100.00%> (?)
unit 52.63% <100.00%> (+<0.01%) ⬆️

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

Impacted Files Coverage Δ
...ugin-chart-pivot-table/src/plugin/controlPanel.tsx 4.16% <ø> (ø)
...nd/plugins/plugin-chart-table/src/controlPanel.tsx 53.12% <ø> (ø)
...FormattingControl/ConditionalFormattingControl.tsx 11.76% <ø> (+2.24%) ⬆️
...nts/controls/ConditionalFormattingControl/types.ts 100.00% <ø> (ø)
superset/extensions/ssh.py 66.66% <100.00%> (+0.87%) ⬆️

... and 302 files with indirect coverage changes

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

"local_bind_address": (self.local_bind_address,),
"debug_level": "ERROR",
Copy link
Member

Choose a reason for hiding this comment

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

I think it's better to set this to the current log level of Superset, so that in production this is ERROR, but in dev this is DEBUG or INFO, eg.

You should be able to get the current log level with something like:

logging.getLogger("flask_appbuilder").level

Copy link
Member

Choose a reason for hiding this comment

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

Note that I think logging.getLogger("flask_appbuilder").level is an int, you probably need to convert to a string here. Looks like you can do something like this:

log = logging.getLogger("flask_appbuilder")
str_level = logging.getLevelName(log.getEffectiveLevel())

Copy link
Member Author

Choose a reason for hiding this comment

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

the package handles int as well

@hughhhh hughhhh merged commit 81b32d1 into master Mar 30, 2023
jinghua-qa pushed a commit to preset-io/superset that referenced this pull request Apr 10, 2023
@mistercrunch mistercrunch added 🏷️ bot A label used by `supersetbot` to keep track of which PR where auto-tagged with release labels 🚢 3.0.0 labels Mar 13, 2024
@mistercrunch mistercrunch deleted the ssh-error-logs branch March 26, 2024 18:02
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 preset:2023.13 size/XS 🚢 3.0.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants