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(chart): non existent time grain no longer breaks the application #23441

Merged
merged 3 commits into from
Mar 23, 2023

Conversation

rdubois
Copy link
Contributor

@rdubois rdubois commented Mar 21, 2023

SUMMARY

The description of the issue can be found here: #23440

BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF

Skipped

TESTING INSTRUCTIONS

Please read the Expected/Actual result here.

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

@codecov
Copy link

codecov bot commented Mar 21, 2023

Codecov Report

Merging #23441 (2c5c31e) into master (7ef06b0) will increase coverage by 0.23%.
The diff coverage is 100.00%.

❗ Current head 2c5c31e differs from pull request most recent head 2696afb. Consider uploading reports for the commit 2696afb to get more accurate results

@@            Coverage Diff             @@
##           master   #23441      +/-   ##
==========================================
+ Coverage   65.76%   66.00%   +0.23%     
==========================================
  Files        1908     1908              
  Lines       73726    73726              
  Branches     7989     7989              
==========================================
+ Hits        48489    48662     +173     
+ Misses      23189    23016     -173     
  Partials     2048     2048              
Flag Coverage Δ
hive 52.73% <0.00%> (?)
mysql 78.44% <100.00%> (?)
postgres 78.50% <100.00%> (ø)
presto 52.66% <0.00%> (?)
python 78.99% <100.00%> (+0.48%) ⬆️
sqlite 77.01% <100.00%> (?)

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

Impacted Files Coverage Δ
superset/db_engine_specs/base.py 82.49% <100.00%> (+2.81%) ⬆️

... and 14 files with indirect coverage changes

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

Copy link
Member

@villebro villebro 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! A few minor comments, other than that LGTM

superset/db_engine_specs/base.py Outdated Show resolved Hide resolved
@@ -332,11 +332,12 @@ def is_readonly(sql: str) -> bool:

def test_time_grain_denylist():
config = app.config.copy()
app.config["TIME_GRAIN_DENYLIST"] = ["PT1M"]
app.config["TIME_GRAIN_DENYLIST"] = ["PT1M", "SQLITE_INEXISTING_GRAIN"]
Copy link
Member

Choose a reason for hiding this comment

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

spelling nit, do you think SQLITE_NONEXISTENT_GRAIN could work?

rdubois and others added 2 commits March 21, 2023 17:06
Co-authored-by: Ville Brofeldt <33317356+villebro@users.noreply.github.com>
@rdubois
Copy link
Contributor Author

rdubois commented Mar 21, 2023

Thanks @villebro. I'm good with those suggestions. They have been checked in.

@rdubois rdubois changed the title fix(chart): inexisting time grain no longer breaks the application fix(chart): non existent time grain no longer breaks the application Mar 21, 2023
Copy link
Member

@villebro villebro left a comment

Choose a reason for hiding this comment

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

LGTM, thanks for this fix!

@villebro villebro merged commit 07a6328 into apache:master Mar 23, 2023
@rusackas rusackas added the 2.1.1 label Apr 21, 2023
@eschutho eschutho added the v2.1 label May 12, 2023
eschutho pushed a commit to preset-io/superset that referenced this pull request May 23, 2023
…pache#23441)

Co-authored-by: Ville Brofeldt <33317356+villebro@users.noreply.github.com>
(cherry picked from commit 07a6328)
eschutho pushed a commit that referenced this pull request May 23, 2023
…23441)

Co-authored-by: Ville Brofeldt <33317356+villebro@users.noreply.github.com>
(cherry picked from commit 07a6328)
eschutho pushed a commit that referenced this pull request May 25, 2023
…23441)

Co-authored-by: Ville Brofeldt <33317356+villebro@users.noreply.github.com>
(cherry picked from commit 07a6328)
eschutho pushed a commit that referenced this pull request May 31, 2023
…23441)

Co-authored-by: Ville Brofeldt <33317356+villebro@users.noreply.github.com>
(cherry picked from commit 07a6328)
@mistercrunch mistercrunch added 🍒 2.1.1 🍒 2.1.2 🍒 2.1.3 🏷️ bot A label used by `supersetbot` to keep track of which PR where auto-tagged with release labels 🚢 3.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
2.1.1 🏷️ bot A label used by `supersetbot` to keep track of which PR where auto-tagged with release labels size/XS v2.1 🍒 2.1.1 🍒 2.1.2 🍒 2.1.3 🚢 3.0.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants