Skip to content

Conversation

@dmcgowan
Copy link
Member

Updated image store to allow for a cleaner definition of import names and to allow the API to support multiple export names.

@dmcgowan dmcgowan force-pushed the transfer-image-store-references branch from 737524b to 9ad5d67 Compare January 13, 2023 23:14
@dmcgowan dmcgowan changed the title Update imagestore interface to support multiple references [transfer] update imagestore interface to support multiple references Jan 13, 2023
@dmcgowan dmcgowan force-pushed the transfer-image-store-references branch 2 times, most recently from 88cc5a6 to 923f008 Compare January 14, 2023 00:40

// ImageReference is used to create or find a reference for an image
message ImageReference {
string Name = 1;
Copy link
Contributor

Choose a reason for hiding this comment

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

nit:

Suggested change
string Name = 1;
string name = 1;

return imgs, nil
}

func (is *Store) Get(ctx context.Context, store images.Store) (images.Image, error) {
Copy link
Contributor

Choose a reason for hiding this comment

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

How could we get extra image references from the image store?

Copy link
Member Author

Choose a reason for hiding this comment

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

I have that in a separate commit so far since still working on it, thinking the interface would be Lookup(ctx context.Context, store image.Store) ([]image.Image, error). I was thinking how to handle the prefix references on lookup, which could be interesting to use. Non prefix references should be straight forward.

@dmcgowan dmcgowan force-pushed the transfer-image-store-references branch from 923f008 to 1449ecd Compare January 18, 2023 19:12
@AkihiroSuda
Copy link
Member

   default: === FAIL: . TestTransferImport/TagOnlyRef (0.08s)
    default: ==================
    default: WARNING: DATA RACE
    default: Read at 0x00c000edce10 by goroutine 2707:
    default:   github.com/containerd/containerd/integration/client.TestTransferImport.func1()
    default:       /vagrant/integration/client/import_test.go:561 +0x9fa
    default:   testing.tRunner()
    default:       /usr/local/go/src/testing/testing.go:1446 +0x216
    default:   testing.(*T).Run.func1()
    default:       /usr/local/go/src/testing/testing.go:1493 +0x47
    default: 
    default: Previous write at 0x00c000edce10 by goroutine 2710:
    default:   github.com/containerd/containerd/integration/client.(*imagesProgress).Progress()
    default:       /vagrant/integration/client/import_test.go:594 +0x128
    default:   github.com/containerd/containerd/integration/client.(*imagesProgress).Progress-fm()
    default:       <autogenerated>:1 +0xbe
    default:   github.com/containerd/containerd/pkg/transfer/proxy.(*proxyTransferrer).Transfer.func1()
    default:       /vagrant/pkg/transfer/proxy/transfer.go:76 +0x49b
    default: 
    default: Goroutine 2707 (running) created at:
    default:   testing.(*T).Run()
    default:       /usr/local/go/src/testing/testing.go:1493 +0x75d
    default:   github.com/containerd/containerd/integration/client.TestTransferImport()
    default:       /vagrant/integration/client/import_test.go:527 +0x171a
    default:   testing.tRunner()
    default:       /usr/local/go/src/testing/testing.go:1446 +0x216
    default:   testing.(*T).Run.func1()
    default:       /usr/local/go/src/testing/testing.go:1493 +0x47
    default: 
    default: Goroutine 2710 (running) created at:
    default:   github.com/containerd/containerd/pkg/transfer/proxy.(*proxyTransferrer).Transfer()
    default:       /vagrant/pkg/transfer/proxy/transfer.go:61 +0x388
    default:   github.com/containerd/containerd.(*Client).Transfer()
    default:       /vagrant/transfer.go:35 +0x250
    default:   github.com/containerd/containerd/integration/client.TestTransferImport.func1()
    default:       /vagrant/integration/client/import_test.go:552 +0x875
    default:   testing.tRunner()
    default:       /usr/local/go/src/testing/testing.go:1446 +0x216
    default:   testing.(*T).Run.func1()
    default:       /usr/local/go/src/testing/testing.go:1493 +0x47
    default: ==================
    default: ==================
    default: WARNING: DATA RACE
    default: Read at 0x00c000d1a020 by goroutine 2707:
    default:   github.com/containerd/containerd/integration/client.TestTransferImport.func1()
    default:       /vagrant/integration/client/import_test.go:565 +0xbe4
    default:   testing.tRunner()
    default:       /usr/local/go/src/testing/testing.go:1446 +0x216
    default:   testing.(*T).Run.func1()
    default:       /usr/local/go/src/testing/testing.go:1493 +0x47
    default: 
    default: Previous write at 0x00c000d1a020 by goroutine 2710:
    default:   github.com/containerd/containerd/integration/client.(*imagesProgress).Progress()
    default:       /vagrant/integration/client/import_test.go:594 +0xe4
    default:   github.com/containerd/containerd/integration/client.(*imagesProgress).Progress-fm()
    default:       <autogenerated>:1 +0xbe
    default:   github.com/containerd/containerd/pkg/transfer/proxy.(*proxyTransferrer).Transfer.func1()
    default:       /vagrant/pkg/transfer/proxy/transfer.go:76 +0x49b
    default: 
    default: Goroutine 2707 (running) created at:
    default:   testing.(*T).Run()
    default:       /usr/local/go/src/testing/testing.go:1493 +0x75d
    default:   github.com/containerd/containerd/integration/client.TestTransferImport()
    default:       /vagrant/integration/client/import_test.go:527 +0x171a
    default:   testing.tRunner()
    default:       /usr/local/go/src/testing/testing.go:1446 +0x216
    default:   testing.(*T).Run.func1()
    default:       /usr/local/go/src/testing/testing.go:1493 +0x47
    default: 
    default: Goroutine 2710 (running) created at:
    default:   github.com/containerd/containerd/pkg/transfer/proxy.(*proxyTransferrer).Transfer()
    default:       /vagrant/pkg/transfer/proxy/transfer.go:61 +0x388
    default:   github.com/containerd/containerd.(*Client).Transfer()
    default:       /vagrant/transfer.go:35 +0x250
    default:   github.com/containerd/containerd/integration/client.TestTransferImport.func1()
    default:       /vagrant/integration/client/import_test.go:552 +0x875
    default:   testing.tRunner()
    default:       /usr/local/go/src/testing/testing.go:1446 +0x216
    default:   testing.(*T).Run.func1()
    default:       /usr/local/go/src/testing/testing.go:1493 +0x47
    default: ==================
    default:     testing.go:1319: race detected during execution of test
    default:     --- FAIL: TestTransferImport/TagOnlyRef (0.08s)
    default: 
    default: === FAIL: . TestTransferImport/TagOnlyOverwriteDigestRefs (0.01s)
    default:     import_test.go:555: rpc error: code = NotFound desc = not found
    default:     --- FAIL: TestTransferImport/TagOnlyOverwriteDigestRefs (0.01s)
    default: 
    default: === FAIL: . TestTransferImport (0.68s)
    default:     testing.go:1319: race detected during execution of test

https://cirrus-ci.com/task/6699598622752768?logs=integration#L121

@dmcgowan dmcgowan force-pushed the transfer-image-store-references branch from 1449ecd to 923b556 Compare January 20, 2023 19:54
@dmcgowan dmcgowan force-pushed the transfer-image-store-references branch from 923b556 to 2d39197 Compare January 23, 2023 22:08
@dmcgowan
Copy link
Member Author

/retest

1 similar comment
@dmcgowan
Copy link
Member Author

/retest

@dmcgowan dmcgowan force-pushed the transfer-image-store-references branch from 2d39197 to 2632d87 Compare January 25, 2023 19:22
@dmcgowan dmcgowan added this to the 1.7 milestone Jan 25, 2023
@dmcgowan dmcgowan force-pushed the transfer-image-store-references branch 2 times, most recently from 747bbbe to 60940b2 Compare February 7, 2023 21:55
// Name is the name of the test
Name string

// Images is the names of the images to creat
Copy link
Member

Choose a reason for hiding this comment

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

create

@dmcgowan dmcgowan force-pushed the transfer-image-store-references branch from 60940b2 to 3e0bac9 Compare February 10, 2023 23:24
// name reference from the prefix.
// Only used if IsPrefix is true.
bool skip_named_digest = 5;
}
Copy link
Member

Choose a reason for hiding this comment

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

nit nl missing

Signed-off-by: Derek McGowan <derek@mcg.dev>
@dmcgowan dmcgowan force-pushed the transfer-image-store-references branch from 3e0bac9 to 081601f Compare February 13, 2023 21:59
@AkihiroSuda AkihiroSuda merged commit 4e2eb8b into containerd:main Feb 14, 2023
@dmcgowan dmcgowan deleted the transfer-image-store-references branch April 20, 2024 00:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Archived in project

Development

Successfully merging this pull request may close these issues.

7 participants