nativelink icon indicating copy to clipboard operation
nativelink copied to clipboard

Implement get_tree() feature

Open boldpulse opened this issue 1 year ago • 2 comments

Description

I handled get_tree() GRPC request in the CAS Server. Used FIFO(First-In-First-Out) traversal method ( BFS Algorithm ) to loop over directories using VecDeque data structure. Paging is supported and page_token in GetTreeRequest is used to point the directory to start traversing with. And next_page_token in GetTreeResponse refers the page_token parameter which will be used in the next request.

Fixes #355

Type of change

Please delete options that aren't relevant.

  • [x] New feature (non-breaking change which adds functionality)

How Has This Been Tested?

Still not tested yet.

Checklist

  • [x] Updated documentation if needed
  • [ ] Tests added/amended
  • [x] bazel test //... passes locally
  • [x] PR is contained in a single commit, using git amend see some docs

This change is Reviewable

boldpulse avatar May 09 '24 08:05 boldpulse

+@allada, @MarcusSorealheis

boldpulse avatar May 09 '24 08:05 boldpulse

@aleksdmladenovic can we add tests ?

adam-singer avatar May 09 '24 17:05 adam-singer

This looks good. thank you for the PR aleksdmladenovic!

MarcusSorealheis avatar May 15 '24 11:05 MarcusSorealheis

@allada If this looks good still, please merge it.Even though we don't use it, a lot of tools do use it so maybe it will be helpful to NativeLink users.

MarcusSorealheis avatar May 15 '24 12:05 MarcusSorealheis

@aleksdmladenovic what was the reason for the most recent push?

MarcusSorealheis avatar May 15 '24 23:05 MarcusSorealheis

Looks like it may have been a rebase but correct me if I am wrong.

MarcusSorealheis avatar May 15 '24 23:05 MarcusSorealheis

Just rebase. cc: @MarcusSorealheis

boldpulse avatar May 15 '24 23:05 boldpulse