From 946442fd6386f5e8fd61df125c7bbc8d95837e9a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Johannes=20K=C3=B6ster?= Date: Thu, 9 Mar 2023 19:25:18 +0100 Subject: [PATCH] fix: load config before instantiating repodata in artifact upload (#853) --- bioconda_utils/artifacts.py | 3 ++- bioconda_utils/cli.py | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/bioconda_utils/artifacts.py b/bioconda_utils/artifacts.py index f42ad39da8..80943e711b 100644 --- a/bioconda_utils/artifacts.py +++ b/bioconda_utils/artifacts.py @@ -14,7 +14,8 @@ IMAGE_RE = re.compile(r"(.+)(?::|%3A)(.+)\.tar\.gz$") -def upload_pr_artifacts(repo, git_sha, dryrun=False, mulled_upload_target=None, label=None) -> bool: +def upload_pr_artifacts(config, repo, git_sha, dryrun=False, mulled_upload_target=None, label=None) -> bool: + _config = utils.load_config(config) repodata = utils.RepoData() quay_token = os.environ['QUAY_OAUTH_TOKEN'] diff --git a/bioconda_utils/cli.py b/bioconda_utils/cli.py index c324e64ab6..c723ff7057 100644 --- a/bioconda_utils/cli.py +++ b/bioconda_utils/cli.py @@ -502,7 +502,7 @@ def handle_merged_pr( label = os.getenv('BIOCONDA_LABEL', None) or None success = upload_pr_artifacts( - repo, git_range[1], dryrun=dryrun, mulled_upload_target=quay_upload_target, label=label + config, repo, git_range[1], dryrun=dryrun, mulled_upload_target=quay_upload_target, label=label ) if not success and fallback == 'build': success = build(