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(database): allow filtering by UUID #26469

Merged
merged 1 commit into from
Jan 12, 2024
Merged

Conversation

betodealmeida
Copy link
Member

SUMMARY

I found a regression where we can longer filter databases by the UUID. While this functionality is not used by Superset, the Preset CLI relies on it (and is used not just with Preset workspaces, but with standalone Superset deployments for multiple reasons).

This PR brings back the functionality, and adds a unit test to prevent future breakage.

BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF

N/A

TESTING INSTRUCTIONS

Run something like:

http://localhost:8089/api/v1/database/?q=(filters:!((col:uuid,opr:eq,value:%276ae566ae36f64a19a210621253414d03%27),(col:changed_by,opr:rel_o_m,value:1)),order_column:changed_on_delta_humanized,order_direction:desc,page:0,page_size:25)

And verify that it works.

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

Copy link

codecov bot commented Jan 12, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (494068b) 67.04% compared to head (9badf5a) 69.16%.

Additional details and impacted files
@@            Coverage Diff             @@
##           master   #26469      +/-   ##
==========================================
+ Coverage   67.04%   69.16%   +2.12%     
==========================================
  Files        1948     1948              
  Lines       76062    76062              
  Branches     8493     8493              
==========================================
+ Hits        50995    52609    +1614     
+ Misses      22887    21273    -1614     
  Partials     2180     2180              
Flag Coverage Δ
hive 53.68% <ø> (ø)
javascript 56.50% <ø> (ø)
mysql 78.06% <ø> (ø)
postgres 78.16% <ø> (ø)
presto 53.63% <ø> (?)
python 82.86% <ø> (+4.41%) ⬆️
sqlite 77.75% <ø> (ø)
unit 55.89% <ø> (?)

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

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@betodealmeida betodealmeida merged commit e36c014 into master Jan 12, 2024
55 checks passed
@villebro
Copy link
Member

Tagging the PR that caused the regression: #25961 For future reference, it's probably a good idea to always explicitly specify all searchable columns when creating new API classes to avoid regressions like this.

@michael-s-molina michael-s-molina added v3.0 Label added by the release manager to track PRs to be included in the 3.0 branch v3.1 Label added by the release manager to track PRs to be included in the 3.1 branch labels Jan 17, 2024
michael-s-molina pushed a commit that referenced this pull request Jan 18, 2024
@mistercrunch mistercrunch added 🍒 3.0.4 🍒 3.1.1 🏷️ bot A label used by `supersetbot` to keep track of which PR where auto-tagged with release labels labels Mar 8, 2024
sfirke pushed a commit to sfirke/superset that referenced this pull request Mar 22, 2024
@rusackas rusackas deleted the allow-filtering-uuid branch April 16, 2024 16:51
vinothkumar66 pushed a commit to vinothkumar66/superset that referenced this pull request Nov 11, 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/M v3.0 Label added by the release manager to track PRs to be included in the 3.0 branch v3.1 Label added by the release manager to track PRs to be included in the 3.1 branch 🍒 3.0.4 🍒 3.1.1 🍒 3.1.2 🍒 3.1.3 🚢 4.0.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants