Skip to content

Commit

Permalink
test: rename dl_s3_configs() to dl_build_info()
Browse files Browse the repository at this point in the history
The fact that it's in s3 isn't really important and it's more
appropriate to call it "build info" than "configs", since the files
contain metadata about successful build jobs.
  • Loading branch information
achilleas-k authored and mvo5 committed Jan 18, 2024
1 parent f2a7325 commit 42f7bf7
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
2 changes: 1 addition & 1 deletion test/scripts/check-build-coverage
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ def main():
parser.add_argument("cachedir", type=str, help="path to download the build test cache")
args = parser.parse_args()
cachedir = args.cachedir
_, ok = testlib.dl_s3_configs(cachedir)
_, ok = testlib.dl_build_info(cachedir)
# fail the job if the sync failed
if not ok:
sys.exit(1)
Expand Down
5 changes: 3 additions & 2 deletions test/scripts/imgtestlib.py
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ def list_images(distros=None, arches=None, images=None):
return json.loads(out)


def dl_s3_configs(destination, distro=None, arch=None):
def dl_build_info(destination, distro=None, arch=None):
"""
Downloads all the configs from the s3 bucket.
"""
Expand All @@ -128,6 +128,7 @@ def dl_s3_configs(destination, distro=None, arch=None):
ok = job.returncode == 0
if not ok:
print(f"⚠️ Failed to sync contents of {s3url}:")
print(job.stdout.decode())
print(job.stderr.decode())
return job.stdout.decode(), ok

Expand Down Expand Up @@ -276,7 +277,7 @@ def filter_builds(manifests, distro=None, arch=None, skip_ostree_pull=True):
os.makedirs(dl_path, exist_ok=True)
build_requests = []

out, dl_ok = dl_s3_configs(dl_path, distro=distro, arch=arch)
out, dl_ok = dl_build_info(dl_path, distro=distro, arch=arch)
# continue even if the dl failed; will build all configs
if dl_ok:
# print output which includes list of downloaded files for CI job log
Expand Down

0 comments on commit 42f7bf7

Please sign in to comment.