-
Notifications
You must be signed in to change notification settings - Fork 379
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
Simplify the tarball: transport #1923
Commits on Apr 17, 2023
-
Remove some completely unused fields of tarballImageSource
Signed-off-by: Miloslav Trmač <mitr@redhat.com>
Configuration menu - View commit details
-
Copy full SHA for 788f3f2 - Browse repository at this point
Copy the full SHA 788f3f2View commit details -
Use io.NopCloser instead of a copy
Should not change (test) behavior. Signed-off-by: Miloslav Trmač <mitr@redhat.com>
Configuration menu - View commit details
-
Copy full SHA for adafbea - Browse repository at this point
Copy the full SHA adafbeaView commit details -
Use bytes.NewReader instead of bytes.NewBufferString
We only want a Reader, so be more precise. More importantly, we want to remove all instances of the habit to use bytes.NewBuffer instead of bytes.NewReader (which can actually be unsafe), although that concern does not directly apply to these calls Should not change (test) behavior. Signed-off-by: Miloslav Trmač <mitr@redhat.com>
Configuration menu - View commit details
-
Copy full SHA for 65ffc9d - Browse repository at this point
Copy the full SHA 65ffc9dView commit details -
Don't use bytes.NewBuffer to construct io.Readers
NewBuffer documentation says > The new Buffer takes ownership of buf, and the > caller should not use buf after this call. which is not really what we want, and a potential risk. So, use the more directly applicable and safer bytes.Reader. Hopefully doesn't change behavior, except that reading the same laeyr from a tarball or sif transport is now well-defined. Signed-off-by: Miloslav Trmač <mitr@redhat.com>
Configuration menu - View commit details
-
Copy full SHA for c181ac2 - Browse repository at this point
Copy the full SHA c181ac2View commit details -
Don't redundantly store configSize
The slice already contains that value. Should not change behavior. Signed-off-by: Miloslav Trmač <mitr@redhat.com>
Configuration menu - View commit details
-
Copy full SHA for 8bf3b58 - Browse repository at this point
Copy the full SHA 8bf3b58View commit details -
Remove some unnecessary explicit variable declarations
Should not change behavior Signed-off-by: Miloslav Trmač <mitr@redhat.com>
Configuration menu - View commit details
-
Copy full SHA for 3eca5d6 - Browse repository at this point
Copy the full SHA 3eca5d6View commit details -
Don't manually compute a clone of tarballReference.filenames
Should not change behavior. Signed-off-by: Miloslav Trmač <mitr@redhat.com>
Configuration menu - View commit details
-
Copy full SHA for 2f83545 - Browse repository at this point
Copy the full SHA 2f83545View commit details -
Build config history directly while reading the layers
This allows removing the blobTimes array. Should not change behavior. Signed-off-by: Miloslav Trmač <mitr@redhat.com>
Configuration menu - View commit details
-
Copy full SHA for c99a7f3 - Browse repository at this point
Copy the full SHA c99a7f3View commit details -
Build layerDescriptors directly while scanning the layers
This allows us to remove the blobTypes array. Also fix a comment implying that only one layer can be present. Should not change behavior. Signed-off-by: Miloslav Trmač <mitr@redhat.com>
Configuration menu - View commit details
-
Copy full SHA for ac43f24 - Browse repository at this point
Copy the full SHA ac43f24View commit details -
Inline some single-use variables
Should not change behavior. Signed-off-by: Miloslav Trmač <mitr@redhat.com>
Configuration menu - View commit details
-
Copy full SHA for f399b28 - Browse repository at this point
Copy the full SHA f399b28View commit details -
Introduce a tarballImageSource.blobs map
Currently it only replaces blobIDs, replacing an O(N) scan with a hash lookup (although that's quite likely to be worse for the typical single-layer source); the use of fileIndex is a bit awkward. It will get better soon. Should not change behavior. Signed-off-by: Miloslav Trmač <mitr@redhat.com>
Configuration menu - View commit details
-
Copy full SHA for 608d6e9 - Browse repository at this point
Copy the full SHA 608d6e9View commit details -
Replace blobSizes with a size field in blobs
Keep the data together and avoid extra indexing. Should not change behavior. Signed-off-by: Miloslav Trmač <mitr@redhat.com>
Configuration menu - View commit details
-
Copy full SHA for f639c31 - Browse repository at this point
Copy the full SHA f639c31View commit details -
Replace tarballImageSource.filenames with .blobs.filename
Remove that separate array/indexing. This allows us to remove the short-lived fileIndex again. Should not change behavior. Signed-off-by: Miloslav Trmač <mitr@redhat.com>
Configuration menu - View commit details
-
Copy full SHA for dbcc5dc - Browse repository at this point
Copy the full SHA dbcc5dcView commit details -
Generalize tarballBlob to support in-memory blobs
... in more cases, not just stdin. Should not change behavior. Signed-off-by: Miloslav Trmač <mitr@redhat.com>
Configuration menu - View commit details
-
Copy full SHA for a14e113 - Browse repository at this point
Copy the full SHA a14e113View commit details -
Don't treat the config specially in tarballImageSource
Use the same []byte storage for stdin layers and for configs; that allows us to drop the config-specific fields from tarballImageSource and simplify. Should not change behavior. Signed-off-by: Miloslav Trmač <mitr@redhat.com>
Configuration menu - View commit details
-
Copy full SHA for f384c0d - Browse repository at this point
Copy the full SHA f384c0dView commit details -
Don't prefix errors from os.Open with "error opening ...: "
The standard library's > open /this/does/not/exist: no such file or directory might be sufficient. Signed-off-by: Miloslav Trmač <mitr@redhat.com>
Configuration menu - View commit details
-
Copy full SHA for 9d0162f - Browse repository at this point
Copy the full SHA 9d0162fView commit details