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

[migration] make names non-nullable #8371

Merged
merged 1 commit into from
Oct 15, 2019

Conversation

serenajiang
Copy link
Contributor

@serenajiang serenajiang commented Oct 10, 2019

CATEGORY

Choose one

  • Bug Fix
  • Enhancement (new features, refinement)
  • Refactor
  • Add tests
  • Build / Development Environment
  • Documentation

SUMMARY

Another try for #8332, which made dbs.database_name, clusters.cluster_name, and tables.table_name non-null to prevent __repr__ from ever returning None.

Tweaked to also make datasources.cluster_name non-nullable. It has a foreign key constraint with clusters.cluster_name and was breaking deploys.

TEST PLAN

Ran upgrade and downgrade, confirmed that the database schema looks as expected after each action.

Deployed. Confirmed does not break deploy.

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

REVIEWERS

@etr2460 @john-bodley

@serenajiang serenajiang changed the title [WIP] make names non-nullable [fix] make names non-nullable Oct 10, 2019
@etr2460
Copy link
Member

etr2460 commented Oct 11, 2019

looks like ci is broken

@serenajiang serenajiang reopened this Oct 12, 2019
@serenajiang serenajiang changed the title [fix] make names non-nullable [migration] make names non-nullable Oct 12, 2019
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.

I’m still somewhat perplexed as to why this was working before, i.e., how one could delete a cluster when there were associated datasources.

I think your logic seems sound. The Cypress tests were failing so I restarted them (they can be flakey at times).

tests/druid_tests.py Outdated Show resolved Hide resolved
@codecov-io
Copy link

codecov-io commented Oct 14, 2019

Codecov Report

Merging #8371 into master will decrease coverage by 7.02%.
The diff coverage is n/a.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #8371      +/-   ##
==========================================
- Coverage   67.57%   60.55%   -7.03%     
==========================================
  Files         448      332     -116     
  Lines       22527    10254   -12273     
  Branches     2364     2364              
==========================================
- Hits        15222     6209    -9013     
+ Misses       7167     3907    -3260     
  Partials      138      138
Impacted Files Coverage Δ
superset/connectors/druid/__init__.py
superset/views/datasource.py
superset/models/sql_lab.py
superset/examples/helpers.py
superset/utils/import_datasource.py
superset/views/database/forms.py
superset/tasks/schedules.py
superset/db_engine_specs/bigquery.py
superset/examples/tabbed_dashboard.py
superset/db_engine_specs/athena.py
... and 103 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 2117d1e...ce0b8cf. Read the comment docs.

@john-bodley john-bodley merged commit 876d329 into apache:master Oct 15, 2019
@mistercrunch mistercrunch added 🏷️ bot A label used by `supersetbot` to keep track of which PR where auto-tagged with release labels 🚢 0.35.0 labels Feb 28, 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/L 🚢 0.35.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants