Skip to content
Merged
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions src/gardenlinux/github/release_notes/helpers.py
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ def download_all_metadata_files(version, commitish, s3_bucket_name):
commitish_short = commitish[:8]
Copy link
Contributor

Choose a reason for hiding this comment

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

The gardenlinux.features.CName class is capable of calculating the correct short commit hash based on the Git commit hash and defined behavior. Please do not truncate commit hashes elsewhere in the code.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

This particular short commit variable is used to construct an s3 objects filter. Not sure how CName instance could help there.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Otherwise replaced its use for CName call below with full commit id.

Copy link
Contributor

Choose a reason for hiding this comment

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

Use commitish_short = cname.commit_id for that purpose or directly Prefix=f"meta/singles/{cname}-{version}-{cname.commit_id}".

Copy link
Contributor

Choose a reason for hiding this comment

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

You may also use Prefix=f"meta/singles/{cname.cname} if applicable.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Switched to using cname.cname where appropriate. cname.commit_id however doesn't work as expected and breaks tests. Will check it out in a separate PR.


for flavor in flavors:
cname = CName(flavor[1], flavor[0], "{0}-{1}".format(version, commitish_short))
cname = CName(flavor[1], flavor[0], commitish_short)
LOGGER.debug(f"{flavor=} {version=} {commitish=}")
# Filter by image variants - only download if the flavor matches one of the variants
flavor_matches_variant = False
Expand Down Expand Up @@ -106,7 +106,7 @@ def download_metadata_file(
f"{s3_artifacts=} | {cname=} | {version=} | {commitish_short=} | {artifacts_dir=}"
)
release_object = list(
s3_artifacts._bucket.objects.filter(
s3_artifacts.bucket.objects.filter(
Prefix=f"meta/singles/{cname}-{version}-{commitish_short}"
)
)[0]
Expand Down
204 changes: 102 additions & 102 deletions test-data/release_notes/github_release_notes_1877.3.md
Original file line number Diff line number Diff line change
Expand Up @@ -174,108 +174,108 @@ systemd 257.5-2gl0
## Changes in Package Versions Compared to 1877.2
| Package | 1877.2 | 1877.3 |
|---------|--------------------|-------------------|
|bpftool | 7.5.0+6.12.40-2gl0 | 7.5.0+6.12.44-3gl0 |
|bpftool-dbgsym | 7.5.0+6.12.40-2gl0 | 7.5.0+6.12.44-3gl0 |
|dpkg | 1.22.18 | 1.22.21gl0+bp1877 |
|dpkg-dbgsym | - | 1.22.21gl0+bp1877 |
|dpkg-dev | 1.22.18 | 1.22.21gl0+bp1877 |
|dselect | - | 1.22.21gl0+bp1877 |
|dselect-dbgsym | - | 1.22.21gl0+bp1877 |
|gnutls-bin | - | 3.8.9-3gl0+bp1877 |
|gnutls-bin-dbgsym | - | 3.8.9-3gl0+bp1877 |
|gnutls-doc | - | 3.8.9-3gl0+bp1877 |
|golang-github-opencontainers-runc-dev | 1.1.15+ds1-2gl1+bp1877 | 1.3.0-1gl0+bp1877 |
|hyperv-daemons | 6.12.40-2gl0 | 6.12.44-3gl0 |
|hyperv-daemons-dbgsym | 6.12.40-2gl0 | 6.12.44-3gl0 |
|intel-sdsi | 6.12.40-2gl0 | 6.12.44-3gl0 |
|intel-sdsi-dbgsym | 6.12.40-2gl0 | 6.12.44-3gl0 |
|iputils-arping | 3:20240905-3 | 3:20250605-1gl0~bp1877 |
|iputils-arping-dbgsym | - | 3:20250605-1gl0~bp1877 |
|iputils-clockdiff | - | 3:20250605-1gl0~bp1877 |
|iputils-clockdiff-dbgsym | - | 3:20250605-1gl0~bp1877 |
|iputils-ping | 3:20240905-3 | 3:20250605-1gl0~bp1877 |
|iputils-ping-dbgsym | - | 3:20250605-1gl0~bp1877 |
|iputils-tracepath | 3:20240905-3 | 3:20250605-1gl0~bp1877 |
|iputils-tracepath-dbgsym | - | 3:20250605-1gl0~bp1877 |
|lemon | - | 3.46.1-7gl0+bp1877 |
|lemon-dbgsym | - | 3.46.1-7gl0+bp1877 |
|libcpupower-dev | 6.12.40-2gl0 | 6.12.44-3gl0 |
|libcpupower1 | 6.12.40-2gl0 | 6.12.44-3gl0 |
|libcpupower1-dbgsym | 6.12.40-2gl0 | 6.12.44-3gl0 |
|libdpkg-dev | - | 1.22.21gl0+bp1877 |
|libdpkg-perl | 1.22.18 | 1.22.21gl0+bp1877 |
|libgnutls-dane0t64 | 3.8.9-2 | 3.8.9-3gl0+bp1877 |
|libgnutls-dane0t64-dbgsym | - | 3.8.9-3gl0+bp1877 |
|libgnutls-openssl27t64 | 3.8.9-2 | 3.8.9-3gl0+bp1877 |
|libgnutls-openssl27t64-dbgsym | - | 3.8.9-3gl0+bp1877 |
|libgnutls28-dev | 3.8.9-2 | 3.8.9-3gl0+bp1877 |
|libgnutls30t64 | 3.8.9-2 | 3.8.9-3gl0+bp1877 |
|libgnutls30t64-dbgsym | - | 3.8.9-3gl0+bp1877 |
|libmd-dev | - | 1.1.0-2+b1 |
|libsqlite3-0 | 3.46.1-4 | 3.46.1-7gl0+bp1877 |
|libsqlite3-0-dbgsym | - | 3.46.1-7gl0+bp1877 |
|libsqlite3-dev | - | 3.46.1-7gl0+bp1877 |
|libsqlite3-ext-csv | - | 3.46.1-7gl0+bp1877 |
|libsqlite3-ext-csv-dbgsym | - | 3.46.1-7gl0+bp1877 |
|libsqlite3-ext-icu | - | 3.46.1-7gl0+bp1877 |
|libsqlite3-ext-icu-dbgsym | - | 3.46.1-7gl0+bp1877 |
|libsqlite3-tcl | - | 3.46.1-7gl0+bp1877 |
|libsqlite3-tcl-dbgsym | - | 3.46.1-7gl0+bp1877 |
|linux-base | 4.11 | 4.12gl0+bp1877 |
|linux-bpf-dev | 6.12.40-2gl0 | 6.12.44-3gl0 |
|linux-config-6.12 | 6.12.40-2gl0 | 6.12.44-3gl0 |
|linux-cpupower | 6.12.40-2gl0 | 6.12.44-3gl0 |
|linux-cpupower-dbgsym | 6.12.40-2gl0 | 6.12.44-3gl0 |
|linux-headers-6.12.40-amd64 | 6.12.40-2gl0 | - |
|linux-headers-6.12.40-cloud-amd64 | 6.12.40-2gl0 | - |
|linux-headers-6.12.40-common | 6.12.40-2gl0 | - |
|linux-headers-6.12.40-firecracker-amd64 | 6.12.40-2gl0 | - |
|linux-headers-6.12.44-amd64 | - | 6.12.44-3gl0 |
|linux-headers-6.12.44-cloud-amd64 | - | 6.12.44-3gl0 |
|linux-headers-6.12.44-common | - | 6.12.44-3gl0 |
|linux-headers-6.12.44-firecracker-amd64 | - | 6.12.44-3gl0 |
|linux-headers-amd64 | 6.12.40-2gl0 | 6.12.44-3gl0 |
|linux-headers-cloud-amd64 | 6.12.40-2gl0 | 6.12.44-3gl0 |
|linux-headers-firecracker-amd64 | 6.12.40-2gl0 | 6.12.44-3gl0 |
|linux-image-6.12.40-amd64 | 6.12.40-2gl0 | - |
|linux-image-6.12.40-amd64-dbg | 6.12.40-2gl0 | - |
|linux-image-6.12.40-cloud-amd64 | 6.12.40-2gl0 | - |
|linux-image-6.12.40-cloud-amd64-dbg | 6.12.40-2gl0 | - |
|linux-image-6.12.40-firecracker-amd64 | 6.12.40-2gl0 | - |
|linux-image-6.12.40-firecracker-amd64-dbg | 6.12.40-2gl0 | - |
|linux-image-6.12.44-amd64 | - | 6.12.44-3gl0 |
|linux-image-6.12.44-amd64-dbg | - | 6.12.44-3gl0 |
|linux-image-6.12.44-cloud-amd64 | - | 6.12.44-3gl0 |
|linux-image-6.12.44-cloud-amd64-dbg | - | 6.12.44-3gl0 |
|linux-image-6.12.44-firecracker-amd64 | - | 6.12.44-3gl0 |
|linux-image-6.12.44-firecracker-amd64-dbg | - | 6.12.44-3gl0 |
|linux-image-amd64 | 6.12.40-2gl0 | 6.12.44-3gl0 |
|linux-image-amd64-dbg | 6.12.40-2gl0 | 6.12.44-3gl0 |
|linux-image-cloud-amd64 | 6.12.40-2gl0 | 6.12.44-3gl0 |
|linux-image-cloud-amd64-dbg | 6.12.40-2gl0 | 6.12.44-3gl0 |
|linux-image-firecracker-amd64 | 6.12.40-2gl0 | 6.12.44-3gl0 |
|linux-image-firecracker-amd64-dbg | 6.12.40-2gl0 | 6.12.44-3gl0 |
|linux-kbuild-6.12.40 | 6.12.40-2gl0 | - |
|linux-kbuild-6.12.40-dbgsym | 6.12.40-2gl0 | - |
|linux-kbuild-6.12.44 | - | 6.12.44-3gl0 |
|linux-kbuild-6.12.44-dbgsym | - | 6.12.44-3gl0 |
|linux-libc-dev | 6.12.40-2gl0 | 6.12.44-3gl0 |
|linux-source | 6.12.40-2gl0 | 6.12.44-3gl0 |
|linux-source-6.12 | 6.12.40-2gl0 | 6.12.44-3gl0 |
|linux-support-6.12.40 | 6.12.40-2gl0 | - |
|linux-support-6.12.44 | - | 6.12.44-3gl0 |
|linux-sysctl-defaults | 4.11 | 4.12gl0+bp1877 |
|rtla | 6.12.40-2gl0 | 6.12.44-3gl0 |
|rtla-dbgsym | 6.12.40-2gl0 | 6.12.44-3gl0 |
|runc | 1.1.15+ds1-2gl1+bp1877 | 1.3.0-1gl0+bp1877 |
|runc-dbgsym | 1.1.15+ds1-2gl1+bp1877 | 1.3.0-1gl0+bp1877 |
|sqlite3 | - | 3.46.1-7gl0+bp1877 |
|sqlite3-dbgsym | - | 3.46.1-7gl0+bp1877 |
|sqlite3-doc | - | 3.46.1-7gl0+bp1877 |
|sqlite3-tools | - | 3.46.1-7gl0+bp1877 |
|sqlite3-tools-dbgsym | - | 3.46.1-7gl0+bp1877 |
|usbip | 2.0+6.12.40-2gl0 | 2.0+6.12.44-3gl0 |
|usbip-dbgsym | 2.0+6.12.40-2gl0 | 2.0+6.12.44-3gl0 |
|bpftool | `7.5.0+6.12.40-2gl0` | `7.5.0+6.12.44-3gl0` |
|bpftool-dbgsym | `7.5.0+6.12.40-2gl0` | `7.5.0+6.12.44-3gl0` |
|dpkg | `1.22.18` | `1.22.21gl0+bp1877` |
|dpkg-dbgsym | `-` | `1.22.21gl0+bp1877` |
|dpkg-dev | `1.22.18` | `1.22.21gl0+bp1877` |
|dselect | `-` | `1.22.21gl0+bp1877` |
|dselect-dbgsym | `-` | `1.22.21gl0+bp1877` |
|gnutls-bin | `-` | `3.8.9-3gl0+bp1877` |
|gnutls-bin-dbgsym | `-` | `3.8.9-3gl0+bp1877` |
|gnutls-doc | `-` | `3.8.9-3gl0+bp1877` |
|golang-github-opencontainers-runc-dev | `1.1.15+ds1-2gl1+bp1877` | `1.3.0-1gl0+bp1877` |
|hyperv-daemons | `6.12.40-2gl0` | `6.12.44-3gl0` |
|hyperv-daemons-dbgsym | `6.12.40-2gl0` | `6.12.44-3gl0` |
|intel-sdsi | `6.12.40-2gl0` | `6.12.44-3gl0` |
|intel-sdsi-dbgsym | `6.12.40-2gl0` | `6.12.44-3gl0` |
|iputils-arping | `3:20240905-3` | `3:20250605-1gl0~bp1877` |
|iputils-arping-dbgsym | `-` | `3:20250605-1gl0~bp1877` |
|iputils-clockdiff | `-` | `3:20250605-1gl0~bp1877` |
|iputils-clockdiff-dbgsym | `-` | `3:20250605-1gl0~bp1877` |
|iputils-ping | `3:20240905-3` | `3:20250605-1gl0~bp1877` |
|iputils-ping-dbgsym | `-` | `3:20250605-1gl0~bp1877` |
|iputils-tracepath | `3:20240905-3` | `3:20250605-1gl0~bp1877` |
|iputils-tracepath-dbgsym | `-` | `3:20250605-1gl0~bp1877` |
|lemon | `-` | `3.46.1-7gl0+bp1877` |
|lemon-dbgsym | `-` | `3.46.1-7gl0+bp1877` |
|libcpupower-dev | `6.12.40-2gl0` | `6.12.44-3gl0` |
|libcpupower1 | `6.12.40-2gl0` | `6.12.44-3gl0` |
|libcpupower1-dbgsym | `6.12.40-2gl0` | `6.12.44-3gl0` |
|libdpkg-dev | `-` | `1.22.21gl0+bp1877` |
|libdpkg-perl | `1.22.18` | `1.22.21gl0+bp1877` |
|libgnutls-dane0t64 | `3.8.9-2` | `3.8.9-3gl0+bp1877` |
|libgnutls-dane0t64-dbgsym | `-` | `3.8.9-3gl0+bp1877` |
|libgnutls-openssl27t64 | `3.8.9-2` | `3.8.9-3gl0+bp1877` |
|libgnutls-openssl27t64-dbgsym | `-` | `3.8.9-3gl0+bp1877` |
|libgnutls28-dev | `3.8.9-2` | `3.8.9-3gl0+bp1877` |
|libgnutls30t64 | `3.8.9-2` | `3.8.9-3gl0+bp1877` |
|libgnutls30t64-dbgsym | `-` | `3.8.9-3gl0+bp1877` |
|libmd-dev | `-` | `1.1.0-2+b1` |
|libsqlite3-0 | `3.46.1-4` | `3.46.1-7gl0+bp1877` |
|libsqlite3-0-dbgsym | `-` | `3.46.1-7gl0+bp1877` |
|libsqlite3-dev | `-` | `3.46.1-7gl0+bp1877` |
|libsqlite3-ext-csv | `-` | `3.46.1-7gl0+bp1877` |
|libsqlite3-ext-csv-dbgsym | `-` | `3.46.1-7gl0+bp1877` |
|libsqlite3-ext-icu | `-` | `3.46.1-7gl0+bp1877` |
|libsqlite3-ext-icu-dbgsym | `-` | `3.46.1-7gl0+bp1877` |
|libsqlite3-tcl | `-` | `3.46.1-7gl0+bp1877` |
|libsqlite3-tcl-dbgsym | `-` | `3.46.1-7gl0+bp1877` |
|linux-base | `4.11` | `4.12gl0+bp1877` |
|linux-bpf-dev | `6.12.40-2gl0` | `6.12.44-3gl0` |
|linux-config-6.12 | `6.12.40-2gl0` | `6.12.44-3gl0` |
|linux-cpupower | `6.12.40-2gl0` | `6.12.44-3gl0` |
|linux-cpupower-dbgsym | `6.12.40-2gl0` | `6.12.44-3gl0` |
|linux-headers-6.12.40-amd64 | `6.12.40-2gl0` | `-` |
|linux-headers-6.12.40-cloud-amd64 | `6.12.40-2gl0` | `-` |
|linux-headers-6.12.40-common | `6.12.40-2gl0` | `-` |
|linux-headers-6.12.40-firecracker-amd64 | `6.12.40-2gl0` | `-` |
|linux-headers-6.12.44-amd64 | `-` | `6.12.44-3gl0` |
|linux-headers-6.12.44-cloud-amd64 | `-` | `6.12.44-3gl0` |
|linux-headers-6.12.44-common | `-` | `6.12.44-3gl0` |
|linux-headers-6.12.44-firecracker-amd64 | `-` | `6.12.44-3gl0` |
|linux-headers-amd64 | `6.12.40-2gl0` | `6.12.44-3gl0` |
|linux-headers-cloud-amd64 | `6.12.40-2gl0` | `6.12.44-3gl0` |
|linux-headers-firecracker-amd64 | `6.12.40-2gl0` | `6.12.44-3gl0` |
|linux-image-6.12.40-amd64 | `6.12.40-2gl0` | `-` |
|linux-image-6.12.40-amd64-dbg | `6.12.40-2gl0` | `-` |
|linux-image-6.12.40-cloud-amd64 | `6.12.40-2gl0` | `-` |
|linux-image-6.12.40-cloud-amd64-dbg | `6.12.40-2gl0` | `-` |
|linux-image-6.12.40-firecracker-amd64 | `6.12.40-2gl0` | `-` |
|linux-image-6.12.40-firecracker-amd64-dbg | `6.12.40-2gl0` | `-` |
|linux-image-6.12.44-amd64 | `-` | `6.12.44-3gl0` |
|linux-image-6.12.44-amd64-dbg | `-` | `6.12.44-3gl0` |
|linux-image-6.12.44-cloud-amd64 | `-` | `6.12.44-3gl0` |
|linux-image-6.12.44-cloud-amd64-dbg | `-` | `6.12.44-3gl0` |
|linux-image-6.12.44-firecracker-amd64 | `-` | `6.12.44-3gl0` |
|linux-image-6.12.44-firecracker-amd64-dbg | `-` | `6.12.44-3gl0` |
|linux-image-amd64 | `6.12.40-2gl0` | `6.12.44-3gl0` |
|linux-image-amd64-dbg | `6.12.40-2gl0` | `6.12.44-3gl0` |
|linux-image-cloud-amd64 | `6.12.40-2gl0` | `6.12.44-3gl0` |
|linux-image-cloud-amd64-dbg | `6.12.40-2gl0` | `6.12.44-3gl0` |
|linux-image-firecracker-amd64 | `6.12.40-2gl0` | `6.12.44-3gl0` |
|linux-image-firecracker-amd64-dbg | `6.12.40-2gl0` | `6.12.44-3gl0` |
|linux-kbuild-6.12.40 | `6.12.40-2gl0` | `-` |
|linux-kbuild-6.12.40-dbgsym | `6.12.40-2gl0` | `-` |
|linux-kbuild-6.12.44 | `-` | `6.12.44-3gl0` |
|linux-kbuild-6.12.44-dbgsym | `-` | `6.12.44-3gl0` |
|linux-libc-dev | `6.12.40-2gl0` | `6.12.44-3gl0` |
|linux-source | `6.12.40-2gl0` | `6.12.44-3gl0` |
|linux-source-6.12 | `6.12.40-2gl0` | `6.12.44-3gl0` |
|linux-support-6.12.40 | `6.12.40-2gl0` | `-` |
|linux-support-6.12.44 | `-` | `6.12.44-3gl0` |
|linux-sysctl-defaults | `4.11` | `4.12gl0+bp1877` |
|rtla | `6.12.40-2gl0` | `6.12.44-3gl0` |
|rtla-dbgsym | `6.12.40-2gl0` | `6.12.44-3gl0` |
|runc | `1.1.15+ds1-2gl1+bp1877` | `1.3.0-1gl0+bp1877` |
|runc-dbgsym | `1.1.15+ds1-2gl1+bp1877` | `1.3.0-1gl0+bp1877` |
|sqlite3 | `-` | `3.46.1-7gl0+bp1877` |
|sqlite3-dbgsym | `-` | `3.46.1-7gl0+bp1877` |
|sqlite3-doc | `-` | `3.46.1-7gl0+bp1877` |
|sqlite3-tools | `-` | `3.46.1-7gl0+bp1877` |
|sqlite3-tools-dbgsym | `-` | `3.46.1-7gl0+bp1877` |
|usbip | `2.0+6.12.40-2gl0` | `2.0+6.12.44-3gl0` |
|usbip-dbgsym | `2.0+6.12.40-2gl0` | `2.0+6.12.44-3gl0` |
## Published Images

<details>
Expand Down
12 changes: 4 additions & 8 deletions tests/github/test_download_metadata_files.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,11 +23,7 @@ def test_download_metadata_file(downloads_dir, release_s3_bucket):
s3_artifacts = S3Artifacts(TEST_GARDENLINUX_RELEASE_BUCKET_NAME)
s3_artifacts._bucket = release_s3_bucket

cname = CName(
"test-aws-gardener_prod",
"amd64",
"{0}-{1}".format(TEST_GARDENLINUX_RELEASE, TEST_GARDENLINUX_COMMIT_SHORT),
)
cname = CName("test-aws-gardener_prod", "amd64", TEST_GARDENLINUX_COMMIT_SHORT)
download_metadata_file(
s3_artifacts,
cname.cname,
Expand All @@ -48,7 +44,7 @@ def test_download_metadata_file_no_such_release(downloads_dir, release_s3_bucket

release = "0000.0"
commit = TEST_GARDENLINUX_COMMIT_SHORT
cname = CName("aws-gardener_prod", "amd64", "{0}-{1}".format(release, commit))
cname = CName("aws-gardener_prod", "amd64", commit)

with pytest.raises(IndexError):
download_metadata_file(
Expand All @@ -70,7 +66,7 @@ def test_download_metadata_file_no_such_commit(downloads_dir, release_s3_bucket)

release = TEST_GARDENLINUX_RELEASE
commit = "deadbeef"
cname = CName("test-aws-gardener_prod", "amd64", "{0}-{1}".format(release, commit))
cname = CName("test-aws-gardener_prod", "amd64", commit)

with pytest.raises(IndexError):
download_metadata_file(
Expand All @@ -94,7 +90,7 @@ def test_download_metadata_file_no_such_release_and_commit(

release = "0000.0"
commit = "deadbeef"
cname = CName("test-aws-gardener_prod", "amd64", "{0}-{1}".format(release, commit))
cname = CName("test-aws-gardener_prod", "amd64", commit)

with pytest.raises(IndexError):
download_metadata_file(
Expand Down
Loading