微信小程序页面迁移校验之前 P5任务处理之前
This commit is contained in:
@@ -247,6 +247,7 @@ class FlowRunner:
|
||||
"""ETL 完成后运行数据一致性检查,输出黑盒测试报告。
|
||||
|
||||
返回报告文件路径,失败时返回 None(不阻断主流程)。
|
||||
CHANGE 2026-02-26 | 改用 FETCH_ROOT 读取实际抓取数据,替代 API_SAMPLE_CACHE_ROOT
|
||||
"""
|
||||
try:
|
||||
from quality.consistency_checker import (
|
||||
@@ -259,13 +260,19 @@ class FlowRunner:
|
||||
|
||||
timer.start_step("CONSISTENCY_CHECK")
|
||||
try:
|
||||
# 优先使用 FETCH_ROOT(ETL 实际抓取的分页 JSON)
|
||||
fetch_root_str = os.environ.get("FETCH_ROOT")
|
||||
fetch_root = Path(fetch_root_str) if fetch_root_str else None
|
||||
|
||||
# 兼容保留:api_sample_dir 作为回退
|
||||
api_sample_dir_str = os.environ.get("API_SAMPLE_CACHE_ROOT")
|
||||
api_sample_dir = Path(api_sample_dir_str) if api_sample_dir_str else None
|
||||
|
||||
report = run_consistency_check(
|
||||
self.db_conn,
|
||||
fetch_root=fetch_root,
|
||||
api_sample_dir=api_sample_dir,
|
||||
include_api_vs_ods=bool(api_sample_dir),
|
||||
include_api_vs_ods=bool(fetch_root or api_sample_dir),
|
||||
include_ods_vs_dwd=True,
|
||||
tz=self.tz,
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user