Skip to content

Conversation

@tchap
Copy link
Contributor

@tchap tchap commented Jun 10, 2025

This is a separate module that is compatible with
pkg/image/registryclient, but uses distribution/[email protected].

Since distribution/[email protected] has removed the client package being used
by library-go currently, or rather moved it into internal, this patch
includes copying the packages from distribution/v3/internal/client into
registryclient/v2/internal. Some of the logic is exported as required
to make oc and openshift-apiserver work as that is where this patch has been tested.
See the linked PRs below.

So the approach taken was to copy registryclient into registryclient/v2,
then copy distribution/v3/internal/client into
registryclient/v2/internal, then keep exporting functionality so that oc
can be ported to distributions/[email protected] and registryclient/v2.

Generally when a project importing library-go wants to migrate to
the current distribution/v3, they can just import this module instead of
using pkg/image/registryclient. The interface is compatible with
pkg/image/registryclient and all that is needed is changing the import
path.

Note for the Reviewer

Although there is a lot of code, there is paradoxically not much to review. All code is actually copied from other sources and imports paths are amended so that the module works as a whole. Tests are also imported from the respective sources.

See the following PRs across our repos for exemplar usage:

@openshift-ci-robot openshift-ci-robot added the jira/valid-reference Indicates that this PR references a valid Jira ticket of any type. label Jun 10, 2025
@openshift-ci-robot
Copy link

openshift-ci-robot commented Jun 10, 2025

@tchap: This pull request references WRKLDS-1550 which is a valid jira issue.

Warning: The referenced jira issue has an invalid target version for the target branch this PR targets: expected the story to target the "4.20.0" version, but no target version was set.

In response to this:

Add pkg/image/registryclient/v2
This is a separate module that is compatible with
pkg/image/registryclient, but uses distribution/[email protected].

Since distribution/[email protected] has removed the client package being used
by library-go currently, or rather moved it into internal, this patch
includes copying the packages from distribution/v3/internal/client into
registryclient/v2/internal. Some of the logic is exported as required
to make oc work as that is where this patch has been tested.

So the approach taken was to copy registryclient into registryclient/v2,
then copy distribution/v3/internal/client into
registryclient/v2/internal, then keep exporting functionality so that oc
can be ported to distributions/[email protected] and registryclient/v2.

Generally when a project importing library-go wants to migrate to
the current distribution/v3, they can just import this module instead of
using pkg/image/registryclient. The interface is compatible with
pkg/image/registryclient and all that is needed is changing the import
path.

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 openshift-eng/jira-lifecycle-plugin repository.

@openshift-ci-robot
Copy link

openshift-ci-robot commented Jun 10, 2025

@tchap: This pull request references WRKLDS-1550 which is a valid jira issue.

Warning: The referenced jira issue has an invalid target version for the target branch this PR targets: expected the story to target the "4.20.0" version, but no target version was set.

In response to this:

This is a separate module that is compatible with
pkg/image/registryclient, but uses distribution/[email protected].

Since distribution/[email protected] has removed the client package being used
by library-go currently, or rather moved it into internal, this patch
includes copying the packages from distribution/v3/internal/client into
registryclient/v2/internal. Some of the logic is exported as required
to make oc work as that is where this patch has been tested.

So the approach taken was to copy registryclient into registryclient/v2,
then copy distribution/v3/internal/client into
registryclient/v2/internal, then keep exporting functionality so that oc
can be ported to distributions/[email protected] and registryclient/v2.

Generally when a project importing library-go wants to migrate to
the current distribution/v3, they can just import this module instead of
using pkg/image/registryclient. The interface is compatible with
pkg/image/registryclient and all that is needed is changing the import
path.

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 openshift-eng/jira-lifecycle-plugin repository.

@openshift-ci
Copy link
Contributor

openshift-ci bot commented Jun 10, 2025

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: tchap
Once this PR has been reviewed and has the lgtm label, please assign flavianmissi for approval. For more information see the Code Review Process.

The full list of commands accepted by this bot can be found here.

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@openshift-ci-robot
Copy link

