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: skip row if created_at_fk is null #20939

Merged
merged 1 commit into from
Aug 2, 2022

Conversation

eschutho
Copy link
Member

@eschutho eschutho commented Aug 2, 2022

Some migrations are failing for ffa79af61a56 when a created_by_fk is blank for a dataset. This PR skips that row if null

TESTING INSTRUCTIONS

TBD

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

@eschutho eschutho requested a review from a team as a code owner August 2, 2022 01:02
@eschutho eschutho changed the title skip row if created_at_fk is null fix: skip row if created_at_fk is null Aug 2, 2022
@eschutho
Copy link
Member Author

eschutho commented Aug 2, 2022

@john-bodley this should fix the issue that @AAfghahi was reporting on #20617. I'm trying to get a test if possible, but I was able to test this locally.

@codecov
Copy link

codecov bot commented Aug 2, 2022

Codecov Report

Merging #20939 (fc55ac3) into master (ac58582) will not change coverage.
The diff coverage is n/a.

@@           Coverage Diff           @@
##           master   #20939   +/-   ##
=======================================
  Coverage   66.38%   66.38%           
=======================================
  Files        1766     1766           
  Lines       67225    67225           
  Branches     7135     7135           
=======================================
  Hits        44626    44626           
  Misses      20774    20774           
  Partials     1825     1825           
Flag Coverage Δ
hive 53.20% <ø> (ø)
mysql 81.02% <ø> (ø)
postgres 81.09% <ø> (ø)
presto 53.10% <ø> (ø)
python 81.56% <ø> (ø)
sqlite 79.67% <ø> (ø)
unit 50.52% <ø> (ø)

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

Impacted Files Coverage Δ
superset/views/sql_lab.py 60.52% <0.00%> (ø)

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

Copy link
Member

@ktmud ktmud left a comment

Choose a reason for hiding this comment

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

Thanks for the fix!

@eschutho
Copy link
Member Author

eschutho commented Aug 2, 2022

I'm going to merge this without a test, and I'm looking into a longer-term solution around alembic migration tests, possibly https://pypi.org/project/pytest-alembic/

@eschutho eschutho force-pushed the elizabeth/fix-dataset-migration branch from 33c0dc6 to fc55ac3 Compare August 2, 2022 22:19
@eschutho eschutho merged commit fb5f8ca into apache:master Aug 2, 2022
jinghua-qa pushed a commit to preset-io/superset that referenced this pull request Aug 2, 2022
@eschutho eschutho deleted the elizabeth/fix-dataset-migration branch October 21, 2022 20:59
@mistercrunch mistercrunch added 🏷️ bot A label used by `supersetbot` to keep track of which PR where auto-tagged with release labels 🚢 2.1.0 and removed 🚢 2.1.3 labels Mar 13, 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 preset:2022.31 size/S 🚢 2.1.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants