Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
80 changes: 40 additions & 40 deletions .github/workflows/integration_tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -642,46 +642,46 @@ jobs:
continue-on-error: true # if this fails, we still need to run clean-up steps
run: poetry run python -m gen3_ci.scripts.generate_slack_report

- name: Publish report to Slack
id: slack_notify
if: ${{ env.SKIP_TESTS != 'true' && inputs.EXTERNAL_TO_CTDS != 'true' && steps.generate_slack_report.outcome == 'success' }}
continue-on-error: true # if this fails, we still need to run clean-up steps
uses: slackapi/slack-github-action@v2.0.0
with:
method: chat.postMessage
token: ${{ secrets.CI_SLACK_BOT_TOKEN }}
payload-file-path: "./${{ inputs.WORKING_DIR }}/slack_report.json"
payload-templated: true

- name: Analyze Failures using AI agent
id: analyze_failures_using_ai_agent
if: ${{ env.SKIP_TESTS != 'true' && inputs.EXTERNAL_TO_CTDS != 'true' && (steps.prep_ci_env.outcome == 'failure' || ((steps.run_service_tests.outcome == 'failure' || steps.run_tests.outcome == 'failure') && steps.rerun_failed_tests.outcome != 'success')) }}
continue-on-error: true # if this fails, we still need to run clean-up steps
run: |
echo -e "\n\n****** Running Analyze Failures using AI agent ******" >> logs/gh_action_logs.txt
poetry run python -m gen3_ci.scripts.analyze_failed_tests_using_ai_agent >> logs/gh_action_logs.txt 2>&1
if [[ "$IS_NIGHTLY_RUN" == "true" ]]; then
DATE=$(date +%Y%m%d)
aws s3 cp logs/failure_analysis.txt s3://ci-allure-reports/nightly-run-$CI_ENV/$DATE/$RUN_NUM/$ATTEMPT_NUM/failure_analysis.txt >> logs/gh_action_logs.txt 2>&1
else
aws s3 cp logs/failure_analysis.txt s3://ci-allure-reports/$REPO/$PR_NUM/$RUN_NUM/$ATTEMPT_NUM/failure_analysis.txt >> logs/gh_action_logs.txt 2>&1
fi
if [ $? -ne 0 ]; then
echo "PR_ERROR_MSG=Failed to run analyze failures using ai agent step" >> $GITHUB_ENV
fi
env:
THREAD_TS: ${{ steps.slack_notify.outputs.ts }}

- name: Publish test analysis on same slack thread
id: publish_test_analysis
if: ${{ env.SKIP_TESTS != 'true' && inputs.EXTERNAL_TO_CTDS != 'true' && steps.analyze_failures_using_ai_agent.outcome == 'success' }}
continue-on-error: true # if this fails, we still need to run clean-up steps
uses: slackapi/slack-github-action@v2.0.0
with:
method: chat.postMessage
token: ${{ secrets.CI_SLACK_BOT_TOKEN }}
payload-file-path: "./${{ inputs.WORKING_DIR }}/test_analysis_slack_report.json"
payload-templated: true
# - name: Publish report to Slack
# id: slack_notify
# if: ${{ env.SKIP_TESTS != 'true' && inputs.EXTERNAL_TO_CTDS != 'true' && steps.generate_slack_report.outcome == 'success' }}
# continue-on-error: true # if this fails, we still need to run clean-up steps
# uses: slackapi/slack-github-action@v2.0.0
# with:
# method: chat.postMessage
# token: ${{ secrets.CI_SLACK_BOT_TOKEN }}
# payload-file-path: "./${{ inputs.WORKING_DIR }}/slack_report.json"
# payload-templated: true

# - name: Analyze Failures using AI agent
# id: analyze_failures_using_ai_agent
# if: ${{ env.SKIP_TESTS != 'true' && inputs.EXTERNAL_TO_CTDS != 'true' && (steps.prep_ci_env.outcome == 'failure' || ((steps.run_service_tests.outcome == 'failure' || steps.run_tests.outcome == 'failure') && steps.rerun_failed_tests.outcome != 'success')) }}
# continue-on-error: true # if this fails, we still need to run clean-up steps
# run: |
# echo -e "\n\n****** Running Analyze Failures using AI agent ******" >> logs/gh_action_logs.txt
# poetry run python -m gen3_ci.scripts.analyze_failed_tests_using_ai_agent >> logs/gh_action_logs.txt 2>&1
# if [[ "$IS_NIGHTLY_RUN" == "true" ]]; then
# DATE=$(date +%Y%m%d)
# aws s3 cp logs/failure_analysis.txt s3://ci-allure-reports/nightly-run-$CI_ENV/$DATE/$RUN_NUM/$ATTEMPT_NUM/failure_analysis.txt >> logs/gh_action_logs.txt 2>&1
# else
# aws s3 cp logs/failure_analysis.txt s3://ci-allure-reports/$REPO/$PR_NUM/$RUN_NUM/$ATTEMPT_NUM/failure_analysis.txt >> logs/gh_action_logs.txt 2>&1
# fi
# if [ $? -ne 0 ]; then
# echo "PR_ERROR_MSG=Failed to run analyze failures using ai agent step" >> $GITHUB_ENV
# fi
# env:
# THREAD_TS: ${{ steps.slack_notify.outputs.ts }}

# - name: Publish test analysis on same slack thread
# id: publish_test_analysis
# if: ${{ env.SKIP_TESTS != 'true' && inputs.EXTERNAL_TO_CTDS != 'true' && steps.analyze_failures_using_ai_agent.outcome == 'success' }}
# continue-on-error: true # if this fails, we still need to run clean-up steps
# uses: slackapi/slack-github-action@v2.0.0
# with:
# method: chat.postMessage
# token: ${{ secrets.CI_SLACK_BOT_TOKEN }}
# payload-file-path: "./${{ inputs.WORKING_DIR }}/test_analysis_slack_report.json"
# payload-templated: true

- name: Mark workflow as failed for unsuccessful test runs
if: ${{ env.SKIP_TESTS != 'true' && steps.run_service_tests.outcome != 'success' && steps.run_tests.outcome != 'success' && steps.rerun_failed_tests.outcome != 'success' }}
Expand Down