Skip to content

Commit 104b7ea

Browse files
committed
better filtering for metadata files download
1 parent cf7fca2 commit 104b7ea

File tree

1 file changed

+7
-3
lines changed

1 file changed

+7
-3
lines changed

src/gardenlinux/github/__main__.py

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -480,12 +480,12 @@ def generate_detailed_format(grouped_data):
480480
return output
481481

482482

483-
def download_metadata_file(s3_artifacts, cname, artifacts_dir):
483+
def download_metadata_file(s3_artifacts, cname, version, commitish_short, artifacts_dir):
484484
"""
485485
Download metadata file (s3_metadata.yaml)
486486
"""
487487
print(f'YTDBG // {s3_artifacts=} | {cname=} | {artifacts_dir=}')
488-
_release_objects = s3_artifacts._bucket.objects.filter(Prefix=f"meta/singles/{cname}")
488+
_release_objects = s3_artifacts._bucket.objects.filter(Prefix=f"meta/singles/{cname}-{version}-{commitish_short}")
489489
for o in _release_objects:
490490
print(f'YTDBG // {o.bucket_name=} | {o.key=}')
491491
print(f'YTDBG // {_release_objects=}')
@@ -535,7 +535,11 @@ def download_all_metadata_files(version, commitish):
535535
continue
536536

537537
try:
538-
download_metadata_file(s3_artifacts, cname.cname, local_dest_path)
538+
download_metadata_file(s3_artifacts,
539+
cname.cname,
540+
version,
541+
commitish_short,
542+
local_dest_path)
539543
except IndexError:
540544
print(f"WARNING: No artifacts found for flavor {cname.cname}, skipping...")
541545
continue

0 commit comments

Comments
 (0)