-
Notifications
You must be signed in to change notification settings - Fork 542
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
Towards eliminating v1util #872
Conversation
6ab87e5
to
ba6afc8
Compare
pkg/v1/mutate/mutate.go
Outdated
@@ -335,7 +335,7 @@ func layerTime(layer v1.Layer, t time.Time) (v1.Layer, error) { | |||
b := w.Bytes() | |||
// gzip the contents, then create the layer | |||
opener := func() (io.ReadCloser, error) { | |||
return v1util.GzipReadCloser(ioutil.NopCloser(bytes.NewReader(b))), nil | |||
return gzip.GzipReadCloser(ioutil.NopCloser(bytes.NewReader(b))), nil |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Drop the stutter?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What do you want to call the Gunzip variant :)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You got me there.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I was piggybacking on the sentiment @imjasonh had below that renaming things becomes reeeeaaaaal easy under internal/
, so this is trivial to fixup later if we find a name we like. 🤷
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think the convention is Deprecated:
per https://github.com/golang/go/wiki/Deprecated
|
Are you suggesting we have a literal
Not parsing, but exposing the things that were previously public under v1util with |
+1, we owe them one release of deprecated before we drop it, IMO. |
I can |
I'm suggesting we stage the change first by making it Package naming and organization matters a lot less to me inside
Yeah, that's fine, I was talking about |
Just making it internal is breaking, and I don't think we should just break folks currently using it (until a few days ago this included The intent of staging things this way was to make it clear that the external exposure is Deprecated (and will break), while simultaneously enabling us to restructure things in a way that's consistent with what y'all are asking for with
I completely agree, which is why I didn't sweat the "stutter" stuff right away.
I'm happy to make this private, I don't really care, but digest verification just felt like something folks would want, but it is not a hill I'd die on 😉 |
Alright, we now have |
To be clear I'm absolutely on board with aliasing + deprecating for now. It was the atomizing into internal packages I was commenting about. Sorry that wasn't clear. |
It feels like we are quibbling about internal structure, which we all agreed that we can now change whenever we want. I went with this because it seemed like it was consistent with what was being suggested for estargz, and it seemed like we all agreed about this on slack: The "consistent structure" I was talking about above was "the atomizing" 😅 Perhaps we're talking past each other, so it may be simplest to hop on a zoom (🤔 now I'm wondering if this is a ploy to see the 🐶 , very :sus:) |
Codecov Report
@@ Coverage Diff @@
## master #872 +/- ##
=======================================
Coverage 74.28% 74.28%
=======================================
Files 106 106
Lines 4476 4476
=======================================
Hits 3325 3325
Misses 656 656
Partials 495 495
Continue to review full report at Codecov.
|
@imjasonh I think this covers the key points that we discussed. I am happy to keep making changes, which should be easy now that this stuff is under |
Lgtm, thanks for putting up with my quibbling 😆 |
This blows apart v1util into smaller (mostly internal) packages, keeping only aliases of what we have today under
pkg/v1/v1util
to avoid breaking downstreams, but adding a deprecation notice, which should triggergolangci-lint
to start flagging users of the deprecated methods.