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

add DELETE end point for dataset tags #2698

Merged

Conversation

davidsharp7
Copy link
Member

@davidsharp7 davidsharp7 commented Dec 9, 2023

Problem

Currently we have no way via the API to a delete a tag from a dataset meaning datasets could potentially be "mis tagged"

Closes: #2692

Solution

Solution is to create a DELETE end point which removes the linkage between the dataset and the tag in

datasets_tag_mapping

One-line summary:

Add DELETE end point for dataset tags.

  • You've signed-off your work
  • Your changes are accompanied by tests (if relevant)
  • Your change contains a small diff and is self-contained
  • You've updated any relevant documentation (if relevant)
  • You've included a one-line summary of your change for the CHANGELOG.md (Depending on the change, this may not be necessary).
  • You've versioned your .sql database schema migration according to Flyway's naming convention (if relevant)
  • You've included a header in any source code files (if relevant)

Signed-off-by: sharpd <number6labs@gmail.com>
@boring-cyborg boring-cyborg bot added the api API layer changes label Dec 9, 2023
Copy link

netlify bot commented Dec 9, 2023

Deploy Preview for peppy-sprite-186812 canceled.

Name Link
🔨 Latest commit f87658e
🔍 Latest deploy log https://app.netlify.com/sites/peppy-sprite-186812/deploys/657c80ec086f9700086e1d71

Signed-off-by: sharpd <number6labs@gmail.com>
Copy link

codecov bot commented Dec 9, 2023

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (033cea3) 84.24% compared to head (f87658e) 84.27%.

Additional details and impacted files
@@             Coverage Diff              @@
##               main    #2698      +/-   ##
============================================
+ Coverage     84.24%   84.27%   +0.03%     
- Complexity     1405     1407       +2     
============================================
  Files           249      249              
  Lines          6371     6386      +15     
  Branches        291      291              
============================================
+ Hits           5367     5382      +15     
  Misses          851      851              
  Partials        153      153              

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

Copy link
Collaborator

@pawel-big-lebowski pawel-big-lebowski left a comment

Choose a reason for hiding this comment

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

I really like @wslulciuc approach to inregration tests introduced here -> #2700

I know the testing approach is newer than this PR, but the code here seems to be the perfect candidate to write a neat integration test. This will also require implenting tag deleting feature in Marquez client.

SELECT 1
FROM datasets d
JOIN tags t ON d.uuid = dtm.dataset_uuid AND t.uuid = dtm.tag_uuid
WHERE d.name = :datasetName AND t.name = :tagName
Copy link
Collaborator

Choose a reason for hiding this comment

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

Shouldn't where condition contain namespace filter as well?

Copy link
Member Author

@davidsharp7 davidsharp7 Dec 12, 2023

Choose a reason for hiding this comment

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

I am guessing you are thinking of the scenario where a dataset name could span 2 namespaces?

Cool will add.

@davidsharp7 davidsharp7 marked this pull request as ready for review December 13, 2023 17:59
@wslulciuc wslulciuc added this to the 0.43.0 milestone Dec 15, 2023
Copy link
Member

@wslulciuc wslulciuc left a comment

Choose a reason for hiding this comment

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

LGTM! 💯 🥇

@wslulciuc wslulciuc merged commit 4194d28 into MarquezProject:main Dec 15, 2023
16 checks passed
@davidsharp7 davidsharp7 deleted the api/add_delete_endpoint_for_tags branch December 31, 2023 00:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
api API layer changes client/java
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

Adding a DELETE end point for dataset level tags
3 participants