Skip to content

Conversation

apostasie
Copy link
Contributor

@apostasie apostasie commented May 5, 2025

Why

Test images do not currently digest pin when pulling (they should).
Furthermore, test images are peppered all over the place, with some tests using direct references, and some images being defined in platform specific files.
Finally, there is currently no easy mechanism for external scripts to override a specific image version on the fly (eg: for example to test a different registry version on canary).

What this is

This offers to consolidate all test images references inside an embedded file.
Using an embed will allow external tests scripts to more easily manipulate the list and versions (eg: for "canaries") rather than having to parse go source files.

Images in the yaml file can use digest pinning in the future - though right now, we cannot yet do that for a few reasons:

  • some tests make assumptions on the image format, or hardcode the result - they need to be cleaned-up
  • docker pull with tag+digest will loose the tag, effectively breaking tests for docker

Nevertheless, this is a first step to solving these issues - future PRs to follow.

@apostasie apostasie force-pushed the 2025-05-ci-proofing branch 4 times, most recently from 57c0321 to ef657f7 Compare May 11, 2025 03:03
@apostasie apostasie changed the title [EXPERIMENTAL] proofing [WIP] [EXP] proofing May 14, 2025
@apostasie apostasie force-pushed the 2025-05-ci-proofing branch 17 times, most recently from 4d4ee15 to 260ee6e Compare May 20, 2025 22:31
@apostasie apostasie force-pushed the 2025-05-ci-proofing branch from 260ee6e to 21412de Compare June 19, 2025 18:52
@apostasie apostasie changed the title [WIP] [EXP] proofing Test images: cleanup and centralize Jun 20, 2025
@apostasie apostasie marked this pull request as ready for review June 20, 2025 17:27
@apostasie apostasie mentioned this pull request Jun 20, 2025
@AkihiroSuda AkihiroSuda added this to the v2.1.3 milestone Jun 20, 2025
@apostasie apostasie force-pushed the 2025-05-ci-proofing branch from 21412de to b43043a Compare June 20, 2025 18:28
@apostasie apostasie force-pushed the 2025-05-ci-proofing branch from b43043a to dd1c643 Compare June 20, 2025 21:26
@apostasie
Copy link
Contributor Author

YAML variant incoming.
Reverting to draft until the CI is happy.

@apostasie apostasie marked this pull request as draft June 20, 2025 21:26
@apostasie apostasie force-pushed the 2025-05-ci-proofing branch 2 times, most recently from 3231391 to 29e5871 Compare June 20, 2025 22:25
@apostasie apostasie marked this pull request as ready for review June 21, 2025 18:26

var testImages map[string]TestImage

func getImage(key string) string {
Copy link
Member

Choose a reason for hiding this comment

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

can we have a test for this func getImage :) !

Copy link
Contributor Author

@apostasie apostasie Jun 21, 2025

Choose a reason for hiding this comment

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

I think testing test tools is a bit much :) (well, core testing like tigron sure, it should be tested - but this here is just a yaml file getting parsed).
Also this is going to evolve soon with upcoming PRs so let see when this is getting finalized?

Copy link
Member

Choose a reason for hiding this comment

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

I mean unit test but ok not mandatory regarding the impact

# Current schema (defined in images_linux.go) allows for ref, tag, (index) digest and platform variants.
# Right now, digest and variants are not used for anything, but they should / could be in the future.
# Also note that changing the schema should be easy and straight-forward for now, so,
# this might evolve in the near future.
Copy link
Member

Choose a reason for hiding this comment

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

may be document how to add new images or update existing ones.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Will do in upcoming PRs once we stabilize the schema?

Signed-off-by: apostasie <spam_blackhole@farcloser.world>
@apostasie apostasie force-pushed the 2025-05-ci-proofing branch from 29e5871 to cfb5a16 Compare June 21, 2025 22:41
Copy link
Member

@fahedouch fahedouch left a comment

Choose a reason for hiding this comment

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

Thanks

Copy link
Member

@AkihiroSuda AkihiroSuda left a comment

Choose a reason for hiding this comment

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

Thanks

@AkihiroSuda AkihiroSuda merged commit 4c0dd00 into containerd:main Jun 22, 2025
38 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants