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

chore(tags): Allow for lookup via ids vs. name in the API #25996

Merged
merged 7 commits into from
Nov 29, 2023

Conversation

hughhhh
Copy link
Member

@hughhhh hughhhh commented Nov 15, 2023

SUMMARY

Previously we the API only supported queries using the names as way of querying tags, I've updated the API to now accept IDs (better pattern) to allow names to have commas. We discovered the issue in testing and took advantage the opportunity to refactor this piece of code, but also leaving tags param for backwards compatibility.

curl 'http://127.0.0.1:54647/api/v1/tag/get_objects/?tagIds=17,12,13' \
-X 'GET' \
-H 'Accept: application/json' \
# ...

TESTING INSTRUCTIONS

  1. goto all entities page (http://127.0.0.1:8080/superset/all_entities)
  2. see page render with new network call

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

@hughhhh hughhhh changed the title allow for lookup via ids vs. name chore(tags): allow for lookup via ids vs. name in API Nov 16, 2023
@hughhhh hughhhh changed the title chore(tags): allow for lookup via ids vs. name in API chore(tags): Allow for lookup via ids vs. name in the API Nov 16, 2023
@hughhhh hughhhh marked this pull request as ready for review November 16, 2023 20:40
@@ -194,3 +194,20 @@ export function fetchObjects(
.then(({ json }) => callback(json.result))
.catch(response => error(response));
}

export function fetchObjectsByTagIds(
Copy link
Member

Choose a reason for hiding this comment

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

is fetchObjects above this just dead code now? I don't see it being used elsewhere.

@lilykuang lilykuang merged commit ee308fb into apache:master Nov 29, 2023
51 checks passed
@lilykuang lilykuang deleted the fix-commas-test branch November 29, 2023 19:00
@sadpandajoe
Copy link
Contributor

🏷️ preset:2023.47

sadpandajoe pushed a commit to preset-io/superset that referenced this pull request Nov 29, 2023
@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 Nov 30, 2023
michael-s-molina pushed a commit that referenced this pull request Dec 4, 2023
josedev-union pushed a commit to Ortege-xyz/studio that referenced this pull request Jan 22, 2024
@mistercrunch mistercrunch added 🍒 3.1.0 🍒 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
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.1 Label added by the release manager to track PRs to be included in the 3.1 branch 🍒 3.1.0 🍒 3.1.1
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

6 participants