From a17ee8181a19f2bf8c89a265e6c4d6d95886bfb3 Mon Sep 17 00:00:00 2001 From: Catherine Lee Date: Tue, 1 Apr 2025 17:13:58 +0000 Subject: [PATCH] [CI] Fix log artifact not containing test logs attempt 2 (#150234) Fixes #ISSUE_NUMBER Take two of https://github.com/pytorch/pytorch/pull/149577 since it didn't work Pull Request resolved: https://github.com/pytorch/pytorch/pull/150234 Approved by: https://github.com/malfet, https://github.com/seemethere --- .github/actions/upload-test-artifacts/action.yml | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/.github/actions/upload-test-artifacts/action.yml b/.github/actions/upload-test-artifacts/action.yml index 5effc5f3689..fe949516402 100644 --- a/.github/actions/upload-test-artifacts/action.yml +++ b/.github/actions/upload-test-artifacts/action.yml @@ -48,14 +48,8 @@ runs: run: | # Remove any previous usage logs if they exist rm -f logs-*.zip - # this workflow is also run in bazel build test, but we dont generate usage reports for it - # so check to see if the file exists first - if [ -f 'usage_log.txt' ]; then - zip "logs-${FILE_SUFFIX}.zip" 'usage_log.txt' - fi - if find "test/test-reports" -name "*.log" 2>/dev/null | stdbuf -o0 grep -q .; then - zip -r "logs-${FILE_SUFFIX}.zip" test/test-reports -i '*.log' - fi + zip "logs-${FILE_SUFFIX}.zip" 'usage_log.txt' || true + zip -r "logs-${FILE_SUFFIX}.zip" test/test-reports -i '*.log' || true - name: Zip debugging artifacts for upload if: runner.os != 'Windows' && !inputs.use-gha