docs(ci): record runner cache cleanup rollout [skip ci]
This commit is contained in:
@@ -1,3 +1,82 @@
|
||||
## 2026-05-19|T81 Gitea CD tests runner cache cleanup hygiene
|
||||
|
||||
**背景**:
|
||||
|
||||
- T80 驗證 CD notification 已回到 AWOOI API 主路徑時,Gitea CD tests job 雖然 success,但結尾出現 act runner cleanup warning:
|
||||
- `unlinkat ... __pycache__ ... permission denied`
|
||||
- `Error occurred running finally`
|
||||
- 判讀:API tests 由 host runner 啟動 CI image,CI image 以 root 跑在 bind-mounted checkout 上,pytest 會在 repo 內留下 root-owned `__pycache__` / `.pytest_cache`,導致 act runner 後清理階段用非 root 身分刪不掉。
|
||||
|
||||
**完成變更**:
|
||||
|
||||
- `.gitea/workflows/cd.yaml` 的 API tests container 內新增 `cleanup_pytest_workspace_cache()`,在 `exit $PYTEST_EXIT` 前清掉 `apps/api/tests/**/__pycache__` 與 `.pytest_cache`。
|
||||
- B5 integration tests 追加:
|
||||
- 正確捕捉 pytest exit code。
|
||||
- 測試 DB 清理後清掉 integration `__pycache__`。
|
||||
- 以原 pytest exit code 結束,避免 integration test 失敗被後續 cleanup 吃掉。
|
||||
|
||||
**驗證**:
|
||||
|
||||
```text
|
||||
ruby -e 'require "yaml"; YAML.load_file(".gitea/workflows/cd.yaml"); puts "yaml ok"'
|
||||
-> yaml ok
|
||||
|
||||
git diff --check
|
||||
-> OK
|
||||
|
||||
Commit:
|
||||
947a84e6 fix(ci): clean root-owned pytest cache artifacts
|
||||
|
||||
Gitea Actions:
|
||||
2452 Code Review for 947a84e6 -> success
|
||||
2453 CD workflow_dispatch for 947a84e6 -> success
|
||||
tests -> success
|
||||
build-and-deploy -> success
|
||||
post-deploy-checks -> success
|
||||
|
||||
Tests job tail:
|
||||
-> B5 integration 5 passed
|
||||
-> Job succeeded
|
||||
-> no __pycache__ permission denied
|
||||
-> no tests-job finally cleanup error
|
||||
|
||||
Deploy marker:
|
||||
169e828e chore(cd): deploy 947a84e [skip ci]
|
||||
```
|
||||
|
||||
**Production smoke**:
|
||||
|
||||
```text
|
||||
K8s image:
|
||||
awoooi-api 192.168.0.110:5000/awoooi/api:947a84e6c1d25f005994d796072922d26db04a01
|
||||
awoooi-worker 192.168.0.110:5000/awoooi/api:947a84e6c1d25f005994d796072922d26db04a01
|
||||
awoooi-web 192.168.0.110:5000/awoooi/web:947a84e6c1d25f005994d796072922d26db04a01
|
||||
|
||||
GET https://awoooi.wooo.work/api/v1/health
|
||||
-> healthy, prod, mock_mode=false
|
||||
|
||||
GET /api/v1/platform/ai-route-status?workload_type=deep_rca
|
||||
-> selected_provider=ollama_gcp_a
|
||||
-> policy_order=ollama_gcp_a → ollama_gcp_b → ollama_local → gemini
|
||||
-> fallback_chain=ollama_gcp_b → ollama_local → gemini
|
||||
```
|
||||
|
||||
**剩餘技術債**:
|
||||
|
||||
- post-deploy job 仍有 act runner `errSymlink is not user-visible` cleanup panic,但 job conclusion 為 success。這與 root-owned pytest cache 是不同類型的 runner cleanup 問題,下一段可單獨處理。
|
||||
- Dockerfile 仍有既有 `LegacyKeyValueFormat` warning,屬低風險 build hygiene,未與本輪混改。
|
||||
|
||||
**目前整體進度**:
|
||||
|
||||
- AwoooP 告警可觀測鏈:約 96.5%。
|
||||
- 低風險自動修復閉環:約 95%。
|
||||
- 前端 AI 自動化管理介面同步:約 92.5%。
|
||||
- CI/CD notification AwoooP 主路徑:約 99%。
|
||||
- CI/CD runner hygiene:約 92%。
|
||||
- 完整 AI 自動化管理產品化:約 89.2%。
|
||||
|
||||
---
|
||||
|
||||
## 2026-05-19|T79/T80 AI Provider 路由前端可視化 + CI/CD 通知主路徑修復
|
||||
|
||||
**背景**:
|
||||
|
||||
Reference in New Issue
Block a user