-
Notifications
You must be signed in to change notification settings - Fork 2.6k
deprecate reference package, migrate to github.com/distribution/reference #4031
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
Conversation
Codecov ReportPatch coverage has no change and project coverage change:
❗ Your organization is not using the GitHub App Integration. As a result you may experience degraded service beginning May 15th. Please install the Github App Integration for your organization. Read more. Additional details and impacted files@@ Coverage Diff @@
## main #4031 +/- ##
==========================================
- Coverage 57.99% 57.04% -0.95%
==========================================
Files 101 96 -5
Lines 9991 9620 -371
==========================================
- Hits 5794 5488 -306
+ Misses 3560 3505 -55
+ Partials 637 627 -10
☔ View full report in Codecov by Sentry. |
That was fast :) I guess we should tag up the reference repo as 1.0.0 before merging this. |
Wild! Yeah we need to tag |
😂 had to do similar moves a couple of times before, and now got the hang of it
Yes, we should probably look if the repository still needs some cleaning up before (I'm guessing we'd want to add a minimal README that describes the purpose of the package). Even though this package has been used in production (so technically v1.0.0 should be the correct version), perhaps we should tag a There are some deprecated types/functions in the package; I moved those as well, but those should definitely be removed at some point (I guess; ideally before v1.0.0). I also want to go the rounds across some repositories to see if things explode if they would already switch to the new module even if they use a tagged version of distributions (i.e. any v2.x version). I want to make sure that switching potential types doesn't cause builds to fail. And, finally, given that not much has changed in the package (other than some performance improvements and bug fixes), we may want to consider switching the v2 branch to this package as well; that way v2 already would alias the types, which means there's no risk of Go (being a strong-typed language) from breaking things if a project happens to depend on both v3 and v2 in some form. |
I'll take a look at the readme. I agree that we should remove the deprecated functions before 1.0.0. How about now? I plan to run round some repos and make some issues to make people aware. I don't think we need to do the v2 stream. Repos will need to migrate at some point, and I don't think we need to support depending on v3 and v2 art the same time. Many projects will drop the distribution dependency and only need reference, I think. |
Yes, I think we're probably in the clear; v3 is already a different module (so a |
Oh; forgot to answer this one; We need to check if those that are deprecated were already deprecated in the current (so: v2.8.x) release. If not, then consumers may not have yet "received the message" (or more strictly; they haven't been deprecated yet, if no release was done with the deprecation in them). I tend to follow a cycle of
|
So we are due to make a minor I wouldnt be against marking this package as deprecated in |
I'd be fine with tagging the distribution/reference package in its current state as
If you're good with tagging as-is, could you create a |
The only deprecated function in distribution/reference is Although I agree we should tag a v0.0.1 (or 0.5.0) first, then remove it. |
I agree with @Jamstah, let's remove that one pesky func once tagged. As for this
I am in favour or deprecating instead of another "laborious" backport to the branch which is essentially in maintenance mode 🤷♂️ Now going forward, we need to agree on the first tag 😄 because we now have 2 options OR I'm a bit confused.
|
Nah, just something I tend to use; "halfway there!" and it doesn't look as unstable as SemVer itself suggests starting at v0.1.0 (allowing the |
I'm happy with either, that one's just to say "This is the exact code that got copied in", and I still think we should immediately remove the deprecated code and tag 1.0.0. |
Opened #4032 to fix the "deprecation"; looks like that function was already marked deprecated in the 2.8 branch at least (but the format not correct, so not unlikely that linters and IDEs didn't pick it up) |
@milosgajdos I think you're good to pick any version under 1.0.0 and tag the reference repo now. |
Yup! A tag would be great now, @milosgajdos then I start moving my PRs out of draft |
Ok pushed |
Great I realized that |
Awww, that's cute! Perfect for a |
…ence This integrates the new module, which was extracted from this repository at commit b9b1940; # install filter-repo (https://github.com/newren/git-filter-repo/blob/main/INSTALL.md) brew install git-filter-repo # create a temporary clone of docker cd ~/Projects git clone https://github.com/distribution/distribution.git reference cd reference # commit taken from git rev-parse --verify HEAD b9b1940 # remove all code, except for general files, 'reference/', and rename to / git filter-repo \ --path .github/workflows/codeql-analysis.yml \ --path .github/workflows/fossa.yml \ --path .golangci.yml \ --path distribution-logo.svg \ --path CODE-OF-CONDUCT.md \ --path CONTRIBUTING.md \ --path GOVERNANCE.md \ --path README.md \ --path LICENSE \ --path MAINTAINERS \ --path-glob 'reference/*.*' \ --path-rename reference/: # initialize go.mod go mod init github.com/distribution/reference go mod tidy -go=1.20 Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
5370753
to
152af63
Compare
Updated to v0.5.0, and moved out of draft. I also crated a "release" on the other repository to give a short summary of what it is, and where it came from (feel free to edit); https://github.com/distribution/reference/releases/tag/v0.5.0 |
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.
Code is all fine, but I would argue for getting reference 1.0.0 up first. If you'd rather merge this that's fine too.
I think it's fine to start with v0.5.0, as mentioned earlier; this is the "clean move" of the existing code, whereas v1.0.0 is removing bits from what's moved, so it would also make it more transparent that "something changed" when we move to v1.0.0. |
See discussion at distribution/distribution#4031. Tilt wasn't directly using `distribution/distribution`, but this is the extracted reference parts and is what Moby & friends are moving to: https://github.com/moby/moby/blob/20f96354699d20eeb4674d3944486b5d73c256b2/vendor.mod#L37 It's an easy find-replace and should be the exact same code, but this will make sure we get reference fixes and don't break on a future Moby update, for example. Signed-off-by: Milas Bowman <milas.bowman@docker.com>
See discussion at distribution/distribution#4031. Tilt wasn't directly using `distribution/distribution`, but this is the extracted reference parts and is what Moby & friends are moving to: https://github.com/moby/moby/blob/20f96354699d20eeb4674d3944486b5d73c256b2/vendor.mod#L37 It's an easy find-replace and should be the exact same code, but this will make sure we get reference fixes and don't break on a future Moby update, for example. Signed-off-by: Milas Bowman <milas.bowman@docker.com>
This integrates the new module, which was extracted from this repository at commit b9b1940;