Summary:
Upon noticing that we had a job entry named "None" in our S3 stats, I set out to find which test reporting had a JOB_BASE_NAME that wasn't set.
It turns out all non Windows and Linux workflows did not have JOB_BASE_NAME but instead used CIRCLE_JOB. This remedies the current issue by explicitly setting JOB_BASE_NAME in Mac workflows, but doesn't touch anything else as those other jobs (like android) do not report test stats.
This also adds back the CIRCLE_JOB dependency in print_test_stats to be backwards compatible, but the goal is to move off of CIRCLE_JOB dependency to a more CI-platform-agnostic naming of variables.
Pull Request resolved: https://github.com/pytorch/pytorch/pull/62892
Test Plan:
Imported from GitHub, without a `Test Plan:` line.
{
F639556801}
None is now the macos!
Reviewed By: walterddr
Differential Revision:
D30160234
Pulled By: janeyx99
fbshipit-source-id:
df868dec5f9b289d3837e927d2bb95acb2d9185b
set -e
export IN_CI=1
export CROSS_COMPILE_ARM64=1
+ export JOB_BASE_NAME=$CIRCLE_JOB
# Install sccache
sudo curl --retry 3 https://s3.amazonaws.com/ossci-macos/sccache_v2.15 --output /usr/local/bin/sccache
command: |
set -e
export IN_CI=1
+ export JOB_BASE_NAME=$CIRCLE_JOB
# Install sccache
sudo curl --retry 3 https://s3.amazonaws.com/ossci-macos/sccache_v2.15 --output /usr/local/bin/sccache
command: |
set -e
export IN_CI=1
+ export JOB_BASE_NAME=$CIRCLE_JOB
chmod a+x .jenkins/pytorch/macos-test.sh
unbuffer .jenkins/pytorch/macos-test.sh 2>&1 | ts
source /Users/distiller/workspace/miniconda3/bin/activate
pip install boto3
+ export IN_CI=1
+ export JOB_BASE_NAME=$CIRCLE_JOB
+
# Using the same IAM user to write stats to our OSS bucket
export AWS_ACCESS_KEY_ID=${CIRCLECI_AWS_ACCESS_KEY_FOR_SCCACHE_S3_BUCKET_V4}
export AWS_SECRET_ACCESS_KEY=${CIRCLECI_AWS_SECRET_KEY_FOR_SCCACHE_S3_BUCKET_V4}
set -e
export IN_CI=1
export BUILD_LITE_INTERPRETER=1
+ export JOB_BASE_NAME=$CIRCLE_JOB
chmod a+x ${HOME}/project/.jenkins/pytorch/macos-lite-interpreter-build-test.sh
unbuffer ${HOME}/project/.jenkins/pytorch/macos-lite-interpreter-build-test.sh 2>&1 | ts
- store_test_results:
set -e
export IN_CI=1
export CROSS_COMPILE_ARM64=1
+ export JOB_BASE_NAME=$CIRCLE_JOB
# Install sccache
sudo curl --retry 3 https://s3.amazonaws.com/ossci-macos/sccache_v2.15 --output /usr/local/bin/sccache
command: |
set -e
export IN_CI=1
+ export JOB_BASE_NAME=$CIRCLE_JOB
# Install sccache
sudo curl --retry 3 https://s3.amazonaws.com/ossci-macos/sccache_v2.15 --output /usr/local/bin/sccache
command: |
set -e
export IN_CI=1
+ export JOB_BASE_NAME=$CIRCLE_JOB
chmod a+x .jenkins/pytorch/macos-test.sh
unbuffer .jenkins/pytorch/macos-test.sh 2>&1 | ts
source /Users/distiller/workspace/miniconda3/bin/activate
pip install boto3
+ export IN_CI=1
+ export JOB_BASE_NAME=$CIRCLE_JOB
+
# Using the same IAM user to write stats to our OSS bucket
export AWS_ACCESS_KEY_ID=${CIRCLECI_AWS_ACCESS_KEY_FOR_SCCACHE_S3_BUCKET_V4}
export AWS_SECRET_ACCESS_KEY=${CIRCLECI_AWS_SECRET_KEY_FOR_SCCACHE_S3_BUCKET_V4}
set -e
export IN_CI=1
export BUILD_LITE_INTERPRETER=1
+ export JOB_BASE_NAME=$CIRCLE_JOB
chmod a+x ${HOME}/project/.jenkins/pytorch/macos-lite-interpreter-build-test.sh
unbuffer ${HOME}/project/.jenkins/pytorch/macos-lite-interpreter-build-test.sh 2>&1 | ts
- store_test_results:
def send_report_to_s3(head_report: Version2Report) -> None:
- job = os.environ.get('JOB_BASE_NAME')
+ job = os.getenv('JOB_BASE_NAME', os.environ.get('CIRCLE_JOB'))
sha1 = os.environ.get('CIRCLE_SHA1')
branch = os.environ.get('CIRCLE_BRANCH', '')
now = datetime.datetime.utcnow().isoformat()