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: write new dataset on update table if it doesn't exist #19269

Merged

Conversation

eschutho
Copy link
Member

SUMMARY
We are currently dual writing any updates/additions of the SqlaTable to the new Dataset models. We found some errors during update where the new dataset should also be updated, but it doesn't exist. I'm not sure if the dataset wasn't created because when the migration to backfill was run a new SqlaTable was created and we missed it, or we're missing it somewhere else. But for now, I'm catching this error and recreating the new dataset if the shadow model wasn't created.

I'm only updating the hook where we're currently seeing errors. There's potentially more that we can do on this after more monitoring.

TESTING INSTRUCTIONS
Difficult to reproduce in order to test manually, but I recreated the situation in unit tests.

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

@superset-github-bot superset-github-bot bot added the Superset-Community-Partners Preset community partner program participants label Mar 21, 2022
@eschutho eschutho changed the title fix dataset update table fix: write new dataset on update table if it doesn't exist Mar 21, 2022
@eschutho eschutho removed the Superset-Community-Partners Preset community partner program participants label Mar 21, 2022
@eschutho eschutho force-pushed the elizabeth/fix-dataset-table-update branch from 97899f6 to 42ca7a8 Compare March 21, 2022 05:53
Copy link
Member

@betodealmeida betodealmeida left a comment

Choose a reason for hiding this comment

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

Looks great!

@betodealmeida betodealmeida merged commit 88029e2 into apache:master Mar 21, 2022
@sadpandajoe
Copy link
Member

🏷️ preset:2022.11

sadpandajoe pushed a commit to preset-io/superset that referenced this pull request Mar 21, 2022
michael-hoffman-26 pushed a commit to nielsen-oss/superset that referenced this pull request Mar 23, 2022
villebro pushed a commit that referenced this pull request Apr 3, 2022
(cherry picked from commit 88029e2)
@mistercrunch mistercrunch added 🍒 1.5.0 🍒 1.5.1 🍒 1.5.2 🍒 1.5.3 🏷️ bot A label used by `supersetbot` to keep track of which PR where auto-tagged with release labels 🚢 2.0.0 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 lts-v1 preset:2022.11 preset-io size/L 🍒 1.5.0 🍒 1.5.1 🍒 1.5.2 🍒 1.5.3 🚢 2.0.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants