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(tags): Filter system tags from the tags list #26701

Merged
merged 4 commits into from
Jan 26, 2024

Conversation

Vitor-Avila
Copy link
Contributor

@Vitor-Avila Vitor-Avila commented Jan 20, 2024

SUMMARY

System tags used to be filtered from the Tags list (by filtering tags with : on their name). As a consequence, any user-created tag that included : were not listed as well. #26324 fixed the issue by showing PRs with :, which re-introduced system tags to the table.

This PR adds a custom_tag boolean filter operator to the Tags API so that system tags are properly filtered out from the API response. Filtering these tags in the Client/Frontend side is not effective since your first page might be only system tags, so you would end up with 0 results in the table (and no option to paginate) + you would also end up with inconsistent counts per page.

BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF

Before

image

After

image

TESTING INSTRUCTIONS

  1. Make sure that TAGGING_SYSTEM is enabled.
  2. Add any account as an owner to any asset.
  3. Navigate to Settings > Tags.
  4. Validate that the system tag (owner:{{user_id}}) is not listed.

ADDITIONAL INFORMATION

  • Has associated issue:
  • Required feature flags: TAGGING_SYSTEM
  • 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 20, 2024

Codecov Report

Attention: 4 lines in your changes are missing coverage. Please review.

Comparison is base (e86d4d3) 69.48% compared to head (5a0f752) 69.50%.

Files Patch % Lines
superset-frontend/src/pages/Tags/index.tsx 0.00% 3 Missing ⚠️
superset/tags/filters.py 92.30% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master   #26701      +/-   ##
==========================================
+ Coverage   69.48%   69.50%   +0.02%     
==========================================
  Files        1894     1895       +1     
  Lines       74138    74155      +17     
  Branches     8243     8243              
==========================================
+ Hits        51515    51542      +27     
+ Misses      20554    20538      -16     
- Partials     2069     2075       +6     
Flag Coverage Δ
hive 53.85% <66.66%> (+<0.01%) ⬆️
javascript 56.90% <0.00%> (+0.03%) ⬆️
mysql 78.03% <93.33%> (+0.03%) ⬆️
postgres 78.13% <93.33%> (+<0.01%) ⬆️
presto 53.80% <66.66%> (+<0.01%) ⬆️
python 83.01% <93.33%> (+<0.01%) ⬆️
sqlite 77.71% <93.33%> (+<0.01%) ⬆️
unit 56.39% <66.66%> (+<0.01%) ⬆️

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.

@john-bodley john-bodley self-requested a review January 22, 2024 17:58
@eschutho eschutho self-requested a review January 22, 2024 22:55
Copy link
Member

@eschutho eschutho 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 @Vitor-Avila!

@eschutho eschutho merged commit 4f56f5e into apache:master Jan 26, 2024
33 checks passed
@michael-s-molina michael-s-molina added the v3.1 Label added by the release manager to track PRs to be included in the 3.1 branch label Jan 26, 2024
@mistercrunch mistercrunch added 🍒 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
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/L v3.1 Label added by the release manager to track PRs to be included in the 3.1 branch 🍒 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.

4 participants