Skip to content

Commit

Permalink
Fix download artifact truncate page (#32772)
Browse files Browse the repository at this point in the history
  • Loading branch information
Abacn authored Oct 14, 2024
1 parent 1f575d4 commit c04e91d
Showing 1 changed file with 4 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -279,8 +279,11 @@ def fetch_github_artifacts(run_id, repo_url, artifacts_dir, github_token, rc_num
print("Starting downloading artifacts ... (it may take a while)")
run_data = get_single_workflow_run_data(run_id, repo_url, github_token)
artifacts_url = safe_get(run_data, "artifacts_url")
data_artifacts = request_url(artifacts_url, github_token)
data_artifacts = request_url(artifacts_url + '?per_page=100', github_token)
artifacts = safe_get(data_artifacts, "artifacts", artifacts_url)
total_count = safe_get(data_artifacts, "total_count", artifacts_url)
if int(total_count) != len(artifacts):
raise RuntimeError(f"Expected total count {total_count} different than returned list length {len(data_artifacts)}")
print('Filtering ', len(artifacts), ' artifacts')
filtered_artifacts = filter_artifacts(artifacts, rc_number)
print('Preparing to download ', len(filtered_artifacts), ' artifacts')
Expand Down

0 comments on commit c04e91d

Please sign in to comment.