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

Use Data field when fetching in remote #1076

Merged
merged 6 commits into from
Jul 28, 2021
Merged

Conversation

jonjohnsonjr
Copy link
Collaborator

No description provided.

@codecov-commenter
Copy link

codecov-commenter commented Jul 12, 2021

Codecov Report

Merging #1076 (0fa0b3d) into main (596751a) will decrease coverage by 0.05%.
The diff coverage is 63.63%.

Impacted file tree graph

@@            Coverage Diff             @@
##             main    #1076      +/-   ##
==========================================
- Coverage   75.49%   75.44%   -0.06%     
==========================================
  Files         107      107              
  Lines        5129     5159      +30     
==========================================
+ Hits         3872     3892      +20     
- Misses        709      714       +5     
- Partials      548      553       +5     
Impacted Files Coverage Δ
pkg/v1/manifest.go 100.00% <ø> (ø)
pkg/v1/mutate/image.go 68.59% <0.00%> (-1.16%) ⬇️
pkg/v1/mutate/index.go 79.26% <0.00%> (-1.99%) ⬇️
pkg/v1/remote/index.go 83.17% <66.66%> (-0.50%) ⬇️
pkg/v1/remote/image.go 79.01% <71.42%> (-0.72%) ⬇️
internal/verify/verify.go 94.28% <80.00%> (-5.72%) ⬇️

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 596751a...0fa0b3d. Read the comment docs.

Copy link
Collaborator

@imjasonh imjasonh left a comment

Choose a reason for hiding this comment

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

The addition of a possibly-gigantic data elements in manifest contents makes me want a remote.WithMaxManifestSize option (and maybe some sane large default) to prevent resource exhaustion when fetching manifests.

Clients can throw a io.LimitReader around layer.Compressed(), but they can't currently easily prevent a huge manifest from being fetched and read.

pkg/v1/remote/image.go Outdated Show resolved Hide resolved
@jonjohnsonjr jonjohnsonjr marked this pull request as draft July 12, 2021 20:38
@jonjohnsonjr
Copy link
Collaborator Author

The addition of a possibly-gigantic data elements in manifest contents makes me want a remote.WithMaxManifestSize option (and maybe some sane large default) to prevent resource exhaustion when fetching manifests.

I think we'd need to rewrite a ton of code if we want to start going down this path. I'd propose we punt on that for now and rethink how this would work in a v2 world.

@jonjohnsonjr jonjohnsonjr marked this pull request as ready for review July 26, 2021 20:53
Copy link
Collaborator

@imjasonh imjasonh left a comment

Choose a reason for hiding this comment

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

Love it, ship it.

@jonjohnsonjr jonjohnsonjr merged commit 45aaa6c into google:main Jul 28, 2021
@jonjohnsonjr jonjohnsonjr deleted the data branch July 28, 2021 20:59
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.

None yet

3 participants