marquez icon indicating copy to clipboard operation
marquez copied to clipboard

delete: add possibility to soft-delete datasets

Open mobuchowski opened this issue 3 years ago • 4 comments

First part of #1736 - ability to "soft delete" datasets - API to "hide" them which can be used from UI. This PR does not include the UI part. It uses the is_deleted flag that was added by @pawel-big-lebowski in lifecycle state facet support.

This will be followed with ability to do the same with jobs.

Signed-off-by: Maciej Obuchowski [email protected]

mobuchowski avatar Jul 06 '22 15:07 mobuchowski

This looks really great. The only inconsistency I see is that:

  • findBySomething does return soft-deleted datasets,
  • findAll does not return them. Such a behavior definitely makes here sense but can confuse other contributors.

What if we introduced includeDeleted parameter in the URL and make default values true and false for findByName/findAll respectively. ?

pawel-big-lebowski avatar Jul 12 '22 08:07 pawel-big-lebowski

Codecov Report

Merging #2032 (17aaa8f) into main (27b54ed) will increase coverage by 0.03%. The diff coverage is 80.48%.

@@             Coverage Diff              @@
##               main    #2032      +/-   ##
============================================
+ Coverage     75.11%   75.14%   +0.03%     
- Complexity     1020     1023       +3     
============================================
  Files           202      202              
  Lines          4798     4836      +38     
  Branches        392      392              
============================================
+ Hits           3604     3634      +30     
- Misses          754      762       +8     
  Partials        440      440              
Impacted Files Coverage Δ
api/src/main/java/marquez/db/DatasetDao.java 98.52% <ø> (ø)
api/src/main/java/marquez/db/DatasetFieldDao.java 100.00% <ø> (ø)
...pi/src/main/java/marquez/db/DatasetVersionDao.java 95.83% <ø> (ø)
api/src/main/java/marquez/db/JobDao.java 100.00% <ø> (ø)
api/src/main/java/marquez/db/JobVersionDao.java 91.04% <ø> (ø)
...va/src/main/java/marquez/client/MarquezClient.java 57.43% <0.00%> (-1.83%) :arrow_down:
...java/src/main/java/marquez/client/MarquezHttp.java 81.91% <83.33%> (+0.20%) :arrow_up:
api/src/main/java/marquez/api/DatasetResource.java 95.00% <100.00%> (+0.76%) :arrow_up:
api/src/main/java/marquez/api/JobResource.java 93.10% <100.00%> (+0.79%) :arrow_up:
.../src/main/java/marquez/service/LineageService.java 85.32% <100.00%> (+0.85%) :arrow_up:

:mega: We’re building smart automated test selection to slash your CI/CD build times. Learn more

codecov[bot] avatar Aug 04 '22 15:08 codecov[bot]

@pawel-big-lebowski changed how this works. Now it all references view.

mobuchowski avatar Aug 08 '22 13:08 mobuchowski

@wslulciuc can you take a look?

Also, can you think of any additional tests this might need?

mobuchowski avatar Aug 08 '22 13:08 mobuchowski

Next time I won't change query formatting AND query itself in one PR - it makes resolving conflicts unpleasant 😞

mobuchowski avatar Aug 30 '22 13:08 mobuchowski