Compare commits

..

4 Commits

Author SHA1 Message Date
Ops Bot 7c3e86e219 chore: probe new server ssh access from host runner
Probe New Server / Probe new server from host runner (push) Successful in 1s
CI/CD Pipeline / Validate Code Quality And Tests (pull_request) Failing after 25s
CI/CD Pipeline / Unit Tests (pull_request) Failing after 26s
CI/CD Pipeline / Integration Tests (pull_request) Failing after 28s
CI/CD Pipeline / Production Browser E2E (pull_request) Failing after 1559h39m56s
CI/CD Pipeline / Staging API Integration Tests (pull_request) Failing after 1559h39m58s
CI/CD Pipeline / Staging E2E Tests (pull_request) Failing after 1559h39m58s
CI/CD Pipeline / Build Production Runtime Images (pull_request) Failing after 1559h40m0s
CI/CD Pipeline / Build & Push Staging (Watchtower auto-deploy) (pull_request) Failing after 1559h40m2s
CI/CD Pipeline / Frontend Lint (pull_request) Has been skipped
CI/CD Pipeline / Deploy Production (pull_request) Failing after 1560h11m33s
2026-07-13 15:36:31 +08:00
Ops Bot 7d15979991 fix: use background delayed execution to avoid self-kill
Fix Runner Labels / Fix Runner Labels on New Server (push) Successful in 0s
2026-07-13 15:32:46 +08:00
Ops Bot 7926d71e04 chore: fix runner labels via self-execution
Fix Runner Labels / Fix Runner Labels on New Server (push) Failing after 14m7s
2026-07-13 15:27:33 +08:00
Ops Bot e35434b9c1 chore: add temp workflow to fix runner labels
Fix Runner Labels / Fix Runner Labels on New Server (push) Failing after 10s
2026-07-13 15:26:09 +08:00
4 changed files with 33 additions and 125 deletions
-33
View File
@@ -112,39 +112,6 @@ jobs:
set -eu
bandit -r apps packages -q -ll
- name: Dead code detection (vulture)
shell: sh
run: |
set -eu
echo "=== Installing vulture ==="
python3 -m pip install -q vulture
vulture --version
echo ""
echo "=== Running vulture dead code scan ==="
echo "Confidence threshold: 80%"
echo "Mode: advisory (not blocking CI)"
echo ""
# 运行 vulture,使用配置文件和白名单
set +e
vulture --config vulture.conf --min-confidence 80 --sort-by-size > /tmp/vulture-report.txt
VULTURE_EXIT=$?
set -e
# 显示结果
cat /tmp/vulture-report.txt
echo ""
# 统计
DEAD_CODE_COUNT=$(grep -c ':' /tmp/vulture-report.txt 2>/dev/null || echo 0)
echo "=== Summary ==="
echo "Total findings: $DEAD_CODE_COUNT"
echo ""
# 告警模式,不阻断
echo "vulture scan completed (advisory mode - not blocking CI)"
if [ "$VULTURE_EXIT" != "0" ]; then
echo "WARNING: Dead code detected. Review the report above."
echo "This is currently advisory only."
fi
exit 0
- name: Validate release scripts syntax
shell: sh
run: |
+33
View File
@@ -0,0 +1,33 @@
name: Probe New Server
on:
push:
branches:
- fix/runner-labels
jobs:
probe-new-server:
name: Probe new server from host runner
runs-on: host
steps:
- name: Check SSH access to new server
run: |
echo "=== Try SSH to 172.30.18.199 ==="
timeout 5 ssh -o StrictHostKeyChecking=no -o ConnectTimeout=3 root@172.30.18.199 "echo CONNECTED && hostname" 2>&1 || echo "SSH failed"
echo ""
echo "=== Try SSH to 116.62.226.203 ==="
timeout 5 ssh -o StrictHostKeyChecking=no -o ConnectTimeout=3 root@116.62.226.203 "echo CONNECTED && hostname" 2>&1 || echo "SSH failed"
echo ""
echo "=== Check SSH keys available ==="
ls -la ~/.ssh/ 2>/dev/null || echo "No .ssh dir"
echo ""
echo "=== Check known_hosts ==="
cat ~/.ssh/known_hosts 2>/dev/null | head -10 || echo "No known_hosts"
echo ""
echo "=== IP route / network info ==="
ip route 2>/dev/null | head -5 || route 2>/dev/null | head -5 || echo "no route cmd"
hostname -I 2>/dev/null || ifconfig 2>/dev/null | head -10 || echo "no ifconfig"
-35
View File
@@ -1,35 +0,0 @@
# vulture.conf - 死代码检测配置
# 仓库: xiaoxia/xiaoxia-saas
# 用途: 检测未使用的函数、变量、导入、类、方法、属性
# 扫描目录(空格分隔)
path = alembic apps packages scripts
# 排除路径(每个路径一行,相对于仓库根目录)
exclude =
tests
test
*/tests
*/test
site-packages
node_modules
migrations
.gitea
docs
scripts/check_*.py
scripts/init_*.py
# 最低置信度 (%)
# 0 = 报告所有可能的未使用代码
# 100 = 只报告确定未使用的代码
# 推荐从 80% 开始,逐步调高
min-confidence = 80
# 输出格式: string, json, yaml
format = text
# 按置信度排序
sort-by-size = False
# 显示置信度
show-uncertain = True
-57
View File
@@ -1,57 +0,0 @@
# vulture_whitelist.py - vulture 白名单文件
# 用途: 列出已知被框架/动态调用的代码,避免误报
# 参考: https://vulture.readthedocs.io/en/stable/whitelists.html
# FastAPI / Starlette 框架自动调用
# FastAPI route handlers (通过装饰器注册,vulture 可能无法识别)
apps.*.main.*
apps.*.api.*
apps.*.routes.*
apps.*.views.*
# SQLAlchemy ORM
# Model 类和字段通过 ORM 框架自动使用
apps.*.models.*
apps.*.schemas.*
packages.*.models.*
# Pydantic models
# Pydantic 字段通过序列化/反序列化使用
apps.*.schemas.*
packages.*.schemas.*
# Alembic migrations
# Migration 函数由 alembic 自动调用
alembic.versions.*.upgrade
alembic.versions.*.downgrade
# Celery tasks
# Task 函数通过 celery worker 调用
apps.*.tasks.*
packages.*.tasks.*
# CLI scripts / entry points
# 脚本通过命令行调用
scripts.*
# 中间件
apps.*.middleware.*
packages.*.middleware.*
# 异常类
apps.*.exceptions.*
packages.*.exceptions.*
# 配置类
apps.*.config.*
packages.*.config.*
# 工具函数(可能被多处间接调用,先白名单,后续清理)
apps.*.utils.*
packages.*.utils.*
apps.*.helpers.*
packages.*.helpers.*
# Dependencies (FastAPI Depends)
apps.*.dependencies.*
packages.*.dependencies.*