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: add validation on tag name to have name + onDelete refresh list view #25831

Merged
merged 8 commits into from
Nov 4, 2023

Conversation

hughhhh
Copy link
Member

@hughhhh hughhhh commented Nov 1, 2023

SUMMARY

add validation on tag name to have name

bug in production that allows users to create tags without names. So we added validation to the schema to make sure the length of the tag name field is atleast 1.

Screenshot 2023-11-02 at 4 49 21 PM

fix reload callback after deleting tag

before hand the callback would execute before a tag would actually be deleted from the db. So fixed it the refresh to be called after success/failed request

Screen.Recording.2023-11-02.at.3.44.59.PM.mov

BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF

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

@@ -58,7 +58,7 @@ class TaggedObjectEntityResponseSchema(Schema):


class TagObjectSchema(Schema):
name = fields.String()
name = fields.String(validate=Length(min=1))
Copy link
Member

Choose a reason for hiding this comment

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

Does this logic also need to reside within the Command or DAO? Additionally do we have any tests for schema validation?

Copy link
Member Author

Choose a reason for hiding this comment

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

it lies in the API, I'm working on a test now to validate

@pull-request-size pull-request-size bot added size/M and removed size/XS labels Nov 2, 2023
@hughhhh hughhhh changed the title fix: add validation on tag name to have name fix: add validation on tag name to have name + onDelete refresh list view Nov 2, 2023
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.

Approved pending tests

hughhhh and others added 4 commits November 3, 2023 13:15
Co-authored-by: Elizabeth Thompson <eschutho@gmail.com>
Co-authored-by: Elizabeth Thompson <eschutho@gmail.com>
@hughhhh hughhhh merged commit 80cf710 into apache:master Nov 4, 2023
29 checks passed
@hughhhh hughhhh deleted the validate-tag-name branch November 4, 2023 14:09
cccs-rc pushed a commit to CybercentreCanada/superset that referenced this pull request Mar 6, 2024
…view (apache#25831)

Co-authored-by: Elizabeth Thompson <eschutho@gmail.com>
@mistercrunch mistercrunch added 🏷️ bot A label used by `supersetbot` to keep track of which PR where auto-tagged with release labels 🚢 3.1.0 labels Mar 8, 2024
sfirke pushed a commit to sfirke/superset that referenced this pull request Mar 22, 2024
…view (apache#25831)

Co-authored-by: Elizabeth Thompson <eschutho@gmail.com>
vinothkumar66 pushed a commit to vinothkumar66/superset that referenced this pull request Nov 11, 2024
…view (apache#25831)

Co-authored-by: Elizabeth Thompson <eschutho@gmail.com>
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 🚢 3.1.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants