From def09cac700d0f9323b9998175b99598023f4ac1 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 10 Nov 2026 15:14:55 +0000 Subject: [PATCH 1/3] build(deps): bump actions/cache from 5 to 6 Bumps [actions/cache](https://github.com/actions/cache) from 5 to 6. - [Release notes](https://github.com/actions/cache/releases) - [Changelog](https://github.com/actions/cache/blob/main/RELEASES.md) - [Commits](https://github.com/actions/cache/compare/v5...v6) --- updated-dependencies: - dependency-name: actions/cache dependency-version: '6' dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] --- .github/workflows/release.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 834f774f..88c74278 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -50,7 +50,7 @@ jobs: - uses: gardenlinux/python-gardenlinux-lib/.github/actions/setup@main - name: Use cargo cache id: cache-cargo - uses: actions/cache@v5 + uses: actions/cache@v6 with: path: | ~/.cargo From 22274813be0850f97de80ab55e5e5c9340660f2b Mon Sep 17 00:00:00 2001 From: Tobias Wolf Date: Tue, 17 Nov 2026 11:31:36 +0100 Subject: [PATCH 2/3] Bump `git-cliff` to 2.14.2 Signed-off-by: Tobias Wolf On-behalf-of: SAP --- .github/workflows/release.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 88c74278..0b2f4548 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -8,7 +8,7 @@ on: - "[0-9]+.[0-9]+.[0-9]+*" env: - GIT_CLIFF_VERSION: 2.13.1 + GIT_CLIFF_VERSION: 2.14.2 jobs: docs: @@ -50,7 +50,7 @@ jobs: - uses: gardenlinux/python-gardenlinux-lib/.github/actions/setup@main - name: Use cargo cache id: cache-cargo - uses: actions/cache@v6 + uses: actions/cache@55cc8345863c7cc4c66a329aec7e433d2d1c52a9 # pin@v6.1.0 with: path: | ~/.cargo From b792eab53d7c787ea9288466596f30d9604be2d4 Mon Sep 17 00:00:00 2001 From: Tobias Wolf Date: Tue, 17 Nov 2026 11:32:31 +0100 Subject: [PATCH 3/3] Detect OCI manifest type read based on `mediaType` Signed-off-by: Tobias Wolf On-behalf-of: SAP --- .github/actions/setup/action.yml | 2 +- pyproject.toml | 2 +- src/gardenlinux/oci/__main__.py | 2 +- src/gardenlinux/oci/image_manifest.py | 5 +++++ src/gardenlinux/oci/repository.py | 22 ++++++++++------------ 5 files changed, 18 insertions(+), 15 deletions(-) diff --git a/.github/actions/setup/action.yml b/.github/actions/setup/action.yml index 89348535..985acc2a 100644 --- a/.github/actions/setup/action.yml +++ b/.github/actions/setup/action.yml @@ -4,7 +4,7 @@ description: Installs the given GardenLinux Python library inputs: version: description: GardenLinux Python library version - default: "1.0.4" + default: "1.0.5" python_version: description: Python version to setup default: "3.14" diff --git a/pyproject.toml b/pyproject.toml index 07832b33..7b08ae69 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [tool.poetry] name = "gardenlinux" -version = "1.0.4" +version = "1.0.5" description = "Contains tools to work with the features directory of gardenlinux, for example deducting dependencies from feature sets or validating cnames" authors = ["Garden Linux Maintainers "] license = "Apache-2.0" diff --git a/src/gardenlinux/oci/__main__.py b/src/gardenlinux/oci/__main__.py index bf541ab3..135cc7ab 100755 --- a/src/gardenlinux/oci/__main__.py +++ b/src/gardenlinux/oci/__main__.py @@ -6,8 +6,8 @@ import argparse import json -from pathlib import Path from os import getenv +from pathlib import Path from typing import Optional from .image_manifest import ImageManifest diff --git a/src/gardenlinux/oci/image_manifest.py b/src/gardenlinux/oci/image_manifest.py index 1b265c9d..db28edd9 100644 --- a/src/gardenlinux/oci/image_manifest.py +++ b/src/gardenlinux/oci/image_manifest.py @@ -11,6 +11,7 @@ from typing import Any, Dict from oras.defaults import annotation_title as ANNOTATION_TITLE +from oras.defaults import default_manifest_media_type as IMAGE_MANIFEST_MEDIA_TYPE from ..constants import GL_DISTRIBUTION_NAME, GL_REPOSITORY_URL from ..features import ArtifactBaseName, Flavor @@ -77,6 +78,10 @@ class ImageManifest(Manifest): """ OCI image manifest GardenLinux version annotation """ + IMAGE_MANIFEST_MEDIA_TYPE = IMAGE_MANIFEST_MEDIA_TYPE + """ + OCI image manifest media type + """ @property def arch(self) -> str: diff --git a/src/gardenlinux/oci/repository.py b/src/gardenlinux/oci/repository.py index c8200b0e..99f71e24 100644 --- a/src/gardenlinux/oci/repository.py +++ b/src/gardenlinux/oci/repository.py @@ -154,19 +154,10 @@ def generate_image_manifest( manifest = ImageManifest() manifest.flavor = abn_object.flavor + manifest.feature_set = feature_set manifest.version = version manifest.commit = commit - description = ( - f"Image: {cname}-{architecture}-{version}-{commit}" - f"Flavor: {cname}-{architecture} " - f"Architecture: {architecture} " - f"Features: {feature_set} " - f"Commit: {commit} " - ) - - manifest["annotations"]["org.opencontainers.image.description"] = description - manifest.config_from_dict( {}, {"cname": cname, "architecture": architecture}, @@ -624,7 +615,6 @@ def read_manifest( if cname is None: manifest_type = Manifest - response = self._get_manifest_without_response_parsing(self._repository_tag) else: abn_object = ArtifactBaseName(f"{cname}-{architecture}-{version}-{commit}") @@ -635,7 +625,15 @@ def read_manifest( ) if response.ok: - manifest = manifest_type(**response.json()) + response_data = response.json() + + if ( + response_data.get("mediaType") + == ImageManifest.IMAGE_MANIFEST_MEDIA_TYPE + ): + manifest_type = ImageManifest + + manifest = manifest_type(**response_data) else: response.raise_for_status()