diff --git a/.github/workflows/slack-report.yml b/.github/workflows/slack-report.yml index f9404b0876bbc7..d4926594bb45ee 100644 --- a/.github/workflows/slack-report.yml +++ b/.github/workflows/slack-report.yml @@ -56,10 +56,10 @@ jobs: pip show slack_sdk python utils/notification_service.py "${{ inputs.folder_slices }}" -# # Upload complete failure tables, as they might be big and only truncated versions could be sent to Slack. -# - name: Failure table artifacts -# if: ${{ always() }} -# uses: actions/upload-artifact@v3 -# with: -# name: prev_ci_results -# path: prev_ci_results + # Upload complete failure tables, as they might be big and only truncated versions could be sent to Slack. + - name: Failure table artifacts + if: ${{ inputs.job == 'run_tests_gpu' }} + uses: actions/upload-artifact@v3 + with: + name: prev_ci_results + path: prev_ci_results diff --git a/utils/notification_service.py b/utils/notification_service.py index e69abb33afab0a..da5e2fcc94750f 100644 --- a/utils/notification_service.py +++ b/utils/notification_service.py @@ -743,19 +743,20 @@ def post_reply(self): time.sleep(1) - blocks = self.get_new_model_failure_blocks() - if blocks: - print("Sending the following reply") - print(json.dumps({"blocks": blocks})) - - client.chat_postMessage( - channel=CI_SLACK_REPORT_CHANNEL_ID, - text="Results for new failures", - blocks=blocks, - thread_ts=self.thread_ts["ts"], - ) + if self.n_model_failures > 0: + blocks = self.get_new_model_failure_blocks() + if blocks: + print("Sending the following reply") + print(json.dumps({"blocks": blocks})) + + client.chat_postMessage( + channel=CI_SLACK_REPORT_CHANNEL_ID, + text="Results for new failures", + blocks=blocks, + thread_ts=self.thread_ts["ts"], + ) - time.sleep(1) + time.sleep(1) def retrieve_artifact(artifact_path: str, gpu: Optional[str]):