openshift-ci-robot commented Jun 10, 2025

@tchap: This pull request references WRKLDS-1550 which is a valid jira issue.

Warning: The referenced jira issue has an invalid target version for the target branch this PR targets: expected the story to target the "4.20.0" version, but no target version was set.

In response to this:

This is a separate module that is compatible with
pkg/image/registryclient, but uses distribution/[email protected].

Since distribution/[email protected] has removed the client package being used
by library-go currently, or rather moved it into internal, this patch
includes copying the packages from distribution/v3/internal/client into
registryclient/v2/internal. Some of the logic is exported as required
to make oc work as that is where this patch has been tested.

So the approach taken was to copy registryclient into registryclient/v2,
then copy distribution/v3/internal/client into
registryclient/v2/internal, then keep exporting functionality so that oc
can be ported to distributions/[email protected] and registryclient/v2.

Generally when a project importing library-go wants to migrate to
the current distribution/v3, they can just import this module instead of
using pkg/image/registryclient. The interface is compatible with
pkg/image/registryclient and all that is needed is changing the import
path.

Note for the Reviewer

Although there is a lot of code, there is paradoxically not much to review. All code is actually copied from other sources and imports paths are amended so that the module works as a whole. Tests are also imported from the respective sources.

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 openshift-eng/jira-lifecycle-plugin repository.

@openshift-ci-robot
Copy link

openshift-ci-robot commented Jun 10, 2025

@tchap: This pull request references WRKLDS-1550 which is a valid jira issue.

Warning: The referenced jira issue has an invalid target version for the target branch this PR targets: expected the story to target the "4.20.0" version, but no target version was set.

In response to this:

This is a separate module that is compatible with
pkg/image/registryclient, but uses distribution/[email protected].

Since distribution/[email protected] has removed the client package being used
by library-go currently, or rather moved it into internal, this patch
includes copying the packages from distribution/v3/internal/client into
registryclient/v2/internal. Some of the logic is exported as required
to make oc work as that is where this patch has been tested.

So the approach taken was to copy registryclient into registryclient/v2,
then copy distribution/v3/internal/client into
registryclient/v2/internal, then keep exporting functionality so that oc
can be ported to distributions/[email protected] and registryclient/v2.

Generally when a project importing library-go wants to migrate to
the current distribution/v3, they can just import this module instead of
using pkg/image/registryclient. The interface is compatible with
pkg/image/registryclient and all that is needed is changing the import
path.

Note for the Reviewer

Although there is a lot of code, there is paradoxically not much to review. All code is actually copied from other sources and imports paths are amended so that the module works as a whole. Tests are also imported from the respective sources.

See openshift/oc#2036 to get the context.

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 openshift-eng/jira-lifecycle-plugin repository.

@tchap
Copy link
Contributor Author

tchap commented Jun 10, 2025

/hold

until oc tests are fixed in the linked PR.

@openshift-ci openshift-ci bot added the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Jun 10, 2025
@tchap tchap force-pushed the distribution-v3 branch 2 times, most recently from 0ff528d to ef36034 Compare June 20, 2025 08:27
@openshift-ci-robot
Copy link

openshift-ci-robot commented Jul 9, 2025

@tchap: This pull request references WRKLDS-1550 which is a valid jira issue.

Warning: The referenced jira issue has an invalid target version for the target branch this PR targets: expected the story to target the "4.20.0" version, but no target version was set.

In response to this:

This is a separate module that is compatible with
pkg/image/registryclient, but uses distribution/[email protected].

Since distribution/[email protected] has removed the client package being used
by library-go currently, or rather moved it into internal, this patch
includes copying the packages from distribution/v3/internal/client into
registryclient/v2/internal. Some of the logic is exported as required
to make oc work as that is where this patch has been tested.

So the approach taken was to copy registryclient into registryclient/v2,
then copy distribution/v3/internal/client into
registryclient/v2/internal, then keep exporting functionality so that oc
can be ported to distributions/[email protected] and registryclient/v2.

Generally when a project importing library-go wants to migrate to
the current distribution/v3, they can just import this module instead of
using pkg/image/registryclient. The interface is compatible with
pkg/image/registryclient and all that is needed is changing the import
path.

Note for the Reviewer

Although there is a lot of code, there is paradoxically not much to review. All code is actually copied from other sources and imports paths are amended so that the module works as a whole. Tests are also imported from the respective sources.

See the following PRs across our repos for exemplar usage:

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 openshift-eng/jira-lifecycle-plugin repository.

@openshift-ci-robot
Copy link

openshift-ci-robot commented Jul 9, 2025

@tchap: This pull request references WRKLDS-1550 which is a valid jira issue.

Warning: The referenced jira issue has an invalid target version for the target branch this PR targets: expected the story to target the "4.20.0" version, but no target version was set.

In response to this:

This is a separate module that is compatible with
pkg/image/registryclient, but uses distribution/[email protected].

Since distribution/[email protected] has removed the client package being used
by library-go currently, or rather moved it into internal, this patch
includes copying the packages from distribution/v3/internal/client into
registryclient/v2/internal. Some of the logic is exported as required
to make oc and openshift-apiserver work as that is where this patch has been tested.
See the linked PRs below.

So the approach taken was to copy registryclient into registryclient/v2,
then copy distribution/v3/internal/client into
registryclient/v2/internal, then keep exporting functionality so that oc
can be ported to distributions/[email protected] and registryclient/v2.

Generally when a project importing library-go wants to migrate to
the current distribution/v3, they can just import this module instead of
using pkg/image/registryclient. The interface is compatible with
pkg/image/registryclient and all that is needed is changing the import
path.

Note for the Reviewer

Although there is a lot of code, there is paradoxically not much to review. All code is actually copied from other sources and imports paths are amended so that the module works as a whole. Tests are also imported from the respective sources.

See the following PRs across our repos for exemplar usage:

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 openshift-eng/jira-lifecycle-plugin repository.

tchap added 2 commits July 14, 2025 11:38
This is a separate module that is compatible with
pkg/image/registryclient, but uses distribution/[email protected].

Since distribution/[email protected] has removed the client package being used
by library-go currently, or rather moved it into internal, this patch
includes copying the packages from distribution/v3/internal/client into
registryclient/v2/internal. Some of the logic is exported as required
to make oc work as that is where this patch has been tested.

So the approach taken was to copy registryclient into registryclient/v2,
then copy distribution/v3/internal/client into
registryclient/v2/internal, then keep exporting functionality so that oc
can be ported to distributions/[email protected] and registryclient/v2.

Generally when a project importing library-go wants to migrate to
the current distribution/v3, they can just import this module instead of
using pkg/image/registryclient. The interface is compatible with
pkg/image/registryclient and all that is needed is changing the import
path.
@tchap tchap force-pushed the distribution-v3 branch from ef36034 to 02b7d0a Compare July 14, 2025 09:55
@tchap tchap force-pushed the distribution-v3 branch from 02b7d0a to 8716d02 Compare July 22, 2025 08:30
@openshift-ci
Copy link
Contributor

openshift-ci bot commented Jul 22, 2025

@tchap: all tests passed!

Full PR test history. Your PR dashboard.

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-sigs/prow repository. I understand the commands that are listed here.

@openshift-bot
Copy link

Issues go stale after 90d of inactivity.

Mark the issue as fresh by commenting /remove-lifecycle stale.
Stale issues rot after an additional 30d of inactivity and eventually close.
Exclude this issue from closing by commenting /lifecycle frozen.

If this issue is safe to close now please do so with /close.

/lifecycle stale

@openshift-ci openshift-ci bot added the lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. label Oct 20, 2025
@tchap
Copy link
Contributor Author

tchap commented Oct 20, 2025

/remove-lifecycle stale

@openshift-ci openshift-ci bot removed the lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. label Oct 20, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. jira/valid-reference Indicates that this PR references a valid Jira ticket of any type.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants