nessie icon indicating copy to clipboard operation
nessie copied to clipboard

Implement NessieApiV1 method for UnreachableReferenceHeads

Open ajantha-bhat opened this issue 2 years ago • 2 comments

  • Support NessieApiV1 API for Unreachable reference heads.
  • Implement Authz with VIEW_UNREACHABLE_REFERENCE_HEADS.
  • REST endpoint path for unreachableHeads.
  • Move contents of ReferenceUtils to AbstractDatabaseAdapter.

TODO: GCImpl#collectDeadReferences() to use this new API. I tried replacing it, but GC algorithm needs to know when the reference is dropped (before or after cutoff time) to handle some time travel scenarios. So, just the unreachable heads are not enough to replace reflog functionality.

Fixes #4690

ajantha-bhat avatar Jul 21 '22 17:07 ajantha-bhat

Codecov Report

Merging #4759 (0d8ab4f) into main (3f0c2a2) will increase coverage by 0.16%. The diff coverage is 94.47%.

:exclamation: Current head 0d8ab4f differs from pull request most recent head 21ffc00. Consider uploading reports for the commit 21ffc00 to get more accurate results

@@             Coverage Diff              @@
##               main    #4759      +/-   ##
============================================
+ Coverage     86.41%   86.58%   +0.16%     
- Complexity     3642     3662      +20     
============================================
  Files           416      402      -14     
  Lines         16995    16793     -202     
  Branches       1454     1366      -88     
============================================
- Hits          14687    14540     -147     
+ Misses         1803     1758      -45     
+ Partials        505      495      -10     
Flag Coverage Δ
java 86.93% <94.47%> (+0.08%) :arrow_up:
javascript ∅ <ø> (∅)
python 82.86% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
...ojectnessie/services/authz/BatchAccessChecker.java 100.00% <ø> (ø)
...java/org/projectnessie/versioned/VersionStore.java 100.00% <ø> (ø)
...d/persist/adapter/spi/AbstractDatabaseAdapter.java 89.94% <86.53%> (-0.22%) :arrow_down:
...tnessie/services/impl/UnreachableHeadsApiImpl.java 87.50% <87.50%> (ø)
...ie/services/rest/RestUnreachableHeadsResource.java 90.00% <90.00%> (ø)
...nessie/client/http/HttpUnreachableHeadsClient.java 100.00% <100.00%> (ø)
...org/projectnessie/client/http/NessieApiClient.java 94.11% <100.00%> (+0.78%) :arrow_up:
...rg/projectnessie/client/http/NessieHttpClient.java 82.85% <100.00%> (+0.24%) :arrow_up:
...org/projectnessie/client/http/v1api/HttpApiV1.java 100.00% <100.00%> (ø)
.../projectnessie/jaxrs/ext/NessieJaxRsExtension.java 88.42% <100.00%> (+0.12%) :arrow_up:
... and 27 more

Continue to review full report at Codecov.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update 822cac5...21ffc00. Read the comment docs.

codecov[bot] avatar Jul 22 '22 06:07 codecov[bot]

@snazy : I couldn't address any of the comments (as I have questions for them). I have replied to the comments. Please reply back.

ajantha-bhat avatar Jul 27 '22 02:07 ajantha-bhat

https://github.com/projectnessie/nessie/issues/4690 is closed as this use case is not needed for GC. Hence, closing the PR aswell.

ajantha-bhat avatar Sep 02 '22 06:09 ajantha-bhat