Revert D30878101: [pytorch][PR] Fix test report uploading
authorEli Uriegas <eliuriegas@fb.com>
Mon, 13 Sep 2021 22:21:51 +0000 (15:21 -0700)
committerFacebook GitHub Bot <facebook-github-bot@users.noreply.github.com>
Mon, 13 Sep 2021 22:24:44 +0000 (15:24 -0700)
Test Plan: revert-hammer

Differential Revision:
D30878101 (https://github.com/pytorch/pytorch/commit/fba40bfc1ab45b4410504ec64b585c4df74b6f47)

Original commit changeset: 0730f17fa3f4

fbshipit-source-id: dad89e68b4daf656dd0b592bc9b2758f00af38c6

19 files changed:
.github/scripts/generate_ci_workflows.py
.github/templates/bazel_ci_workflow.yml.j2
.github/templates/common.yml.j2
.github/templates/linux_ci_workflow.yml.j2
.github/templates/windows_ci_workflow.yml.j2
.github/workflows/generated-linux-bionic-cuda10.2-py3.9-gcc7.yml
.github/workflows/generated-linux-bionic-py3.6-clang9.yml
.github/workflows/generated-linux-bionic-py3.8-gcc9-coverage.yml
.github/workflows/generated-linux-xenial-cuda10.2-py3.6-gcc7.yml
.github/workflows/generated-linux-xenial-cuda11.3-py3.6-gcc7.yml
.github/workflows/generated-linux-xenial-py3.6-gcc5.4.yml
.github/workflows/generated-linux-xenial-py3.6-gcc7-bazel-test.yml
.github/workflows/generated-parallelnative-linux-xenial-py3.6-gcc5.4.yml
.github/workflows/generated-paralleltbb-linux-xenial-py3.6-gcc5.4.yml
.github/workflows/generated-periodic-linux-xenial-cuda11.1-py3.6-gcc7.yml
.github/workflows/generated-periodic-win-vs2019-cuda11.1-py3.yml
.github/workflows/generated-win-vs2019-cpu-py3.yml
.github/workflows/generated-win-vs2019-cuda10.2-py3.yml
.github/workflows/generated-win-vs2019-cuda11.3-py3.yml

index 0b6a08f..5881151 100755 (executable)
@@ -7,7 +7,6 @@ from typing import Dict, Set
 import jinja2
 import json
 import os
-import sys
 from typing_extensions import Literal
 
 YamlShellBool = Literal["''", 1]
@@ -203,11 +202,7 @@ class CIWorkflow:
         with open(output_file_path, "w") as output_file:
             GENERATED = "generated"  # Note that please keep the variable GENERATED otherwise phabricator will hide the whole file
             output_file.writelines([f"# @{GENERATED} DO NOT EDIT MANUALLY\n"])
-            try:
-                content = workflow_template.render(asdict(self))
-            except Exception as e:
-                print(f"Failed on template: {workflow_template}", file=sys.stderr)
-                raise e
+            content = workflow_template.render(asdict(self))
             output_file.write(content)
             if content[-1] != "\n":
                 output_file.write("\n")
index 5cdf5da..20d33c3 100644 (file)
@@ -131,7 +131,24 @@ on:
         run: |
           # Ensure the working directory gets chowned back to the current user
           docker run --rm -v "$(pwd)":/v -w /v "${ALPINE_IMAGE}" chown -R "$(id -u):$(id -g)" .
-      !{{ common.upload_test_reports(name='bazel') }}
+      - name: Zip test reports for upload
+        if: always()
+        env:
+          COMMIT_SHA1: ${{ github.event.pull_request.head.sha || github.sha }}
+          WORKFLOW_ID: '${{ github.run_id }}_${{ github.run_number }}'
+        run: |
+          # Remove any previous test reports if they exist
+          rm -f test-reports-*.zip
+          zip -r "test-reports-${COMMIT_SHA1}-${WORKFLOW_ID}.zip" test -i '*.xml'
+      - uses: actions/upload-artifact@v2
+        name: Store PyTorch Test Reports
+        if: always()
+        with:
+          name: test-reports
+          retention-days: 14
+          if-no-files-found: error
+          path:
+            test-reports-*.zip
       !{{ common.upload_test_statistics(build_environment) }}
       !{{ common.teardown_ec2_linux() }}
 {%- endblock %}
index fa34cbb..9b5f51b 100644 (file)
@@ -109,47 +109,3 @@ concurrency:
           fetch-depth: 0
           submodules: !{{ submodules }}
 {%- endmacro -%}
-
-
-{%- macro upload_test_reports(name) -%}
-      - name: Zip test reports for upload
-        if: always()
-        env:
-{%- if name == 'linux' or name == 'windows' %}
-          FILE_SUFFIX: '${{ github.job }}-${{ matrix.config }}-${{ matrix.shard }}-${{ matrix.num_shards }}-${{ matrix.runner }}'
-{%- else %}
-          FILE_SUFFIX: '!{{ name }}-${{ github.job }}'
-{%- endif %}
-{%- if name == 'windows' %}
-        shell: powershell
-        run: |
-          # -ir => recursive include all files in pattern
-          7z a "test-reports-$Env:FILE_SUFFIX.zip" -ir'!test\*.xml'
-{%- else %}
-        run: |
-          # Remove any previous test reports if they exist
-          rm -f test-reports-*.zip
-          zip -r "test-reports-${FILE_SUFFIX}.zip" test -i '*.xml'
-{%- endif %}
-      - uses: actions/upload-artifact@v2
-        name: Store Test Reports
-        if: always()
-        with:
-{%- if name == 'linux' or name == 'windows' %}
-          name: test-reports-${{ matrix.config }}
-{%- else %}
-          name: test-reports-!{{ name }}
-{%- endif %}
-          retention-days: 14
-          if-no-files-found: error
-          path:
-            test-reports-*.zip
-      - uses: !{{ upload_artifact_s3_action }}
-        name: Store Test Reports on S3
-        if: always()
-        with:
-          retention-days: 14
-          if-no-files-found: error
-          path:
-            test-reports-*.zip
-{%- endmacro -%}
index 262de1c..d0ea3ff 100644 (file)
@@ -348,7 +348,33 @@ jobs:
           python3 -mpip install codecov==2.1.12
           python3 -mcodecov
       {%- endif %}
-      !{{ common.upload_test_reports(name='linux') }}
+      - name: Zip test reports for upload
+        if: always()
+        env:
+          COMMIT_SHA1: ${{ github.event.pull_request.head.sha || github.sha }}
+          WORKFLOW_ID: '${{ github.run_id }}_${{ github.run_number }}'
+        run: |
+          # Remove any previous test reports if they exist
+          rm -f test-reports-*.zip
+          zip -r "test-reports-${COMMIT_SHA1}-${WORKFLOW_ID}.zip" test -i '*.xml'
+      - uses: actions/upload-artifact@v2
+        name: Store PyTorch Test Reports
+        if: always()
+        with:
+          name: test-reports-${{ matrix.config }}
+          retention-days: 14
+          if-no-files-found: error
+          path:
+            test-reports-*.zip
+      - uses: !{{ common.upload_artifact_s3_action }}
+        name: Store PyTorch Test Reports on S3
+        if: always()
+        with:
+          name: test-reports-${{ matrix.config }}
+          retention-days: 14
+          if-no-files-found: error
+          path:
+            test-reports-*.zip
       !{{ common.parse_ref() }}
       !{{ common.upload_test_statistics(build_environment) }}
       !{{ common.teardown_ec2_linux() }}
index 37d219a..22913a3 100644 (file)
@@ -252,7 +252,24 @@ jobs:
               export RUN_SMOKE_TESTS_ONLY=1
             fi
             .jenkins/pytorch/win-test.sh
-      !{{ common.upload_test_reports(name='windows') }}
+      - name: Zip test reports for upload
+        if: always()
+        env:
+          COMMIT_SHA1: ${{ github.event.pull_request.head.sha || github.sha }}
+          WORKFLOW_ID: '${{ github.run_id }}_${{ github.run_number }}'
+        shell: powershell
+        run: |
+          # -ir => recursive include all files in pattern
+          7z a "test-reports-$Env:COMMIT_SHA1-$Env:WORKFLOW_ID.zip" -ir'!test\*.xml'
+      - uses: actions/upload-artifact@v2
+        name: Store PyTorch Test Reports
+        if: always()
+        with:
+          name: test-reports-${{ matrix.config }}
+          retention-days: 14
+          if-no-files-found: error
+          path:
+            pytorch-${{ github.run_id }}/test-reports-*.zip
       !{{ wait_and_kill_ssh() }}
       !{{ common.parse_ref() }}
       !{{ common.upload_test_statistics(build_environment) }}
index e025fd1..da9890c 100644 (file)
@@ -455,13 +455,14 @@ jobs:
       - name: Zip test reports for upload
         if: always()
         env:
-          FILE_SUFFIX: '${{ github.job }}-${{ matrix.config }}-${{ matrix.shard }}-${{ matrix.num_shards }}-${{ matrix.runner }}'
+          COMMIT_SHA1: ${{ github.event.pull_request.head.sha || github.sha }}
+          WORKFLOW_ID: '${{ github.run_id }}_${{ github.run_number }}'
         run: |
           # Remove any previous test reports if they exist
           rm -f test-reports-*.zip
-          zip -r "test-reports-${FILE_SUFFIX}.zip" test -i '*.xml'
+          zip -r "test-reports-${COMMIT_SHA1}-${WORKFLOW_ID}.zip" test -i '*.xml'
       - uses: actions/upload-artifact@v2
-        name: Store Test Reports
+        name: Store PyTorch Test Reports
         if: always()
         with:
           name: test-reports-${{ matrix.config }}
@@ -470,9 +471,10 @@ jobs:
           path:
             test-reports-*.zip
       - uses: seemethere/upload-artifact-s3@v3
-        name: Store Test Reports on S3
+        name: Store PyTorch Test Reports on S3
         if: always()
         with:
+          name: test-reports-${{ matrix.config }}
           retention-days: 14
           if-no-files-found: error
           path:
index fe04694..cbb41d4 100644 (file)
@@ -455,13 +455,14 @@ jobs:
       - name: Zip test reports for upload
         if: always()
         env:
-          FILE_SUFFIX: '${{ github.job }}-${{ matrix.config }}-${{ matrix.shard }}-${{ matrix.num_shards }}-${{ matrix.runner }}'
+          COMMIT_SHA1: ${{ github.event.pull_request.head.sha || github.sha }}
+          WORKFLOW_ID: '${{ github.run_id }}_${{ github.run_number }}'
         run: |
           # Remove any previous test reports if they exist
           rm -f test-reports-*.zip
-          zip -r "test-reports-${FILE_SUFFIX}.zip" test -i '*.xml'
+          zip -r "test-reports-${COMMIT_SHA1}-${WORKFLOW_ID}.zip" test -i '*.xml'
       - uses: actions/upload-artifact@v2
-        name: Store Test Reports
+        name: Store PyTorch Test Reports
         if: always()
         with:
           name: test-reports-${{ matrix.config }}
@@ -470,9 +471,10 @@ jobs:
           path:
             test-reports-*.zip
       - uses: seemethere/upload-artifact-s3@v3
-        name: Store Test Reports on S3
+        name: Store PyTorch Test Reports on S3
         if: always()
         with:
+          name: test-reports-${{ matrix.config }}
           retention-days: 14
           if-no-files-found: error
           path:
index 393843d..74e204d 100644 (file)
@@ -459,13 +459,14 @@ jobs:
       - name: Zip test reports for upload
         if: always()
         env:
-          FILE_SUFFIX: '${{ github.job }}-${{ matrix.config }}-${{ matrix.shard }}-${{ matrix.num_shards }}-${{ matrix.runner }}'
+          COMMIT_SHA1: ${{ github.event.pull_request.head.sha || github.sha }}
+          WORKFLOW_ID: '${{ github.run_id }}_${{ github.run_number }}'
         run: |
           # Remove any previous test reports if they exist
           rm -f test-reports-*.zip
-          zip -r "test-reports-${FILE_SUFFIX}.zip" test -i '*.xml'
+          zip -r "test-reports-${COMMIT_SHA1}-${WORKFLOW_ID}.zip" test -i '*.xml'
       - uses: actions/upload-artifact@v2
-        name: Store Test Reports
+        name: Store PyTorch Test Reports
         if: always()
         with:
           name: test-reports-${{ matrix.config }}
@@ -474,9 +475,10 @@ jobs:
           path:
             test-reports-*.zip
       - uses: seemethere/upload-artifact-s3@v3
-        name: Store Test Reports on S3
+        name: Store PyTorch Test Reports on S3
         if: always()
         with:
+          name: test-reports-${{ matrix.config }}
           retention-days: 14
           if-no-files-found: error
           path:
index 22a4ac9..68ed662 100644 (file)
@@ -455,13 +455,14 @@ jobs:
       - name: Zip test reports for upload
         if: always()
         env:
-          FILE_SUFFIX: '${{ github.job }}-${{ matrix.config }}-${{ matrix.shard }}-${{ matrix.num_shards }}-${{ matrix.runner }}'
+          COMMIT_SHA1: ${{ github.event.pull_request.head.sha || github.sha }}
+          WORKFLOW_ID: '${{ github.run_id }}_${{ github.run_number }}'
         run: |
           # Remove any previous test reports if they exist
           rm -f test-reports-*.zip
-          zip -r "test-reports-${FILE_SUFFIX}.zip" test -i '*.xml'
+          zip -r "test-reports-${COMMIT_SHA1}-${WORKFLOW_ID}.zip" test -i '*.xml'
       - uses: actions/upload-artifact@v2
-        name: Store Test Reports
+        name: Store PyTorch Test Reports
         if: always()
         with:
           name: test-reports-${{ matrix.config }}
@@ -470,9 +471,10 @@ jobs:
           path:
             test-reports-*.zip
       - uses: seemethere/upload-artifact-s3@v3
-        name: Store Test Reports on S3
+        name: Store PyTorch Test Reports on S3
         if: always()
         with:
+          name: test-reports-${{ matrix.config }}
           retention-days: 14
           if-no-files-found: error
           path:
index 43ac5fc..8b2927c 100644 (file)
@@ -455,13 +455,14 @@ jobs:
       - name: Zip test reports for upload
         if: always()
         env:
-          FILE_SUFFIX: '${{ github.job }}-${{ matrix.config }}-${{ matrix.shard }}-${{ matrix.num_shards }}-${{ matrix.runner }}'
+          COMMIT_SHA1: ${{ github.event.pull_request.head.sha || github.sha }}
+          WORKFLOW_ID: '${{ github.run_id }}_${{ github.run_number }}'
         run: |
           # Remove any previous test reports if they exist
           rm -f test-reports-*.zip
-          zip -r "test-reports-${FILE_SUFFIX}.zip" test -i '*.xml'
+          zip -r "test-reports-${COMMIT_SHA1}-${WORKFLOW_ID}.zip" test -i '*.xml'
       - uses: actions/upload-artifact@v2
-        name: Store Test Reports
+        name: Store PyTorch Test Reports
         if: always()
         with:
           name: test-reports-${{ matrix.config }}
@@ -470,9 +471,10 @@ jobs:
           path:
             test-reports-*.zip
       - uses: seemethere/upload-artifact-s3@v3
-        name: Store Test Reports on S3
+        name: Store PyTorch Test Reports on S3
         if: always()
         with:
+          name: test-reports-${{ matrix.config }}
           retention-days: 14
           if-no-files-found: error
           path:
index 87d82c2..41f54cd 100644 (file)
@@ -455,13 +455,14 @@ jobs:
       - name: Zip test reports for upload
         if: always()
         env:
-          FILE_SUFFIX: '${{ github.job }}-${{ matrix.config }}-${{ matrix.shard }}-${{ matrix.num_shards }}-${{ matrix.runner }}'
+          COMMIT_SHA1: ${{ github.event.pull_request.head.sha || github.sha }}
+          WORKFLOW_ID: '${{ github.run_id }}_${{ github.run_number }}'
         run: |
           # Remove any previous test reports if they exist
           rm -f test-reports-*.zip
-          zip -r "test-reports-${FILE_SUFFIX}.zip" test -i '*.xml'
+          zip -r "test-reports-${COMMIT_SHA1}-${WORKFLOW_ID}.zip" test -i '*.xml'
       - uses: actions/upload-artifact@v2
-        name: Store Test Reports
+        name: Store PyTorch Test Reports
         if: always()
         with:
           name: test-reports-${{ matrix.config }}
@@ -470,9 +471,10 @@ jobs:
           path:
             test-reports-*.zip
       - uses: seemethere/upload-artifact-s3@v3
-        name: Store Test Reports on S3
+        name: Store PyTorch Test Reports on S3
         if: always()
         with:
+          name: test-reports-${{ matrix.config }}
           retention-days: 14
           if-no-files-found: error
           path:
index 7a235db..6f2853d 100644 (file)
@@ -293,24 +293,17 @@ jobs:
       - name: Zip test reports for upload
         if: always()
         env:
-          FILE_SUFFIX: 'bazel-${{ github.job }}'
+          COMMIT_SHA1: ${{ github.event.pull_request.head.sha || github.sha }}
+          WORKFLOW_ID: '${{ github.run_id }}_${{ github.run_number }}'
         run: |
           # Remove any previous test reports if they exist
           rm -f test-reports-*.zip
-          zip -r "test-reports-${FILE_SUFFIX}.zip" test -i '*.xml'
+          zip -r "test-reports-${COMMIT_SHA1}-${WORKFLOW_ID}.zip" test -i '*.xml'
       - uses: actions/upload-artifact@v2
-        name: Store Test Reports
-        if: always()
-        with:
-          name: test-reports-bazel
-          retention-days: 14
-          if-no-files-found: error
-          path:
-            test-reports-*.zip
-      - uses: seemethere/upload-artifact-s3@v3
-        name: Store Test Reports on S3
+        name: Store PyTorch Test Reports
         if: always()
         with:
+          name: test-reports
           retention-days: 14
           if-no-files-found: error
           path:
index b6382a2..c27533c 100644 (file)
@@ -455,13 +455,14 @@ jobs:
       - name: Zip test reports for upload
         if: always()
         env:
-          FILE_SUFFIX: '${{ github.job }}-${{ matrix.config }}-${{ matrix.shard }}-${{ matrix.num_shards }}-${{ matrix.runner }}'
+          COMMIT_SHA1: ${{ github.event.pull_request.head.sha || github.sha }}
+          WORKFLOW_ID: '${{ github.run_id }}_${{ github.run_number }}'
         run: |
           # Remove any previous test reports if they exist
           rm -f test-reports-*.zip
-          zip -r "test-reports-${FILE_SUFFIX}.zip" test -i '*.xml'
+          zip -r "test-reports-${COMMIT_SHA1}-${WORKFLOW_ID}.zip" test -i '*.xml'
       - uses: actions/upload-artifact@v2
-        name: Store Test Reports
+        name: Store PyTorch Test Reports
         if: always()
         with:
           name: test-reports-${{ matrix.config }}
@@ -470,9 +471,10 @@ jobs:
           path:
             test-reports-*.zip
       - uses: seemethere/upload-artifact-s3@v3
-        name: Store Test Reports on S3
+        name: Store PyTorch Test Reports on S3
         if: always()
         with:
+          name: test-reports-${{ matrix.config }}
           retention-days: 14
           if-no-files-found: error
           path:
index ed6a7c8..f1077ae 100644 (file)
@@ -455,13 +455,14 @@ jobs:
       - name: Zip test reports for upload
         if: always()
         env:
-          FILE_SUFFIX: '${{ github.job }}-${{ matrix.config }}-${{ matrix.shard }}-${{ matrix.num_shards }}-${{ matrix.runner }}'
+          COMMIT_SHA1: ${{ github.event.pull_request.head.sha || github.sha }}
+          WORKFLOW_ID: '${{ github.run_id }}_${{ github.run_number }}'
         run: |
           # Remove any previous test reports if they exist
           rm -f test-reports-*.zip
-          zip -r "test-reports-${FILE_SUFFIX}.zip" test -i '*.xml'
+          zip -r "test-reports-${COMMIT_SHA1}-${WORKFLOW_ID}.zip" test -i '*.xml'
       - uses: actions/upload-artifact@v2
-        name: Store Test Reports
+        name: Store PyTorch Test Reports
         if: always()
         with:
           name: test-reports-${{ matrix.config }}
@@ -470,9 +471,10 @@ jobs:
           path:
             test-reports-*.zip
       - uses: seemethere/upload-artifact-s3@v3
-        name: Store Test Reports on S3
+        name: Store PyTorch Test Reports on S3
         if: always()
         with:
+          name: test-reports-${{ matrix.config }}
           retention-days: 14
           if-no-files-found: error
           path:
index 4fbd35d..6dbee1f 100644 (file)
@@ -453,13 +453,14 @@ jobs:
       - name: Zip test reports for upload
         if: always()
         env:
-          FILE_SUFFIX: '${{ github.job }}-${{ matrix.config }}-${{ matrix.shard }}-${{ matrix.num_shards }}-${{ matrix.runner }}'
+          COMMIT_SHA1: ${{ github.event.pull_request.head.sha || github.sha }}
+          WORKFLOW_ID: '${{ github.run_id }}_${{ github.run_number }}'
         run: |
           # Remove any previous test reports if they exist
           rm -f test-reports-*.zip
-          zip -r "test-reports-${FILE_SUFFIX}.zip" test -i '*.xml'
+          zip -r "test-reports-${COMMIT_SHA1}-${WORKFLOW_ID}.zip" test -i '*.xml'
       - uses: actions/upload-artifact@v2
-        name: Store Test Reports
+        name: Store PyTorch Test Reports
         if: always()
         with:
           name: test-reports-${{ matrix.config }}
@@ -468,9 +469,10 @@ jobs:
           path:
             test-reports-*.zip
       - uses: seemethere/upload-artifact-s3@v3
-        name: Store Test Reports on S3
+        name: Store PyTorch Test Reports on S3
         if: always()
         with:
+          name: test-reports-${{ matrix.config }}
           retention-days: 14
           if-no-files-found: error
           path:
index 146fcee..c071bc4 100644 (file)
@@ -242,28 +242,21 @@ jobs:
       - name: Zip test reports for upload
         if: always()
         env:
-          FILE_SUFFIX: '${{ github.job }}-${{ matrix.config }}-${{ matrix.shard }}-${{ matrix.num_shards }}-${{ matrix.runner }}'
+          COMMIT_SHA1: ${{ github.event.pull_request.head.sha || github.sha }}
+          WORKFLOW_ID: '${{ github.run_id }}_${{ github.run_number }}'
         shell: powershell
         run: |
           # -ir => recursive include all files in pattern
-          7z a "test-reports-$Env:FILE_SUFFIX.zip" -ir'!test\*.xml'
+          7z a "test-reports-$Env:COMMIT_SHA1-$Env:WORKFLOW_ID.zip" -ir'!test\*.xml'
       - uses: actions/upload-artifact@v2
-        name: Store Test Reports
+        name: Store PyTorch Test Reports
         if: always()
         with:
           name: test-reports-${{ matrix.config }}
           retention-days: 14
           if-no-files-found: error
           path:
-            test-reports-*.zip
-      - uses: seemethere/upload-artifact-s3@v3
-        name: Store Test Reports on S3
-        if: always()
-        with:
-          retention-days: 14
-          if-no-files-found: error
-          path:
-            test-reports-*.zip
+            pytorch-${{ github.run_id }}/test-reports-*.zip
       - name: Wait until all sessions have drained
         shell: powershell
         if: always()
index 9b1bbf6..d0eb3fd 100644 (file)
@@ -226,28 +226,21 @@ jobs:
       - name: Zip test reports for upload
         if: always()
         env:
-          FILE_SUFFIX: '${{ github.job }}-${{ matrix.config }}-${{ matrix.shard }}-${{ matrix.num_shards }}-${{ matrix.runner }}'
+          COMMIT_SHA1: ${{ github.event.pull_request.head.sha || github.sha }}
+          WORKFLOW_ID: '${{ github.run_id }}_${{ github.run_number }}'
         shell: powershell
         run: |
           # -ir => recursive include all files in pattern
-          7z a "test-reports-$Env:FILE_SUFFIX.zip" -ir'!test\*.xml'
+          7z a "test-reports-$Env:COMMIT_SHA1-$Env:WORKFLOW_ID.zip" -ir'!test\*.xml'
       - uses: actions/upload-artifact@v2
-        name: Store Test Reports
+        name: Store PyTorch Test Reports
         if: always()
         with:
           name: test-reports-${{ matrix.config }}
           retention-days: 14
           if-no-files-found: error
           path:
-            test-reports-*.zip
-      - uses: seemethere/upload-artifact-s3@v3
-        name: Store Test Reports on S3
-        if: always()
-        with:
-          retention-days: 14
-          if-no-files-found: error
-          path:
-            test-reports-*.zip
+            pytorch-${{ github.run_id }}/test-reports-*.zip
       - name: Wait until all sessions have drained
         shell: powershell
         if: always()
index 448f5d1..c6c752f 100644 (file)
@@ -244,28 +244,21 @@ jobs:
       - name: Zip test reports for upload
         if: always()
         env:
-          FILE_SUFFIX: '${{ github.job }}-${{ matrix.config }}-${{ matrix.shard }}-${{ matrix.num_shards }}-${{ matrix.runner }}'
+          COMMIT_SHA1: ${{ github.event.pull_request.head.sha || github.sha }}
+          WORKFLOW_ID: '${{ github.run_id }}_${{ github.run_number }}'
         shell: powershell
         run: |
           # -ir => recursive include all files in pattern
-          7z a "test-reports-$Env:FILE_SUFFIX.zip" -ir'!test\*.xml'
+          7z a "test-reports-$Env:COMMIT_SHA1-$Env:WORKFLOW_ID.zip" -ir'!test\*.xml'
       - uses: actions/upload-artifact@v2
-        name: Store Test Reports
+        name: Store PyTorch Test Reports
         if: always()
         with:
           name: test-reports-${{ matrix.config }}
           retention-days: 14
           if-no-files-found: error
           path:
-            test-reports-*.zip
-      - uses: seemethere/upload-artifact-s3@v3
-        name: Store Test Reports on S3
-        if: always()
-        with:
-          retention-days: 14
-          if-no-files-found: error
-          path:
-            test-reports-*.zip
+            pytorch-${{ github.run_id }}/test-reports-*.zip
       - name: Wait until all sessions have drained
         shell: powershell
         if: always()
index 7e0cd3e..67a4a2a 100644 (file)
@@ -244,28 +244,21 @@ jobs:
       - name: Zip test reports for upload
         if: always()
         env:
-          FILE_SUFFIX: '${{ github.job }}-${{ matrix.config }}-${{ matrix.shard }}-${{ matrix.num_shards }}-${{ matrix.runner }}'
+          COMMIT_SHA1: ${{ github.event.pull_request.head.sha || github.sha }}
+          WORKFLOW_ID: '${{ github.run_id }}_${{ github.run_number }}'
         shell: powershell
         run: |
           # -ir => recursive include all files in pattern
-          7z a "test-reports-$Env:FILE_SUFFIX.zip" -ir'!test\*.xml'
+          7z a "test-reports-$Env:COMMIT_SHA1-$Env:WORKFLOW_ID.zip" -ir'!test\*.xml'
       - uses: actions/upload-artifact@v2
-        name: Store Test Reports
+        name: Store PyTorch Test Reports
         if: always()
         with:
           name: test-reports-${{ matrix.config }}
           retention-days: 14
           if-no-files-found: error
           path:
-            test-reports-*.zip
-      - uses: seemethere/upload-artifact-s3@v3
-        name: Store Test Reports on S3
-        if: always()
-        with:
-          retention-days: 14
-          if-no-files-found: error
-          path:
-            test-reports-*.zip
+            pytorch-${{ github.run_id }}/test-reports-*.zip
       - name: Wait until all sessions have drained
         shell: powershell
         if: always()