feature: ci failure monitor slack bot (#15110)
Co-authored-by: Claude Sonnet 4.5 <noreply@anthropic.com>
This commit is contained in:
22
.github/workflows/ci-failure-monitor.yml
vendored
22
.github/workflows/ci-failure-monitor.yml
vendored
@@ -29,7 +29,7 @@ jobs:
|
||||
- name: Install dependencies
|
||||
run: |
|
||||
python -m pip install --upgrade pip
|
||||
pip install requests
|
||||
pip install requests slack_sdk
|
||||
|
||||
- name: Run Failure Analysis
|
||||
env:
|
||||
@@ -41,7 +41,6 @@ jobs:
|
||||
python ci_failures_analysis.py \
|
||||
--token $GITHUB_TOKEN \
|
||||
--limit 100 \
|
||||
--threshold 4 \
|
||||
--output ci_failure_analysis_$(date +%Y%m%d_%H%M%S).json
|
||||
|
||||
- name: Upload Analysis Results
|
||||
@@ -51,3 +50,22 @@ jobs:
|
||||
path: |
|
||||
scripts/ci_monitor/ci_failure_analysis_*.json
|
||||
retention-days: 7
|
||||
|
||||
- name: Send Slack Notification
|
||||
if: always()
|
||||
env:
|
||||
SGLANG_DIFFUSION_SLACK_TOKEN: ${{ secrets.SGLANG_DIFFUSION_SLACK_TOKEN }}
|
||||
run: |
|
||||
cd scripts/ci_monitor
|
||||
LATEST_REPORT=$(ls -t ci_failure_analysis_*.json | head -1)
|
||||
|
||||
if [ ! -f "$LATEST_REPORT" ]; then
|
||||
echo "No report found, so skipping Slack notification"
|
||||
exit 0
|
||||
fi
|
||||
|
||||
if [ -n "$SGLANG_DIFFUSION_SLACK_TOKEN" ]; then
|
||||
python3 post_ci_failures_to_slack.py --report-file "$LATEST_REPORT"
|
||||
else
|
||||
echo "SGLANG_DIFFUSION_SLACK_TOKEN not configured, skipping notification"
|
||||
fi
|
||||
|
||||
Reference in New Issue
Block a user