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

Implement CAR CID iterator and supplier #10

Merged
merged 1 commit into from
Sep 7, 2021
Merged

Conversation

masih
Copy link
Member

@masih masih commented Aug 26, 2021

Implements mechanisms to list the CIDs given a CAR path, regardless of
the CAR's version. The mechanism allows paths to be put and removed, and
supplies CID iterators given a CAR ID.

Implement mechanism to generate CID IDs for a CAR file, regardless of
its version.

Implement a CID iterator reader that given a CID iterator and a
marshaller converts it into a stream of bytes as an io.ReadCloser.

Implement tests using sample CAR files in versions 1 and 2.

Run gofumpt -l -w . across the whole repo for consistent formatting.

Leave TODOs on undecided or improvable implementations to contain the PR
scope.

Increase test timeout in flaky engine tests.

@codecov-commenter
Copy link

codecov-commenter commented Aug 26, 2021

Codecov Report

Merging #10 (077ff12) into main (79faed2) will increase coverage by 1.97%.
The diff coverage is 66.45%.

Impacted file tree graph

@@            Coverage Diff             @@
##             main      #10      +/-   ##
==========================================
+ Coverage   60.05%   62.02%   +1.97%     
==========================================
  Files           9       12       +3     
  Lines         393      553     +160     
==========================================
+ Hits          236      343     +107     
- Misses        119      158      +39     
- Partials       38       52      +14     
Impacted Files Coverage Δ
core/engine/engine.go 48.17% <ø> (+0.34%) ⬆️
internal/suppliers/ciditerator_reader.go 64.00% <64.00%> (ø)
internal/suppliers/car_ciditerator.go 65.62% <65.62%> (ø)
internal/suppliers/car_supplier.go 67.30% <67.30%> (ø)

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 79faed2...077ff12. Read the comment docs.

@masih masih force-pushed the masih/car-cid-supplier branch 2 times, most recently from 9b98e4c to a985872 Compare August 26, 2021 16:35
@masih masih marked this pull request as ready for review August 26, 2021 16:43
@willscott
Copy link
Member

this appears to be fully within the internal package, is that expected / intentional?

@masih
Copy link
Member Author

masih commented Aug 26, 2021

this appears to be fully within the internal package, is that expected / intentional?

My rationale is to keep it internal until it's iterated over and baked in. Then expose as public API as needed. Happy to move now if you think that makes things clearer.

@masih masih force-pushed the masih/car-cid-supplier branch from a985872 to 08d4a5e Compare August 27, 2021 15:37
@masih masih marked this pull request as draft September 1, 2021 13:33
@masih masih force-pushed the masih/car-cid-supplier branch from 5878492 to fad4928 Compare September 7, 2021 10:10
@masih masih marked this pull request as ready for review September 7, 2021 10:12
@masih masih force-pushed the masih/car-cid-supplier branch from fad4928 to 077ff12 Compare September 7, 2021 10:15
Implements mechanisms to list the CIDs given a CAR path, regardless of
the CAR's version. The mechanism allows paths to be put and removed, and
supplies CID iterators given a CAR ID.

Implement mechanism to generate CID IDs for a CAR file, regardless of
its version.

Implement a CID iterator reader that given a CID iterator and a
marshaller converts it into a stream of bytes as an `io.ReadCloser`.

Implement tests using sample CAR files in versions 1 and 2.

Run `gofumpt -l -w .` across the whole repo for consistent formatting.

Leave TODOs on undecided or improvable implementations to contain the PR
scope.

Increase test timeout flaky engine tests.
@masih masih force-pushed the masih/car-cid-supplier branch from 077ff12 to 5abea20 Compare September 7, 2021 12:53
@masih masih merged commit 1222078 into main Sep 7, 2021
@masih masih deleted the masih/car-cid-supplier branch September 7, 2021 13:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants