mirror of
https://github.com/ZhuLinsen/daily_stock_analysis
synced 2026-09-20 10:53:33 +08:00
ci(#2131): close PR #2140 review blocker OR-COM-cc22d635 + OR-COM-c76d8eff — docker-publish.yml 对齐 backend-gate 依赖安装
按 reviewer 在 head `e01a1835` 上的 OpenReview Bot 复核反馈,关闭以下 2 个 高置信度 compatibility blocker: - OR-COM-cc22d635: Docker Release Publish workflow 的 Install backend gate dependencies 仍按旧依赖集合执行 ./scripts/ci_gate.sh,新加的 pytest-timeout 没覆盖到发布入口 - OR-COM-c76d8eff: 与 OR-COM-cc22d635 同源,cache-dependency-path 也 缺失 .github/requirements-ci.txt ## 改了什么 .github/workflows/docker-publish.yml: - setup-python cache-dependency-path 对齐 ci.yml backend-gate: 加入 requirements.txt + .github/requirements-ci.txt 两个文件 作为 pip cache key,命中缓存 - Install backend gate dependencies 改用与 ci.yml 完全相同的 pattern:retry loop (3 attempts, 15s backoff) + 单一 pip install -r .github/requirements-ci.txt(该文件已 -r 递归拉 requirements.txt,所以无需重复 pip install -r requirements.txt) - 加注释说明 issue #2131 引入 pytest-timeout 的关联 docs/CHANGELOG.md: - [Unreleased] #2131 entry 末尾补一句:同步修正 docker-publish.yml 的 install 与 cache-dependency-path 对齐 ## 为什么这么改 issue #2131 让 scripts/ci_gate.sh 的 offline_test_suite 用 `--timeout=120 -o timeout_method=thread -o faulthandler_timeout=300`, 这要求 pytest-timeout>=2.3.0 插件。 ci.yml 的 backend-gate 已通过 .github/requirements-ci.txt 安装该 插件,但 docker-publish.yml 仍用旧的 `pip install flake8 pytest`, 没有 pytest-timeout,发布前 gate 跑 ./scripts/ci_gate.sh 会直接 报 unrecognized --timeout=120 fail,阻断镜像发布。 reviewer OR-COM-cc22d635 / OR-COM-c76d8eff 都指这是 PR 引入的 compatibility regression(不是已有旧债),需要 PR 同步修。 ci.yml 的 install pattern 是 retry 3 次带 backoff,对齐到 docker-publish 让两个工作流完全统一,未来新加 CI-only 依赖只需改 .github/requirements-ci.txt。 ## 验证情况 已本地验证: - python -c "import yaml; yaml.safe_load(open('.github/workflows/ docker-publish.yml'))" — YAML 语法 OK - 对比 ci.yml 的 backend-gate install 步骤,pattern 完全一致 已 CI 验证(待 push 后跑): - 本 PR 触发 backend-gate / docker-build / ai-governance / Change Detection,但 docker-publish.yml 只在 v*.*.* tag 或 workflow_dispatch 触发,本 PR CI 不会真跑该 workflow。reviewer 复核时会做静态比对 未验证 / 风险点: - 真实发布流程跑不通:需要 maintainer 推 v*.*.* tag 或手动 workflow_dispatch 触发,才能验证发布前 gate 真的工作 - 但 install pattern 与 ci.yml 完全对齐,ci.yml 那边过则该边也 应该过;问题概率很低 ## 风险点与回滚 回滚: 1. revert 本 commit 2. docker-publish.yml install step 改回 pip install -r requirements.txt + pip install flake8 pytest 3. cache-dependency-path 删除新增两行 4. CHANGELOG.md entry 末尾去掉补充句 潜在风险: - .github/requirements-ci.txt 递归 -r requirements.txt,release runner 之前装过 requirements.txt;retry loop + cache 应该吸收掉 任何 pip 网络抖动,但首次 release 可能比之前略慢(多一次冗余 install)。Trade-off 可接受:与 ci.yml 完全统一比省一次冗余 install 更重要。
This commit is contained in:
20
.github/workflows/docker-publish.yml
vendored
20
.github/workflows/docker-publish.yml
vendored
@@ -59,12 +59,28 @@ jobs:
|
||||
with:
|
||||
python-version: '3.11'
|
||||
cache: 'pip'
|
||||
cache-dependency-path: |
|
||||
requirements.txt
|
||||
.github/requirements-ci.txt
|
||||
|
||||
- name: Install backend gate dependencies
|
||||
run: |
|
||||
pip install --upgrade pip
|
||||
pip install -r requirements.txt
|
||||
pip install flake8 pytest
|
||||
# 使用与 backend-gate (ci.yml) 一致的依赖安装方式:
|
||||
# `.github/requirements-ci.txt` 递归拉 `requirements.txt` + 加
|
||||
# pytest-timeout 等 CI-only 依赖(issue #2131 让 ci_gate.sh 用了
|
||||
# `--timeout=120`,发布前 gate 也需要该插件)。
|
||||
for attempt in 1 2 3; do
|
||||
if pip install -r .github/requirements-ci.txt; then
|
||||
break
|
||||
fi
|
||||
if [ "$attempt" -eq 3 ]; then
|
||||
echo "Dependency install failed after ${attempt} attempts." >&2
|
||||
exit 1
|
||||
fi
|
||||
echo "Dependency install attempt ${attempt} failed, retrying in 15s..." >&2
|
||||
sleep 15
|
||||
done
|
||||
|
||||
- name: Run backend gate before publish
|
||||
run: ./scripts/ci_gate.sh
|
||||
|
||||
@@ -8,7 +8,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/).
|
||||
> For user-friendly release highlights, see the [GitHub Releases](https://github.com/ZhuLinsen/daily_stock_analysis/releases) page.
|
||||
|
||||
## [Unreleased]
|
||||
- [修复] `scripts/ci_gate.sh` 的 `offline_test_suite` 给 `pytest -m "not network"` 加 `--timeout=120 -o timeout_method=thread` 与 `-o faulthandler_timeout=300`:单个测试超过 2 分钟直接 fail,整体超过 5 分钟无输出时 dump 全部线程栈到 stderr。配合 `.github/requirements-ci.txt` 新增 `pytest-timeout>=2.3.0` 依赖。issue #2131 报告过 backend-gate 在 AlphaSift hotspot 用例附近间歇性无 traceback 卡住直到被 GitHub Actions 取消,此次修复让任何未来 CI hang 都会留下可定位的失败信息或 post-mortem 栈,而不是静默消亡。
|
||||
- [修复] `scripts/ci_gate.sh` 的 `offline_test_suite` 给 `pytest -m "not network"` 加 `--timeout=120 -o timeout_method=thread` 与 `-o faulthandler_timeout=300`:单个测试超过 2 分钟直接 fail,整体超过 5 分钟无输出时 dump 全部线程栈到 stderr。配合 `.github/requirements-ci.txt` 新增 `pytest-timeout>=2.3.0` 依赖。issue #2131 报告过 backend-gate 在 AlphaSift hotspot 用例附近间歇性无 traceback 卡住直到被 GitHub Actions 取消,此次修复让任何未来 CI hang 都会留下可定位的失败信息或 post-mortem 栈,而不是静默消亡。同步修正 `.github/workflows/docker-publish.yml` 的 `Install backend gate dependencies` 与 `setup-python cache-dependency-path` 对齐 `ci.yml` 的 backend-gate 依赖安装方式,避免发布流程跑同一个 `./scripts/ci_gate.sh` 时因缺少 `pytest-timeout` 而直接 fail。
|
||||
- [新功能] SkillAggregator 基于独立满足 30 条 evaluated 门槛的真实 Skill Outcome bucket,使用 Beta 先验收缩、unable 惩罚和多周期证据加权生成有界运行时权重;缺失、低样本或异常统计保持中性。
|
||||
- [改进] 将参考 AlphaSift 实现的选股核心与策略正式纳入 DSA,统一使用 `ScreeningService`、`SCREENING_ENABLED` 和 `/api/v1/screening`,并保留 Apache-2.0 归因与来源版本记录。
|
||||
- [新功能] 内建选股结果按 `run_id` 持久化到 DSA 数据库,新增运行历史和数据源历史 API,接入 DSA 公告事件上下文及其搜索缓存,并支持将候选连同筛选策略映射的 skill 交给 DSA 单股深度分析。
|
||||
|
||||
Reference in New Issue
Block a user