diff --git a/.github/actions/create_workflow_report/action.yml b/.github/actions/create_workflow_report/action.yml index 7ede97fbaed1..0bf2933550f9 100644 --- a/.github/actions/create_workflow_report/action.yml +++ b/.github/actions/create_workflow_report/action.yml @@ -16,7 +16,10 @@ runs: FINAL: ${{ inputs.final }} shell: bash run: | - pip install clickhouse-driver==0.2.8 numpy==1.26.4 pandas==2.0.3 jinja2==3.1.5 + # Newer runners have these deps preinstalled; only install on Ubuntu 22. + if [[ -f /etc/os-release ]] && . /etc/os-release && [[ "$VERSION_ID" == "22.04" ]]; then + pip install clickhouse-driver==0.2.8 numpy==1.26.4 pandas==2.0.3 jinja2==3.1.5 + fi CMD="python3 .github/actions/create_workflow_report/create_workflow_report.py" ARGS="--actions-run-url $ACTIONS_RUN_URL --known-fails --cves --pr-number $PR_NUMBER" diff --git a/.github/actions/create_workflow_report/create_workflow_report.py b/.github/actions/create_workflow_report/create_workflow_report.py index 5dd7c7bc664c..155434070b64 100755 --- a/.github/actions/create_workflow_report/create_workflow_report.py +++ b/.github/actions/create_workflow_report/create_workflow_report.py @@ -756,15 +756,15 @@ def get_new_fails_this_pr( def _workflow_config_s3_url(pr_number: int, commit_sha: str, ref_name: str) -> str: + # Uploads use a double slash before config_workflow in the S3 key. if pr_number == 0: - # REF uploads use a double slash before config_workflow in the S3 key. return ( f"https://{S3_BUCKET}.s3.amazonaws.com/REFs/{ref_name}/{commit_sha}/" "/config_workflow/workflow_config_masterci.json" ) return ( f"https://{S3_BUCKET}.s3.amazonaws.com/PRs/{pr_number}/{commit_sha}/" - "config_workflow/workflow_config_pr.json" + "/config_workflow/workflow_config_pr.json" ) diff --git a/.github/actions/create_workflow_report/workflow_report_hook.sh b/.github/actions/create_workflow_report/workflow_report_hook.sh index 06edf8867fb8..bbadfdf41f63 100755 --- a/.github/actions/create_workflow_report/workflow_report_hook.sh +++ b/.github/actions/create_workflow_report/workflow_report_hook.sh @@ -1,6 +1,9 @@ #!/bin/bash # This script is for generating preview reports when invoked as a post-hook from a praktika job -pip install clickhouse-driver==0.2.8 numpy==1.26.4 pandas==2.0.3 jinja2==3.1.5 +# Newer runners have these deps preinstalled; only install on Ubuntu 22. +if [[ -f /etc/os-release ]] && . /etc/os-release && [[ "$VERSION_ID" == "22.04" ]]; then + pip install clickhouse-driver==0.2.8 numpy==1.26.4 pandas==2.0.3 jinja2==3.1.5 +fi ARGS="--mark-preview --known-fails --cves --actions-run-url $GITHUB_SERVER_URL/$GITHUB_REPOSITORY/actions/runs/$GITHUB_RUN_ID --pr-number $PR_NUMBER" CMD="python3 .github/actions/create_workflow_report/create_workflow_report.py" $CMD $ARGS