Compare commits

...

5 Commits

Author SHA1 Message Date
xiaoxia 1cd592c957 fix(main): add ci-canary.yml + disable pr-auto-scan schedule on main
Preview Deploy / Deploy Preview Environment (pull_request) Successful in 1m19s
PR Automation / Auto Approve on CI Green (pull_request) Successful in 2m46s
AI Code Review / AI Code Review (pull_request) Successful in 3m59s
ACR Cleanup / ACR Image Cleanup (pull_request_target) Successful in 6s
Preview Cleanup / Cleanup Preview Environment (pull_request) Successful in 20s
CI/CD Pipeline / Dedup Check - skip PR tests when covered by push pipeline (pull_request) Successful in 3s
CI/CD Pipeline / Check if frontend-only change (pull_request) Successful in 3s
CI/CD Pipeline / PR Build API Image (pull_request) Successful in 14s
CI/CD Pipeline / PR Build Worker Image (pull_request) Successful in 14s
CI/CD Pipeline / CI Gate (pull_request) Successful in 2s
CI/CD Pipeline / Production Browser E2E (pull_request) Failing after 316h23m16s
CI/CD Pipeline / Deploy Production (pull_request) Failing after 316h23m18s
CI/CD Pipeline / Build Production Web Image (pull_request) Failing after 316h23m20s
CI/CD Pipeline / Staging API Integration Tests (pull_request) Failing after 316h23m19s
CI/CD Pipeline / Retag skipped Staging Web Image (pull_request) Failing after 316h23m21s
CI/CD Pipeline / Build Production API Image (pull_request) Failing after 316h23m20s
CI/CD Pipeline / Frontend Unit Tests (pull_request) Failing after 316h23m22s
CI/CD Pipeline / Deploy Staging (Watchtower auto-deploy) (pull_request) Failing after 316h23m20s
CI/CD Pipeline / Frontend Lint (pull_request) Failing after 316h23m22s
CI/CD Pipeline / Unit Tests (pull_request) Failing after 316h23m22s
CI/CD Pipeline / Validate - Python (mypy + alembic) (pull_request) Failing after 316h23m22s
CI/CD Pipeline / Validate - Style (pull_request) Failing after 316h23m23s
CI/CD Pipeline / Check push changed paths (pull_request) Failing after 316h23m25s
CI/CD Pipeline / Build Staging Web Image (pull_request) Failing after 316h23m23s
PR Automation / Auto Merge on CI Green + Approved (pull_request) Failing after 316h37m29s
CI/CD Pipeline / Canary Release to Production (pull_request) Failing after 316h57m39s
CI/CD Pipeline / Staging E2E Tests (pull_request) Failing after 316h57m40s
CI/CD Pipeline / Retag skipped Staging Worker Image (pull_request) Failing after 316h57m42s
CI/CD Pipeline / PR Build Web Image (pull_request) Failing after 316h57m43s
CI/CD Pipeline / Integration Tests (pull_request) Failing after 316h57m43s
CI/CD Pipeline / Validate - Security (pull_request) Failing after 316h57m43s
CI/CD Pipeline / Build Staging API Image (pull_request) Failing after 316h57m44s
CI/CD Pipeline / ACR Image Cleanup (pull_request) Failing after 316h57m40s
CI/CD Pipeline / Build Production Worker Image (pull_request) Failing after 316h57m40s
CI/CD Pipeline / Retag skipped Staging API Image (pull_request) Failing after 316h57m43s
CI/CD Pipeline / Build Staging Worker Image (pull_request) Failing after 316h57m44s
- Copy ci-canary.yml from develop (PR #1636) to enable 30-min health checks on main
- Disable pr-auto-scan.yml schedule on main (was still running */15, causing failure spam)
- Relates: PR #1635 (develop already had schedule disabled)
2026-09-03 10:47:01 +08:00
xiaoxia 278208d31a Merge pull request 'fix(ci): 修复 tag 触发时 production deploy 被 skipped 的问题' (#1625) from fix/ci-production-deploy-skip into main
CI/CD Pipeline / Staging API Integration Tests (push) Failing after 338h43m4s
CI/CD Pipeline / Frontend Lint (push) Failing after 338h45m41s
CI/CD Pipeline / Build Production API Image (push) Successful in 2m10s
CI/CD Pipeline / Build Production Web Image (push) Successful in 1m42s
CI/CD Pipeline / Build Production Worker Image (push) Successful in 1m53s
CI/CD Pipeline / Deploy Production (push) Failing after 4m17s
CI/CD Pipeline / Retag skipped Staging Worker Image (push) Failing after 338h43m51s
CI/CD Pipeline / Deploy Staging (Watchtower auto-deploy) (push) Failing after 338h8m49s
CI/CD Pipeline / Dedup Check - skip PR tests when covered by push pipeline (push) Successful in 0s
CI/CD Pipeline / Validate - Style (push) Successful in 7m3s
CI/CD Pipeline / Validate - Security (push) Successful in 10m31s
CI/CD Pipeline / Validate - Python (mypy + alembic) (push) Successful in 6m36s
CI/CD Pipeline / Unit Tests (push) Successful in 19m38s
CI/CD Pipeline / Integration Tests (push) Successful in 6m26s
CI/CD Pipeline / Frontend Unit Tests (push) Successful in 11m51s
CI/CD Pipeline / Build Staging Worker Image (push) Failing after 338h45m21s
CI/CD Pipeline / PR Build Worker Image (push) Failing after 338h45m27s
CI/CD Pipeline / Build Staging Web Image (push) Failing after 338h11m4s
CI/CD Pipeline / PR Build Web Image (push) Failing after 338h11m10s
CI/CD Pipeline / PR Build API Image (push) Failing after 338h11m12s
CI/CD Pipeline / CI Gate (push) Failing after 337h54m20s
CI/CD Pipeline / ACR Image Cleanup (push) Failing after 338h8m42s
CI/CD Pipeline / Staging E2E Tests (push) Failing after 338h8m46s
CI/CD Pipeline / Retag skipped Staging Web Image (push) Failing after 338h9m34s
CI/CD Pipeline / Retag skipped Staging API Image (push) Failing after 338h9m36s
CI/CD Pipeline / Build Staging API Image (push) Failing after 338h11m6s
CI/CD Pipeline / Check push changed paths (push) Failing after 338h14m42s
CI/CD Pipeline / Canary Release to Production (push) Failing after 337h52m9s
CI/CD Pipeline / Production Browser E2E (push) Failing after 337h47m51s
CI/CD Pipeline / Check if frontend-only change (push) Failing after 338h14m42s
2026-09-02 13:09:23 +08:00
xiaoxia 0c636fd913 chore: trigger CI retry
CI/CD Pipeline / Dedup Check - skip PR tests when covered by push pipeline (pull_request) Successful in 1s
CI/CD Pipeline / Check if frontend-only change (pull_request) Successful in 1s
CI/CD Pipeline / PR Build Worker Image (pull_request) Successful in 3m30s
CI/CD Pipeline / Validate - Style (pull_request) Successful in 3m37s
CI/CD Pipeline / PR Build API Image (pull_request) Successful in 4m4s
AI Code Review / AI Code Review (pull_request) Successful in 4m44s
CI/CD Pipeline / Validate - Python (mypy + alembic) (pull_request) Successful in 5m19s
CI/CD Pipeline / Integration Tests (pull_request) Successful in 5m29s
Preview Deploy / Deploy Preview Environment (pull_request) Successful in 5m56s
PR Automation / Auto Approve on CI Green (pull_request) Successful in 6m27s
CI/CD Pipeline / Validate - Security (pull_request) Successful in 7m46s
CI/CD Pipeline / Unit Tests (pull_request) Successful in 12m54s
CI/CD Pipeline / CI Gate (pull_request) Successful in 1s
Preview Cleanup / Cleanup Preview Environment (pull_request) Successful in 3m29s
ACR Cleanup / ACR Image Cleanup (pull_request_target) Successful in 4m22s
CI/CD Pipeline / Production Browser E2E (pull_request) Failing after 338h16m0s
CI/CD Pipeline / Deploy Production (pull_request) Failing after 338h16m0s
CI/CD Pipeline / Build Production Worker Image (pull_request) Failing after 338h16m1s
CI/CD Pipeline / Build Production Web Image (pull_request) Failing after 338h16m1s
CI/CD Pipeline / Staging API Integration Tests (pull_request) Failing after 338h28m50s
CI/CD Pipeline / Build Production API Image (pull_request) Failing after 338h16m1s
CI/CD Pipeline / Staging E2E Tests (pull_request) Failing after 338h28m50s
CI/CD Pipeline / Retag skipped Staging Worker Image (pull_request) Failing after 338h28m54s
CI/CD Pipeline / Retag skipped Staging API Image (pull_request) Failing after 338h28m54s
CI/CD Pipeline / Retag skipped Staging Web Image (pull_request) Failing after 338h28m54s
CI/CD Pipeline / PR Build Web Image (pull_request) Failing after 338h28m56s
CI/CD Pipeline / Frontend Unit Tests (pull_request) Failing after 338h28m56s
CI/CD Pipeline / Build Staging Worker Image (pull_request) Failing after 338h28m58s
CI/CD Pipeline / Build Staging Web Image (pull_request) Failing after 338h28m58s
PR Automation / Auto Merge on CI Green + Approved (pull_request) Failing after 338h28m58s
CI/CD Pipeline / Build Staging API Image (pull_request) Failing after 338h28m58s
CI/CD Pipeline / Check push changed paths (pull_request) Failing after 338h28m59s
CI/CD Pipeline / Canary Release to Production (pull_request) Failing after 338h50m19s
CI/CD Pipeline / ACR Image Cleanup (pull_request) Failing after 339h3m9s
CI/CD Pipeline / Deploy Staging (Watchtower auto-deploy) (pull_request) Failing after 339h3m11s
CI/CD Pipeline / Frontend Lint (pull_request) Failing after 339h3m15s
2026-09-02 12:56:08 +08:00
xiaoxia 692d0b3c7e fix(ci): 修复 tag 触发时 production deploy 被 skipped 的问题
CI/CD Pipeline / Check if frontend-only change (pull_request) Successful in 1s
CI/CD Pipeline / Dedup Check - skip PR tests when covered by push pipeline (pull_request) Successful in 1s
CI/CD Pipeline / Validate - Python (mypy + alembic) (pull_request) Failing after 1s
CI/CD Pipeline / PR Build API Image (pull_request) Successful in 3m14s
CI/CD Pipeline / PR Build Worker Image (pull_request) Successful in 4m0s
Preview Deploy / Deploy Preview Environment (pull_request) Successful in 5m43s
CI/CD Pipeline / Integration Tests (pull_request) Successful in 5m44s
CI/CD Pipeline / Validate - Style (pull_request) Successful in 5m46s
PR Automation / Auto Approve on CI Green (pull_request) Successful in 6m22s
CI/CD Pipeline / Validate - Security (pull_request) Successful in 7m54s
AI Code Review / AI Code Review (pull_request) Successful in 8m59s
CI/CD Pipeline / Unit Tests (pull_request) Successful in 13m0s
CI/CD Pipeline / CI Gate (pull_request) Failing after 1s
CI/CD Pipeline / Production Browser E2E (pull_request) Failing after 338h34m23s
CI/CD Pipeline / Deploy Production (pull_request) Failing after 338h34m24s
CI/CD Pipeline / Build Production Worker Image (pull_request) Failing after 338h34m25s
CI/CD Pipeline / Build Production API Image (pull_request) Failing after 338h34m25s
CI/CD Pipeline / ACR Image Cleanup (pull_request) Failing after 338h47m18s
CI/CD Pipeline / Staging E2E Tests (pull_request) Failing after 338h47m19s
CI/CD Pipeline / Deploy Staging (Watchtower auto-deploy) (pull_request) Failing after 338h47m20s
CI/CD Pipeline / Retag skipped Staging Web Image (pull_request) Failing after 338h47m22s
CI/CD Pipeline / Retag skipped Staging API Image (pull_request) Failing after 338h47m22s
CI/CD Pipeline / Build Staging Web Image (pull_request) Failing after 338h47m24s
CI/CD Pipeline / Build Staging API Image (pull_request) Failing after 338h47m25s
CI/CD Pipeline / Frontend Unit Tests (pull_request) Failing after 338h47m26s
CI/CD Pipeline / Frontend Lint (pull_request) Failing after 338h47m26s
PR Automation / Auto Merge on CI Green + Approved (pull_request) Failing after 338h47m28s
CI/CD Pipeline / Check push changed paths (pull_request) Failing after 338h47m29s
CI/CD Pipeline / Canary Release to Production (pull_request) Failing after 339h8m43s
CI/CD Pipeline / Build Production Web Image (pull_request) Failing after 339h8m44s
CI/CD Pipeline / Staging API Integration Tests (pull_request) Failing after 339h21m37s
CI/CD Pipeline / Retag skipped Staging Worker Image (pull_request) Failing after 339h21m41s
CI/CD Pipeline / Build Staging Worker Image (pull_request) Failing after 339h21m43s
CI/CD Pipeline / PR Build Web Image (pull_request) Failing after 339h21m45s
- 从 build-production needs 移除 frontend-lint(tag事件时被skipped)
- if 条件加 !failure() && !cancelled() 确保 skipped 依赖不阻塞生产部署
2026-09-02 12:37:25 +08:00
xiaoxia d00a37fc31 Merge pull request 'fix: 删除 main 上残留的重复 migration 034' (#1624) from fix/remove-duplicate-034-migration into main
CI/CD Pipeline / Retag skipped Staging API Image (push) Failing after 339h19m57s
CI/CD Pipeline / Deploy Staging (Watchtower auto-deploy) (push) Successful in 4m38s
CI/CD Pipeline / Dedup Check - skip PR tests when covered by push pipeline (push) Successful in 1s
CI/CD Pipeline / Validate - Style (push) Successful in 4m38s
CI/CD Pipeline / Validate - Security (push) Successful in 12m55s
CI/CD Pipeline / Validate - Python (mypy + alembic) (push) Successful in 7m22s
CI/CD Pipeline / Unit Tests (push) Successful in 21m31s
CI/CD Pipeline / Check push changed paths (push) Successful in 1m45s
CI/CD Pipeline / Integration Tests (push) Successful in 6m33s
CI/CD Pipeline / Frontend Unit Tests (push) Successful in 16m58s
CI/CD Pipeline / PR Build Web Image (push) Failing after 340h29m59s
CI/CD Pipeline / Build Staging API Image (push) Successful in 23m9s
CI/CD Pipeline / Build Staging Web Image (push) Successful in 1m12s
CI/CD Pipeline / Build Staging Worker Image (push) Successful in 29m8s
CI/CD Pipeline / PR Build API Image (push) Failing after 339h55m40s
CI/CD Pipeline / Staging E2E Tests (push) Failing after 1m36s
CI/CD Pipeline / Staging API Integration Tests (push) Failing after 1m19s
CI/CD Pipeline / Build Production Web Image (push) Failing after 340h8m26s
CI/CD Pipeline / Deploy Production (push) Failing after 339h34m4s
CI/CD Pipeline / Build Production Worker Image (push) Failing after 339h34m6s
CI/CD Pipeline / Build Production API Image (push) Failing after 339h34m7s
CI/CD Pipeline / ACR Image Cleanup (push) Successful in 2m56s
CI/CD Pipeline / CI Gate (push) Failing after 339h34m6s
CI/CD Pipeline / Retag skipped Staging Worker Image (push) Failing after 339h19m57s
CI/CD Pipeline / Retag skipped Staging Web Image (push) Failing after 339h19m57s
CI/CD Pipeline / Canary Release to Production (push) Failing after 339h13m56s
CI/CD Pipeline / Production Browser E2E (push) Failing after 339h34m4s
CI/CD Pipeline / PR Build Worker Image (push) Failing after 339h55m40s
CI/CD Pipeline / Frontend Lint (push) Failing after 339h55m40s
CI/CD Pipeline / Check if frontend-only change (push) Failing after 339h55m42s
2026-09-02 11:29:24 +08:00
3 changed files with 55 additions and 3 deletions
+51
View File
@@ -0,0 +1,51 @@
name: CI Canary Check
on:
schedule:
- cron: '*/30 * * * *'
workflow_dispatch:
jobs:
canary:
runs-on: ci-l2
timeout-minutes: 10
steps:
- name: Canary (runner -> docker -> network -> gitea)
run: |
set -e
echo "== runner/container basic =="
date; hostname; whoami
echo "== gitea api reachability =="
code=$(curl -s -o /tmp/v.json -w '%{http_code}' -m 15 "$GITHUB_API_URL/version")
echo "gitea api http_code=$code"
[ "$code" = "200" ] || { echo "::error::Gitea API unreachable, http_code=$code"; exit 1; }
cat /tmp/v.json; echo
echo "== external egress =="
ext=$(curl -s -o /dev/null -w '%{http_code}' -m 15 https://www.baidu.com || echo 000)
echo "external http_code=$ext"
echo "== gitea domain resolves NOT to loopback =="
set -o pipefail
ip=$(getent hosts git.xiaoxiajianji.com | awk '{print $1}' | head -1)
echo "git.xiaoxiajianji.com -> $ip"
if [ -z "$ip" ]; then
echo "::error::DNS resolution failed, git.xiaoxiajianji.com unresolvable"; exit 1
fi
if [ "$ip" = "127.0.0.1" ] || [ "$ip" = "::1" ]; then
echo "::error::Gitea domain resolves to loopback inside job container (hosts/DNS leak)"; exit 1
fi
echo "CANARY OK"
- name: Notify failure
if: failure()
env:
CI_NOTIFY_WEBHOOK: ${{ secrets.CI_NOTIFY_WEBHOOK }}
run: |
set +e
if [ -n "$CI_NOTIFY_WEBHOOK" ]; then
MSG="🚨 CI 金丝雀失败:runner->docker->网络->Gitea 链路异常,时间 $(date '+%Y-%m-%d %H:%M:%S'),请立即检查构建服务器"
python3 - "$CI_NOTIFY_WEBHOOK" "$MSG" <<'PY'
import json,sys,urllib.request
hook,msg=sys.argv[1],sys.argv[2]
data=json.dumps({"msg_type":"text","content":{"text":msg}}).encode()
urllib.request.urlopen(urllib.request.Request(hook,data=data,headers={"Content-Type":"application/json"}),timeout=10)
PY
fi
exit 0
+3 -2
View File
@@ -1412,9 +1412,9 @@ jobs:
- validate-security
- validate-python
- unit-tests
- frontend-lint
- frontend-unit-test
if: startsWith(github.ref, 'refs/tags/v') || (github.event_name == 'push' && github.ref_name == 'main')
if: |
(startsWith(github.ref, 'refs/tags/v') || (github.event_name == 'push' && github.ref_name == 'main')) && !failure() && !cancelled()
strategy:
fail-fast: false
matrix:
@@ -2068,3 +2068,4 @@ jobs:
START_TIME=""
[ -f /tmp/ci_job_start_time ] && START_TIME=$(cat /tmp/ci_job_start_time)
curl -sfH "Authorization: token ${GITHUB_TOKEN:-$GITEA_TOKEN}" -o /tmp/_ci_trace.py "${GITHUB_API_URL}/repos/${GITHUB_REPOSITORY}/raw/scripts/ci/ci_trace_report.py?ref=${GITHUB_SHA}" 2>/dev/null && python3 /tmp/_ci_trace.py --service xiaoxia-saas-ci --status $STATUS --start-time "$START_TIME" || true
# CI retry trigger
+1 -1
View File
@@ -3,7 +3,7 @@ name: PR Auto Scan
# 作为短作业模式的兜底,防止事件驱动遗漏
on:
schedule:
- cron: "*/15 * * * *" # 每10分钟扫描一次(脚本自带240s墙钟上限,降频减负)
# - cron: "*/15 * * * *" # DISABLED: was causing failure spam on main (2026-09-03) # 每10分钟扫描一次(脚本自带240s墙钟上限,降频减负)
workflow_dispatch:
permissions: