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(migration): add log for values unseen in Slice.datasource_type #23925

Merged
merged 14 commits into from
May 4, 2023

Conversation

hughhhh
Copy link
Member

@hughhhh hughhhh commented May 3, 2023

SUMMARY

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

@hughhhh hughhhh requested a review from a team as a code owner May 3, 2023 21:09
session.add(slc)

else:
print(
Copy link
Member

Choose a reason for hiding this comment

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

Can we use a logger here? Print is a little nasty for aggregators like Datadog :P

@@ -36,6 +37,8 @@

Base = declarative_base()

logger = logging.getLogger()
Copy link
Member

Choose a reason for hiding this comment

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

logging.getLogger(__name__)

session.add(slc)

else:
logger.info(
Copy link
Member

Choose a reason for hiding this comment

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

logger.warn()

Copy link
Member

@craig-rueda craig-rueda left a comment

Choose a reason for hiding this comment

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

Nit: no f-strings in log msgs. Should be ok here as this code will only really run once :)

@codecov
Copy link

codecov bot commented May 3, 2023

Codecov Report

Merging #23925 (892356b) into master (ad19cd9) will decrease coverage by 0.01%.
The diff coverage is 68.42%.

❗ Current head 892356b differs from pull request most recent head 809292e. Consider uploading reports for the commit 809292e to get more accurate results

@@            Coverage Diff             @@
##           master   #23925      +/-   ##
==========================================
- Coverage   68.10%   68.10%   -0.01%     
==========================================
  Files        1941     1941              
  Lines       75020    75036      +16     
  Branches     8155     8155              
==========================================
+ Hits        51096    51106      +10     
- Misses      21841    21847       +6     
  Partials     2083     2083              
Flag Coverage Δ
hive 53.00% <21.05%> (-0.02%) ⬇️
mysql 78.80% <68.42%> (-0.01%) ⬇️
postgres 78.88% <68.42%> (-0.01%) ⬇️
presto 52.91% <21.05%> (-0.02%) ⬇️
python 82.67% <68.42%> (-0.01%) ⬇️
sqlite 77.39% <68.42%> (-0.01%) ⬇️
unit 52.80% <0.00%> (-0.03%) ⬇️

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

Impacted Files Coverage Δ
superset/migrations/shared/migrate_viz/base.py 78.78% <68.42%> (-3.14%) ⬇️

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


else:
logger.warn(
f"unknown value detected for slc.datasource_type: {slc.datasource_type}"
Copy link
Member

Choose a reason for hiding this comment

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

I would suggest also putting a log into line 60 above in case that's where the failure is.

@eschutho
Copy link
Member

eschutho commented May 3, 2023

@hughhhh don't we need to create a new dataset from the query? Rather than just changing the datasource_type to table?

Copy link
Member

@eschutho eschutho left a comment

Choose a reason for hiding this comment

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

left a few comments

@pull-request-size pull-request-size bot added size/M and removed size/S labels May 3, 2023
@hughhhh hughhhh merged commit 3dc4de4 into master May 4, 2023
sadpandajoe pushed a commit to preset-io/superset that referenced this pull request May 4, 2023
@sadpandajoe
Copy link
Member

🏷️ preset:2023.17

@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 chart-ds-constraint-update branch March 26, 2024 16:24
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/M 🚢 3.0.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants