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

feat: add extra column to tables and sql_metrics #10592

Merged

Conversation

etr2460
Copy link
Member

@etr2460 etr2460 commented Aug 12, 2020

SUMMARY

Adds the columns mentioned in #10591 for extra metadata around tables and metrics (with certification being the first use case)

I'm PRing out only the migration first to ensure push safety with future code that references these columns.

TEST PLAN

CI, run the migration and see it succeed

ADDITIONAL INFORMATION

  • Has associated issue:
  • Changes UI
  • Requires DB Migration.
  • Confirm DB Migration upgrade and downgrade tested.
  • Introduces new feature or API
  • Removes existing feature or API

to: @john-bodley @graceguo-supercat @ktmud

@etr2460 etr2460 added the risk:db-migration PRs that require a DB migration label Aug 12, 2020
Copy link
Member

@john-bodley john-bodley left a comment

Choose a reason for hiding this comment

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

@etr2460 do you think it would be advisable to add a note to UPDATING.md given this PR includes a migration?

@etr2460 etr2460 force-pushed the erik-ritter--add-extra-tables-metrics branch from 3c6aa77 to 9d17782 Compare August 12, 2020 17:54
@etr2460
Copy link
Member Author

etr2460 commented Aug 12, 2020

do you think it would be advisable to add a note to UPDATING.md given this PR includes a migration?

Do you think it matters? It should be completely push safe. Unless you think there'll be performance issues

@john-bodley
Copy link
Member

john-bodley commented Aug 12, 2020

@etr2460 reading through UPDATING.md I guess we only called out PRs that added columns which could be problematic like #8867. I guess the question is whether locking these tables will be problematic under production load. Note for MySQL adding a new column actually recreates the table and copies the data and the tables and sql_metrics tables could be sizable (though not as large as the logs or query table).

@etr2460 etr2460 force-pushed the erik-ritter--add-extra-tables-metrics branch from 9d17782 to c8925e5 Compare August 12, 2020 18:09
@codecov-commenter
Copy link

codecov-commenter commented Aug 12, 2020

Codecov Report

Merging #10592 into master will decrease coverage by 4.71%.
The diff coverage is 8.33%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master   #10592      +/-   ##
==========================================
- Coverage   63.98%   59.26%   -4.72%     
==========================================
  Files         768      356     -412     
  Lines       36359    22908   -13451     
  Branches     3431        0    -3431     
==========================================
- Hits        23264    13577    -9687     
+ Misses      12982     9331    -3651     
+ Partials      113        0     -113     
Flag Coverage Δ
#cypress ?
#javascript ?
#python 59.26% <8.33%> (-0.46%) ⬇️

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

Impacted Files Coverage Δ
...347acb39_add_extra_column_to_tables_and_metrics.py 0.00% <0.00%> (ø)
superset/tasks/slack_util.py 89.47% <100.00%> (ø)
superset/views/database/mixins.py 59.64% <0.00%> (-22.81%) ⬇️
superset/db_engine_specs/mysql.py 79.16% <0.00%> (-12.50%) ⬇️
superset/db_engine_specs/presto.py 70.56% <0.00%> (-12.14%) ⬇️
superset/views/database/validators.py 78.94% <0.00%> (-5.27%) ⬇️
superset/examples/world_bank.py 97.10% <0.00%> (-2.90%) ⬇️
superset/databases/api.py 85.18% <0.00%> (-2.78%) ⬇️
superset/examples/birth_names.py 97.36% <0.00%> (-2.64%) ⬇️
superset/db_engine_specs/postgres.py 97.43% <0.00%> (-2.57%) ⬇️
... and 423 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 8fb304d...c8925e5. Read the comment docs.

@@ -26,7 +26,7 @@
from superset import app

# Globals
config = app.config # type: ignore
config = app.config
Copy link
Member Author

Choose a reason for hiding this comment

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

needed to pass CI

@etr2460 etr2460 merged commit bd88e12 into apache:master Aug 12, 2020
Ofeknielsen pushed a commit to ofekisr/incubator-superset that referenced this pull request Oct 5, 2020
@etr2460 etr2460 mentioned this pull request Oct 30, 2020
6 tasks
auxten pushed a commit to auxten/incubator-superset that referenced this pull request Nov 20, 2020
@mistercrunch mistercrunch added 🏷️ bot A label used by `supersetbot` to keep track of which PR where auto-tagged with release labels 🚢 0.38.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 risk:db-migration PRs that require a DB migration size/M 🚢 0.38.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants