Skip to content

image: Remove GetImageManifest#49133

Merged
thaJeztah merged 2 commits intomoby:masterfrom
vvoland:c8d-remove-getimagemanifest
Dec 19, 2024
Merged

image: Remove GetImageManifest#49133
thaJeztah merged 2 commits intomoby:masterfrom
vvoland:c8d-remove-getimagemanifest

Conversation

@vvoland
Copy link
Copy Markdown
Contributor

@vvoland vvoland commented Dec 19, 2024

Its only usage was in container creation, which also called GetImage first.
This method is specific to the containerd image service and is largely the same as GetImage, except it returns a manifest descriptor. Instead, introduce add the descriptor as a new field in Image.Details and set it in the containerd image service implementation of GetImage.

- A picture of a cute animal (not mandatory but encouraged)

image

@vvoland vvoland added status/2-code-review area/images Image Service kind/refactor PR's that refactor, or clean-up code containerd-integration Issues and PRs related to containerd integration labels Dec 19, 2024
@vvoland vvoland added this to the 28.0.0 milestone Dec 19, 2024
@vvoland vvoland self-assigned this Dec 19, 2024
Its only usage was in container creation, which also called `GetImage`
first.
This method is specific to the containerd image service and is largely
the same as `GetImage`, except it returns a manifest descriptor.
Instead, introduce add the descriptor as a new field in `Image.Details`
and set it in the containerd image service implementation of `GetImage`.

Signed-off-by: Paweł Gronowski <[email protected]>
Last usage of these fields was removed by cd11843.

Signed-off-by: Paweł Gronowski <[email protected]>
@vvoland vvoland force-pushed the c8d-remove-getimagemanifest branch from 885f6cf to c452af6 Compare December 19, 2024 11:14
@thaJeztah
Copy link
Copy Markdown
Member

Some timeouts in networking unit tests; posting in case these became flaky

=== Failed
=== FAIL: libnetwork/cnmallocator TestAllocator (unknown)
=== FAIL: libnetwork/cnmallocator TestAllocator/TestServiceUpdatePort (unknown)
Details
=== Failed
=== FAIL: libnetwork/cnmallocator TestAllocator (unknown)
time="2024-12-19T11:33:46Z" level=error msg="failed allocating service testID1 during init" error="requested bit is already allocated" existingAddressesOnly=false
--- PASS: TestAllocator/TestAllocateServiceConflictingUserDefinedPorts (0.35s)
time="2024-12-19T11:33:46Z" level=error msg="task allocation failure" error="failed to retrieve network testID3 while allocating task testTaskID3"
time="2024-12-19T11:33:46Z" level=error msg="error reallocating node " error="node  cannot be found" method="(*Allocator).doTaskAlloc"
time="2024-12-19T11:33:46Z" level=error msg="Failed allocation for network testID5" error="failed while allocating driver state for network testID5: could not assign vxlan id 328 to pool 10.0.4.0/24: requested bit is already allocated"
time="2024-12-19T11:33:46Z" level=error msg="task allocation failure" error="network testID5 attached to task testTaskID6 not allocated yet"
time="2024-12-19T11:33:47Z" level=error msg="Failed allocation for service testServiceID4" error="requested bit is already allocated"
time="2024-12-19T11:33:47Z" level=error msg="task allocation failure" error="service testServiceID4 to which task testTaskID7 belongs has pending allocations"
--- PASS: TestAllocator/TestAllocator (1.07s)
--- PASS: TestAllocator/TestAllocatorRestartNoEndpointSpec (0.00s)
--- PASS: TestAllocator/TestAllocatorRestoreForDuplicateIPs (0.00s)
--- PASS: TestAllocator/TestAllocatorRestoreForUnallocatedNetwork (0.00s)
--- PASS: TestAllocator/TestDeallocateServiceAllocate (0.00s)
--- PASS: TestAllocator/TestIPAMNotNil (0.00s)
--- PASS: TestAllocator/TestNoDuplicateIPs (0.21s)
--- PASS: TestAllocator/TestNodeAllocator (2.81s)
--- PASS: TestAllocator/TestNodeAttachmentOnLeadershipChange (0.00s)
--- PASS: TestAllocator/TestServiceAddRemovePorts (0.00s)
--- PASS: TestAllocator/TestServicePortAllocationIsRepeatable (0.00s)
coverage: 66.2% of statements
panic: test timed out after 5m0s
	running tests:
		TestAllocator (5m0s)
		TestAllocator/TestServiceUpdatePort (4m56s)

goroutine 401 [running]:
testing.(*M).startAlarm.func1()
	/usr/local/go/src/testing/testing.go:2373 +0x385
created by time.goFunc
	/usr/local/go/src/time/sleep.go:215 +0x2d

goroutine 1 [chan receive, 4 minutes]:
testing.(*T).Run(0xc000292340, {0xfa7dc5?, 0x0?}, 0x100b5c8)
	/usr/local/go/src/testing/testing.go:1751 +0x3ab
testing.runTests.func1(0xc000292340)
	/usr/local/go/src/testing/testing.go:2168 +0x37
testing.tRunner(0xc000292340, 0xc00025dc70)
	/usr/local/go/src/testing/testing.go:1690 +0xf4
testing.runTests(0xc000138dc8, {0x1880a20, 0x12, 0x12}, {0x4740f0?, 0x473d5a?, 0x18921c0?})
	/usr/local/go/src/testing/testing.go:2166 +0x43d
testing.(*M).Run(0xc000288460)
	/usr/local/go/src/testing/testing.go:2034 +0x64a
main.main()
	_testmain.go:89 +0x9b

goroutine 21 [chan receive, 4 minutes]:
testing.(*T).Run(0xc0002924e0, {0xdd592e?, 0xcfb46f?}, 0xc0001cf830)
	/usr/local/go/src/testing/testing.go:1751 +0x3ab
github.com/docker/docker/vendor/github.com/stretchr/testify/suite.runTests({0x110c5a8, 0xc0002924e0}, {0xc0001d0300?, 0xd?, 0x10?})
	/go/src/github.com/docker/docker/vendor/github.com/stretchr/testify/suite/suite.go:247 +0xef
github.com/docker/docker/vendor/github.com/stretchr/testify/suite.Run(0xc0002924e0, {0x10fbdf0, 0xc00017d4a0})
	/go/src/github.com/docker/docker/vendor/github.com/stretchr/testify/suite/suite.go:220 +0x486
github.com/docker/docker/vendor/github.com/moby/swarmkit/v2/manager/allocator.RunAllocatorTests(...)
	/go/src/github.com/docker/docker/vendor/github.com/moby/swarmkit/v2/manager/allocator/allocator_test_suite.go:24
github.com/docker/docker/libnetwork/cnmallocator.TestAllocator(0xc0002924e0)
	/go/src/github.com/docker/docker/libnetwork/cnmallocator/allocator_test.go:13 +0x107
testing.tRunner(0xc0002924e0, 0x100b5c8)
	/usr/local/go/src/testing/testing.go:1690 +0xf4
created by testing.(*T).Run in goroutine 1
	/usr/local/go/src/testing/testing.go:1743 +0x390

goroutine 420 [chan receive, 4 minutes]:
github.com/docker/docker/vendor/github.com/docker/go-events.(*Broadcaster).Close(0xc0002d0140?)
	/go/src/github.com/docker/docker/vendor/github.com/docker/go-events/broadcast.go:98 +0x4e
github.com/docker/docker/vendor/github.com/moby/swarmkit/v2/watch.(*Queue).Close(0xc000c62180)
	/go/src/github.com/docker/docker/vendor/github.com/moby/swarmkit/v2/watch/watch.go:196 +0x108
github.com/docker/docker/vendor/github.com/moby/swarmkit/v2/manager/state/store.(*MemoryStore).Close(...)
	/go/src/github.com/docker/docker/vendor/github.com/moby/swarmkit/v2/manager/state/store/memory.go:179
github.com/docker/docker/vendor/github.com/moby/swarmkit/v2/manager/allocator.(*testSuite).TestServiceUpdatePort(0xc00017d4a0)
	/go/src/github.com/docker/docker/vendor/github.com/moby/swarmkit/v2/manager/allocator/allocator_test_suite.go:1908 +0x2df
reflect.Value.call({0xc000295680?, 0xc000137470?, 0x13?}, {0xf9ee28, 0x4}, {0xc000079f28, 0x1, 0x1?})
	/usr/local/go/src/reflect/value.go:581 +0xca6
reflect.Value.Call({0xc000295680?, 0xc000137470?, 0x163eca0?}, {0xc000061728?, 0xf?, 0x0?})
panic: test timed out after 5m0s
	running tests:
		TestAllocator (5m0s)
		TestAllocator/TestServiceUpdatePort (4m56s)

goroutine 401 [running]:
testing.(*M).startAlarm.func1()
	/usr/local/go/src/testing/testing.go:2373 +0x385
created by time.goFunc
	/usr/local/go/src/time/sleep.go:215 +0x2d

goroutine 1 [chan receive, 4 minutes]:
testing.(*T).Run(0xc000292340, {0xfa7dc5?, 0x0?}, 0x100b5c8)
	/usr/local/go/src/testing/testing.go:1751 +0x3ab
testing.runTests.func1(0xc000292340)
	/usr/local/go/src/testing/testing.go:2168 +0x37
testing.tRunner(0xc000292340, 0xc00025dc70)
	/usr/local/go/src/testing/testing.go:1690 +0xf4
testing.runTests(0xc000138dc8, {0x1880a20, 0x12, 0x12}, {0x4740f0?, 0x473d5a?, 0x18921c0?})
	/usr/local/go/src/testing/testing.go:2166 +0x43d
testing.(*M).Run(0xc000288460)
	/usr/local/go/src/testing/testing.go:2034 +0x64a
main.main()
	_testmain.go:89 +0x9b

goroutine 21 [chan receive, 4 minutes]:
testing.(*T).Run(0xc0002924e0, {0xdd592e?, 0xcfb46f?}, 0xc0001cf830)
	/usr/local/go/src/testing/testing.go:1751 +0x3ab
github.com/docker/docker/vendor/github.com/stretchr/testify/suite.runTests({0x110c5a8, 0xc0002924e0}, {0xc0001d0300?, 0xd?, 0x10?})
	/go/src/github.com/docker/docker/vendor/github.com/stretchr/testify/suite/suite.go:247 +0xef
github.com/docker/docker/vendor/github.com/stretchr/testify/suite.Run(0xc0002924e0, {0x10fbdf0, 0xc00017d4a0})
	/go/src/github.com/docker/docker/vendor/github.com/stretchr/testify/suite/suite.go:220 +0x486
github.com/docker/docker/vendor/github.com/moby/swarmkit/v2/manager/allocator.RunAllocatorTests(...)
	/go/src/github.com/docker/docker/vendor/github.com/moby/swarmkit/v2/manager/allocator/allocator_test_suite.go:24
github.com/docker/docker/libnetwork/cnmallocator.TestAllocator(0xc0002924e0)
	/go/src/github.com/docker/docker/libnetwork/cnmallocator/allocator_test.go:13 +0x107
testing.tRunner(0xc0002924e0, 0x100b5c8)
	/usr/local/go/src/testing/testing.go:1690 +0xf4
created by testing.(*T).Run in goroutine 1
	/usr/local/go/src/testing/testing.go:1743 +0x390

goroutine 420 [chan receive, 4 minutes]:
github.com/docker/docker/vendor/github.com/docker/go-events.(*Broadcaster).Close(0xc0002d0140?)
	/go/src/github.com/docker/docker/vendor/github.com/docker/go-events/broadcast.go:98 +0x4e
github.com/docker/docker/vendor/github.com/moby/swarmkit/v2/watch.(*Queue).Close(0xc000c62180)
	/go/src/github.com/docker/docker/vendor/github.com/moby/swarmkit/v2/watch/watch.go:196 +0x108
github.com/docker/docker/vendor/github.com/moby/swarmkit/v2/manager/state/store.(*MemoryStore).Close(...)
	/go/src/github.com/docker/docker/vendor/github.com/moby/swarmkit/v2/manager/state/store/memory.go:179
github.com/docker/docker/vendor/github.com/moby/swarmkit/v2/manager/allocator.(*testSuite).TestServiceUpdatePort(0xc00017d4a0)
	/go/src/github.com/docker/docker/vendor/github.com/moby/swarmkit/v2/manager/allocator/allocator_test_suite.go:1908 +0x2df
reflect.Value.call({0xc000295680?, 0xc000137470?, 0x13?}, {0xf9ee28, 0x4}, {0xc000079f28, 0x1, 0x1?})
	/usr/local/go/src/reflect/value.go:581 +0xca6
reflect.Value.Call({0xc000295680?, 0xc000137470?, 0x163eca0?}, {0xc000061728?, 0xf?, 0x0?})
	/usr/local/go/src/reflect/value.go:365 +0xb9
github.com/docker/docker/vendor/github.com/stretchr/testify/suite.Run.func1(0xc000302ea0)
	/go/src/github.com/docker/docker/vendor/github.com/stretchr/testify/suite/suite.go:202 +0x485
testing.tRunner(0xc000302ea0, 0xc0001cf830)
	/usr/local/go/src/testing/testing.go:1690 +0xf4
created by testing.(*T).Run in goroutine 21
	/usr/local/go/src/testing/testing.go:1743 +0x390

goroutine 377 [sync.Cond.Wait, 4 minutes]:
sync.runtime_notifyListWait(0xc000c62ad0, 0x0)
	/usr/local/go/src/runtime/sema.go:587 +0x159
sync.(*Cond).Wait(0xc00032bab0?)
	/usr/local/go/src/sync/cond.go:71 +0x85
github.com/docker/docker/vendor/github.com/moby/swarmkit/v2/watch/queue.(*LimitQueue).Close(0xc0002d0410)
	/go/src/github.com/docker/docker/vendor/github.com/moby/swarmkit/v2/watch/queue/queue.go:94 +0xc5
github.com/docker/docker/vendor/github.com/docker/go-events.(*Filter).Close(0xc00001ac78?)
	/go/src/github.com/docker/docker/vendor/github.com/docker/go-events/filter.go:51 +0x32
github.com/docker/docker/vendor/github.com/docker/go-events.(*Broadcaster).run(0xc0002d0140)
	/go/src/github.com/docker/docker/vendor/github.com/docker/go-events/broadcast.go:153 +0x282
created by github.com/docker/docker/vendor/github.com/docker/go-events.NewBroadcaster in goroutine 420
	/go/src/github.com/docker/docker/vendor/github.com/docker/go-events/broadcast.go:39 +0x1b9

goroutine 380 [select, 4 minutes]:
github.com/docker/docker/vendor/github.com/docker/go-events.(*Channel).Write(0x0?, {0xeb7600?, 0x0?})
	/go/src/github.com/docker/docker/vendor/github.com/docker/go-events/channel.go:36 +0x72
github.com/docker/docker/vendor/github.com/moby/swarmkit/v2/watch.dropErrClosed.Write(...)
	/go/src/github.com/docker/docker/vendor/github.com/moby/swarmkit/v2/watch/sinks.go:54
github.com/docker/docker/vendor/github.com/moby/swarmkit/v2/watch/queue.(*LimitQueue).run(0xc0002d0410)
	/go/src/github.com/docker/docker/vendor/github.com/moby/swarmkit/v2/watch/queue/queue.go:107 +0x65
created by github.com/docker/docker/vendor/github.com/moby/swarmkit/v2/watch/queue.NewLimitQueue in goroutine 379
	/go/src/github.com/docker/docker/vendor/github.com/moby/swarmkit/v2/watch/queue/queue.go:42 +0x19f

goroutine 381 [select, 4 minutes]:
github.com/docker/docker/vendor/github.com/docker/go-events.(*Broadcaster).configure(...)
	/go/src/github.com/docker/docker/vendor/github.com/docker/go-events/broadcast.go:78
github.com/docker/docker/vendor/github.com/docker/go-events.(*Broadcaster).Remove(...)
	/go/src/github.com/docker/docker/vendor/github.com/docker/go-events/broadcast.go:66
github.com/docker/docker/vendor/github.com/moby/swarmkit/v2/watch.(*Queue).CallbackWatch.func1()
	/go/src/github.com/docker/docker/vendor/github.com/moby/swarmkit/v2/watch/watch.go:111 +0x10e
github.com/docker/docker/vendor/github.com/moby/swarmkit/v2/watch.(*Queue).CallbackWatch.func2()
	/go/src/github.com/docker/docker/vendor/github.com/moby/swarmkit/v2/watch/watch.go:123 +0xbd
github.com/docker/docker/vendor/github.com/moby/swarmkit/v2/manager/allocator.(*Allocator).Run.func2.1.1()
	/go/src/github.com/docker/docker/vendor/github.com/moby/swarmkit/v2/manager/allocator/allocator.go:126 +0x32
github.com/docker/docker/vendor/github.com/moby/swarmkit/v2/manager/allocator.(*Allocator).Run.func2.1(0x672b9534d4c8fd9?, 0x672b9534d4c8fd9?)
	/go/src/github.com/docker/docker/vendor/github.com/moby/swarmkit/v2/manager/allocator/allocator.go:129 +0x84
created by github.com/docker/docker/vendor/github.com/moby/swarmkit/v2/manager/allocator.(*Allocator).Run.func2 in goroutine 379
	/go/src/github.com/docker/docker/vendor/github.com/moby/swarmkit/v2/manager/allocator/allocator.go:123 +0x19d

DONE 501 tests, 7 skipped, 2 failures in 478.726s
make: *** [Makefile:242: test-unit] Error 1
Error: Process completed with exit code 2.

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.

LGTM

@thaJeztah thaJeztah merged commit 64ca1c0 into moby:master Dec 19, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area/images Image Service containerd-integration Issues and PRs related to containerd integration kind/refactor PR's that refactor, or clean-up code status/2-code-review

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants