Skip to content

content: Add InfoReaderProvider#9607

Merged
dmcgowan merged 1 commit intocontainerd:mainfrom
vvoland:contentprovider
Jan 8, 2024
Merged

content: Add InfoReaderProvider#9607
dmcgowan merged 1 commit intocontainerd:mainfrom
vvoland:contentprovider

Conversation

@vvoland
Copy link
Copy Markdown
Contributor

@vvoland vvoland commented Jan 5, 2024

The interface that combines both content.InfoProvider and content.Provider was duplicated in multiple places - create one directly in content package and use it instead.

The interface that combines both content.InfoProvider and
content.Provider was duplicated in multiple places - create one directly
in `content` package and use it instead.

Signed-off-by: Paweł Gronowski <[email protected]>
@k8s-ci-robot
Copy link
Copy Markdown

Hi @vvoland. Thanks for your PR.

I'm waiting for a containerd member to verify that this patch is reasonable to test. If it is, they should reply with /ok-to-test on its own line. Until that is done, I will not automatically test new commits in this PR, but the usual testing commands by org members will still work. Regular contributors should join the org to skip this step.

Once the patch is verified, the new status will be reflected by the ok-to-test label.

I understand the commands that are listed here.

Details

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.

Copy link
Copy Markdown
Member

@thaJeztah thaJeztah left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

removing these LGTM (nice find), but left a comment about deprecating -> aliasing, which we could consider including in a 1.x release to help transition.

After it's in the 1.x releases, it's fine to remove the aliases in main (v2.x).


"github.com/opencontainers/go-digest"
imagedigest "github.com/opencontainers/go-digest"
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ugh; I still need to figure out which linter can catch these.

Comment on lines -59 to -60
// InfoProvider provides both content and info about content
type InfoProvider interface {
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we know if there's external consumers of these interfaces? If so, we should add an alias and deprecate; more important if we decide to backport this patch (to help transition v1 -> v2).

// InfoProvider provides both content and info about content.
//
// Deprecated: use [content.InfoProvider] instead.
type InfoProvider = content.InfoProvider

(same for the other ones)

Copy link
Copy Markdown
Contributor Author

@vvoland vvoland Jan 8, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

pkg/display was introduced in v2 and doesn't exist in v1 so we can skip the deprecation.

As for the pkg/cri/store/image technically it could have external consumers, but looking at https://pkg.go.dev/github.com/containerd/[email protected]/pkg/cri/store/image?tab=importedby and https://grep.app/search?q=pkg/cri/store/image it doesn't seem like it has any real publicly known importers.
Also, it's still exactly the same interface, so I think even if there are any consumers, the change should be transparent?

@thaJeztah
Copy link
Copy Markdown
Member

/ok-to-test

@dmcgowan dmcgowan added this pull request to the merge queue Jan 8, 2024
@github-merge-queue github-merge-queue Bot removed this pull request from the merge queue due to failed status checks Jan 8, 2024
@dmcgowan dmcgowan added this pull request to the merge queue Jan 8, 2024
@github-merge-queue github-merge-queue Bot removed this pull request from the merge queue due to failed status checks Jan 8, 2024
@dmcgowan dmcgowan added this pull request to the merge queue Jan 8, 2024
@github-merge-queue github-merge-queue Bot removed this pull request from the merge queue due to failed status checks Jan 8, 2024
@dmcgowan dmcgowan added this pull request to the merge queue Jan 8, 2024
Merged via the queue into containerd:main with commit ddfa334 Jan 8, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants