Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Regression v0.22: no more OCI org.opencontainers.image.description annotations #44232

Closed
3 tasks done
wdconinc opened this issue May 16, 2024 · 3 comments
Closed
3 tasks done
Labels
not-a-bug Bug report that has been triaged as not being a bug

Comments

@wdconinc
Copy link
Contributor

Steps to reproduce

When switching from v0.21.0 to v0.22.0, I am seeing the annotations with the full spec disappear:

$ docker manifest inspect ghcr.io/eic/spack-v0.21.0:zlib-1.3-fkia5epvghgmzoozf4uaqesidycp3siq.spack
$ docker manifest inspect ghcr.io/eic/spack-v0.22.0:zlib-1.3.1-zzjwvbcanbgwbaowibv5vhazchk57pbh.spack

where the first has

        "annotations": {
                "org.opencontainers.image.description": "zlib@=1.3%gcc@=12.2.0+optimize+pic+shared build_system=makefile arch=linux-debian12-x86_64_v2"
        }

but the second doesn't.

Error message

15:56:57 wdconinc@menelaos ~/EIC/containers/eic_container (master $%>) $ docker manifest inspect ghcr.io/eic/spack-v0.21.0:zlib-1.3-fkia5epvghgmzoozf4uaqesidycp3siq.spack
{
        "mediaType": "application/vnd.oci.image.manifest.v1+json",
        "schemaVersion": 2,
        "config": {
                "mediaType": "application/vnd.docker.container.image.v1+json",
                "digest": "sha256:1009e5efe2c6d88894ac66d1c47b0b7add60935ddaa7c533c2f13a47b5c6cbd2",
                "size": 3079
        },
        "layers": [
                {
                        "mediaType": "application/vnd.docker.image.rootfs.diff.tar.gzip",
                        "size": 29125911,
                        "digest": "sha256:9532dfcb62dd7b77bbbd3b359c01984d8df09545ed759f6e68a3783d0702fe57"
                },
                {
                        "mediaType": "application/vnd.oci.image.layer.v1.tar+gzip",
                        "digest": "sha256:89180dae57cbedfb0504cb3b99e30db4c450e1704ff020a00c0550f0a8b3baaa",
                        "size": 156184
                }
        ],
        "annotations": {
                "org.opencontainers.image.description": "zlib@=1.3%gcc@=12.2.0+optimize+pic+shared build_system=makefile arch=linux-debian12-x86_64_v2"
        }
}
15:59:04 wdconinc@menelaos ~/EIC/containers/eic_container (master $%>) $ docker manifest inspect ghcr.io/eic/spack-v0.22.0:zlib-1.3.1-zzjwvbcanbgwbaowibv5vhazchk57pbh.spack
{
        "mediaType": "application/vnd.docker.distribution.manifest.v2+json",
        "schemaVersion": 2,
        "config": {
                "mediaType": "application/vnd.docker.container.image.v1+json",
                "digest": "sha256:c5f8a4bfcc7089ea8c71a4e9350a746d813f77d6c0a06036a6485f0a32533413",
                "size": 4826
        },
        "layers": [
                {
                        "mediaType": "application/vnd.docker.image.rootfs.diff.tar.gzip",
                        "size": 29124086,
                        "digest": "sha256:0cd8e731090f73581a5eb972477f361b7a360a9805ca80604bbd90dbc8856899"
                },
                {
                        "mediaType": "application/vnd.docker.image.rootfs.diff.tar.gzip",
                        "digest": "sha256:b7a25a581a11b5b41d3d214cd8a0ec5009d216e526e5ce96e0958fcc0188177b",
                        "size": 10648952
                },
                {
                        "mediaType": "application/vnd.docker.image.rootfs.diff.tar.gzip",
                        "digest": "sha256:7342ad4e7ab9f42c3afb9db4ea00d41f5c0e8f50d4e4ae4c963f02439d1a0ddf",
                        "size": 158930
                }
        ]
}

Information on your system

  • Spack: 0.22.0.dev0 (673882c8073467c2b6b9841fcf533fa6f34f4a6a)
  • Python: 3.12.3
  • Platform: linux-ubuntu24.04-skylake
  • Concretizer: clingo

But probably matters more that the v0.22.0 instance is running on a clean v0.22.0 with a cherry-pick of 09f75ee.

General information

  • I have run spack debug report and reported the version of Spack/Python/Platform
  • I have searched the issues of this repo and believe this is not a duplicate
  • I have run the failing commands in debug mode and reported the output
@wdconinc wdconinc added bug Something isn't working triage The issue needs to be prioritized labels May 16, 2024
@wdconinc
Copy link
Contributor Author

Ah, I think this is referred to here: #42777 (comment).

@haampie @alalazo Would it be reasonable to re-enable annotations for the docker container format, as they seem to be supporter per https://docs.docker.com/build/building/annotations/?

@haampie
Copy link
Member

haampie commented May 23, 2024

The example you and @whophil are linking is for OCI images (application/vnd.oci.image.index.v1+json), not docker images (application/vnd.docker.distribution.manifest.v2+json).

Docker images do not support annotations, and some container runtimes are (overly) strict about that -- containers won't run if annotations are present.

To fix it, you'd have to translate docker images into an oci images and then add annotations. But then the question is if that's always possible or not, maybe docker has certain properties that don't map to oci properties (I didn't check).

Spack simply extends the manifest of the base image the user provides, so docker images stay docker images, oci images stay oci images.

@haampie haampie added not-a-bug Bug report that has been triaged as not being a bug and removed bug Something isn't working triage The issue needs to be prioritized labels May 23, 2024
@wdconinc
Copy link
Contributor Author

Ok, then this a wont-fix, I assume.

@wdconinc wdconinc closed this as not planned Won't fix, can't repro, duplicate, stale May 23, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
not-a-bug Bug report that has been triaged as not being a bug
Projects
None yet
Development

No branches or pull requests

2 participants