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(dataset): import/export jinja template bug #28790

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

crabulous
Copy link

@crabulous crabulous commented May 31, 2024

SUMMARY

While deleting the existing jinja parameter, in dataset editor, an empty string was saved instead of the None value, which was incorrectly processed during export/import. For bug fix, the @pre_load method was added, which would replace an empty string in template_params with the value None

BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF

image

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

@dosubot dosubot bot added data:dataset Related to dataset configurations global:jinja Related to Jinja templating labels May 31, 2024
@crabulous
Copy link
Author

@supersetbot orglabel

Copy link
Contributor

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

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

Congrats on making your first PR and thank you for contributing to Superset! 🎉 ❤️

We hope to see you in our Slack community too! Not signed up? Use our Slack App to self-register.

@john-bodley
Copy link
Member

@crabulous thanks for the PR. Would you mind adding unit tests to prevent future regressions?

@crabulous
Copy link
Author

@crabulous thanks for the PR. Would you mind adding unit tests to prevent future regressions?

I did it) Check my test, please!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
data:dataset Related to dataset configurations global:jinja Related to Jinja templating size/M TechAudit-BI
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants