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

Migrate from github.com/docker/distribution to github.com/distribution/distribution/v3 #103849

Closed
howardjohn opened this issue Jul 22, 2021 · 22 comments
Labels
area/code-organization Issues or PRs related to kubernetes code organization area/dependency Issues or PRs related to dependency changes kind/cleanup Categorizes issue or PR as related to cleaning up code, process, or technical debt. lifecycle/frozen Indicates that an issue or PR should not be auto-closed due to staleness. needs-triage Indicates an issue or PR lacks a `triage/foo` label and requires one. sig/architecture Categorizes an issue or PR as relevant to SIG Architecture.

Comments

@howardjohn
Copy link
Contributor

What happened:

Kubernetes libraries have a dependency on github.com/docker/distribution

What you expected to happen:

Kubernetes libraries have a dependency on github.com/distribution/distribution/v3. Note the github org just changed, its the same project. I believe the v2 -> v3 was mostly to get around go.mod weirdness with versions, rather than large breaking changes, but am not sure.

How to reproduce it (as minimally and precisely as possible):

Look at go.mod, I suppose

Anything else we need to know?:

github.com/docker/distribution@v2.7.1+incompatible, the library in use, is 2.5 years old. It does not have a go.mod file, and in turn depends on a bunch of other libraries without go.mod files. This generally makes importing these libraries a pain - you can see 350 projects needing to add replace hacks to go.mod to work around these issues: https://github.com/search?q=%22replace+github.com%2Fdocker%2Fdistribution%22&type=code

It would be great to upgrade to the latest version.

@howardjohn howardjohn added the kind/bug Categorizes issue or PR as related to a bug. label Jul 22, 2021
@k8s-ci-robot k8s-ci-robot added needs-sig Indicates an issue or PR lacks a `sig/foo` label and requires one. needs-triage Indicates an issue or PR lacks a `triage/foo` label and requires one. labels Jul 22, 2021
@k8s-ci-robot
Copy link
Contributor

@howardjohn: This issue is currently awaiting triage.

If a SIG or subproject determines this is a relevant issue, they will accept it by applying the triage/accepted label and provide further guidance.

The triage/accepted label can be added by org members by writing /triage accepted in a comment.

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

@dims
Copy link
Member

dims commented Jul 22, 2021

/area code-organization

@k8s-ci-robot k8s-ci-robot added the area/code-organization Issues or PRs related to kubernetes code organization label Jul 22, 2021
@dims
Copy link
Member

dims commented Jul 22, 2021

@howardjohn docker/docker needs to go first :(

[dims@dims-a02 12:18] ~/go/src/k8s.io/kubernetes ⟩ rg '"github.com/docker/distribution'
pkg/kubelet/dockershim/libdocker/helpers.go
25:	dockerref "github.com/docker/distribution/reference"

pkg/kubelet/images/image_manager.go
23:	dockerref "github.com/docker/distribution/reference"

pkg/util/parsers/parsers.go
26:	dockerref "github.com/docker/distribution/reference"

vendor/github.com/docker/docker/client/image_pull.go
9:	"github.com/docker/distribution/reference"

vendor/github.com/docker/docker/client/plugin_install.go
9:	"github.com/docker/distribution/reference"

vendor/github.com/docker/docker/client/service_create.go
9:	"github.com/docker/distribution/reference"

vendor/github.com/docker/docker/client/image_tag.go
7:	"github.com/docker/distribution/reference"

vendor/github.com/docker/docker/client/plugin_upgrade.go
8:	"github.com/docker/distribution/reference"

vendor/github.com/docker/docker/client/container_commit.go
9:	"github.com/docker/distribution/reference"

vendor/github.com/docker/docker/client/image_create.go
9:	"github.com/docker/distribution/reference"

vendor/github.com/docker/docker/client/image_push.go
9:	"github.com/docker/distribution/reference"

vendor/github.com/docker/docker/client/image_import.go
9:	"github.com/docker/distribution/reference"

vendor/github.com/docker/docker/errdefs/http_helpers.go
8:	"github.com/docker/distribution/registry/api/errcode"

vendor/github.com/docker/distribution/reference/normalize.go
8:	"github.com/docker/distribution/digestset"

staging/src/k8s.io/kubectl/pkg/cmd/run/run.go
24:	"github.com/docker/distribution/reference"

staging/src/k8s.io/kubectl/pkg/cmd/debug/debug.go
25:	"github.com/docker/distribution/reference"

@howardjohn
Copy link
Contributor Author

I think #103850 is sufficient to drop the direct dependency at least. The indirect one... will require probably changes to probably 20+ repos

@dims
Copy link
Member

dims commented Jul 22, 2021

@howardjohn i am happy to wait ... to avoid having 2 things that do the same thing in our dependencies.

@howardjohn
Copy link
Contributor Author

Is dockershim removal still planned for 1.23 (which I think the master branch is now 1.23?) https://kubernetes.io/blog/2020/12/02/dockershim-faq/#when-will-dockershim-be-removed? Or do we need to wait a bit longer.

This is not a very high priority for us so I don't mind waiting months or years really

howardjohn added a commit to howardjohn/istio that referenced this issue Sep 1, 2021
See kubernetes/kubernetes#103849 for why

We still have a lot of indirect deps on the old one, but hopefully when or if those
move we can finally drop it
@pacoxu
Copy link
Member

pacoxu commented Sep 2, 2021

Pending on kubernetes/enhancements#2221

istio-testing pushed a commit to istio/istio that referenced this issue Sep 9, 2021
See kubernetes/kubernetes#103849 for why

We still have a lot of indirect deps on the old one, but hopefully when or if those
move we can finally drop it
@ehashman
Copy link
Member

ehashman commented Oct 6, 2021

/sig architecture

@k8s-ci-robot k8s-ci-robot added sig/architecture Categorizes an issue or PR as relevant to SIG Architecture. and removed needs-sig Indicates an issue or PR lacks a `sig/foo` label and requires one. labels Oct 6, 2021
@dims
Copy link
Member

dims commented Dec 23, 2021

@pacoxu @howardjohn we are ready to move on this now, as dockershim removal is done!

@pacoxu
Copy link
Member

pacoxu commented Dec 24, 2021

/assign

@k8s-triage-robot
Copy link

The Kubernetes project currently lacks enough contributors to adequately respond to all issues and PRs.

This bot triages issues and PRs according to the following rules:

  • After 90d of inactivity, lifecycle/stale is applied
  • After 30d of inactivity since lifecycle/stale was applied, lifecycle/rotten is applied
  • After 30d of inactivity since lifecycle/rotten was applied, the issue is closed

You can:

  • Mark this issue or PR as fresh with /remove-lifecycle stale
  • Mark this issue or PR as rotten with /lifecycle rotten
  • Close this issue or PR with /close
  • Offer to help out with Issue Triage

Please send feedback to sig-contributor-experience at kubernetes/community.

/lifecycle stale

@k8s-ci-robot k8s-ci-robot added the lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. label Mar 24, 2022
@k8s-ci-robot k8s-ci-robot added the lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. label Jul 6, 2022
@k8s-triage-robot
Copy link

The Kubernetes project currently lacks enough active contributors to adequately respond to all issues and PRs.

This bot triages issues and PRs according to the following rules:

  • After 90d of inactivity, lifecycle/stale is applied
  • After 30d of inactivity since lifecycle/stale was applied, lifecycle/rotten is applied
  • After 30d of inactivity since lifecycle/rotten was applied, the issue is closed

You can:

  • Mark this issue or PR as fresh with /remove-lifecycle rotten
  • Close this issue or PR with /close
  • Offer to help out with Issue Triage

Please send feedback to sig-contributor-experience at kubernetes/community.

/lifecycle rotten

@k8s-ci-robot k8s-ci-robot added lifecycle/rotten Denotes an issue or PR that has aged beyond stale and will be auto-closed. and removed lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. labels Aug 5, 2022
@k8s-triage-robot
Copy link

The Kubernetes project currently lacks enough active contributors to adequately respond to all issues and PRs.

This bot triages issues and PRs according to the following rules:

  • After 90d of inactivity, lifecycle/stale is applied
  • After 30d of inactivity since lifecycle/stale was applied, lifecycle/rotten is applied
  • After 30d of inactivity since lifecycle/rotten was applied, the issue is closed

You can:

  • Reopen this issue or PR with /reopen
  • Mark this issue or PR as fresh with /remove-lifecycle rotten
  • Offer to help out with Issue Triage

Please send feedback to sig-contributor-experience at kubernetes/community.

/close

@k8s-ci-robot
Copy link
Contributor

@k8s-triage-robot: Closing this issue.

In response to this:

The Kubernetes project currently lacks enough active contributors to adequately respond to all issues and PRs.

This bot triages issues and PRs according to the following rules:

  • After 90d of inactivity, lifecycle/stale is applied
  • After 30d of inactivity since lifecycle/stale was applied, lifecycle/rotten is applied
  • After 30d of inactivity since lifecycle/rotten was applied, the issue is closed

You can:

  • Reopen this issue or PR with /reopen
  • Mark this issue or PR as fresh with /remove-lifecycle rotten
  • Offer to help out with Issue Triage

Please send feedback to sig-contributor-experience at kubernetes/community.

/close

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

@liggitt
Copy link
Member

liggitt commented Oct 11, 2022

/reopen
/lifecycle frozen

it's not clear if we want to switch to distribution/v3 or extract the image spec parsing code to use differently, but we still want to track eliminating the docker/distribution dep

@k8s-ci-robot k8s-ci-robot reopened this Oct 11, 2022
@k8s-ci-robot
Copy link
Contributor

@liggitt: Reopened this issue.

In response to this:

/reopen
/lifecycle frozen

it's not clear if we want to switch to distribution/v3 or extract the image spec parsing code to use differently, but we still want to track eliminating the docker/distribution dep

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

@k8s-ci-robot k8s-ci-robot added lifecycle/frozen Indicates that an issue or PR should not be auto-closed due to staleness. and removed lifecycle/rotten Denotes an issue or PR that has aged beyond stale and will be auto-closed. labels Oct 11, 2022
@liggitt liggitt added area/dependency Issues or PRs related to dependency changes kind/cleanup Categorizes issue or PR as related to cleaning up code, process, or technical debt. and removed kind/bug Categorizes issue or PR as related to a bug. labels Oct 11, 2022
@liggitt liggitt added this to Dependencies in code-organization subproject Nov 10, 2022
@pacoxu
Copy link
Member

pacoxu commented Sep 1, 2023

According to @thaJeztah 's new PR containerd/containerd#9034, I migrate it to https://github.com/distribution/referenc v0.5.0 with #120332.

Just see #120316 is in progress.

@pacoxu
Copy link
Member

pacoxu commented Sep 3, 2023

Finally we used github.com/distribution/referenc instead.

/close
Per #120316. Thanks @dims @thaJeztah @Jamstah.

@k8s-ci-robot
Copy link
Contributor

@pacoxu: Closing this issue.

In response to this:

Finally we used [github.com/distribution/referenc](https://github.com/distribution/referenc) instead.

/close
Per #120316. Thanks @dims @thaJeztah @Jamstah.

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/code-organization Issues or PRs related to kubernetes code organization area/dependency Issues or PRs related to dependency changes kind/cleanup Categorizes issue or PR as related to cleaning up code, process, or technical debt. lifecycle/frozen Indicates that an issue or PR should not be auto-closed due to staleness. needs-triage Indicates an issue or PR lacks a `triage/foo` label and requires one. sig/architecture Categorizes an issue or PR as relevant to SIG Architecture.
7 participants