fix(acceptance): 对齐负载报告第二版契约
生产验收统一校验并合并 acceptance-load-report/v2,避免成功负载因旧版 schemaVersion 断言被误判失败。\n\n已执行 bash -n、ShellCheck 和 production acceptance 脚本测试。
This commit is contained in:
@@ -2533,7 +2533,7 @@ REMOTE
|
||||
cluster_scp "$host:$remote_report" "$local_report" >/dev/null || return 1
|
||||
cluster_ssh "$host" "[[ ! -e '$remote_report' ]] || unlink '$remote_report'" >/dev/null || true
|
||||
jq -e --arg runId "$run_id" --arg profile "$profile" \
|
||||
'.schemaVersion == "acceptance-load-report/v1" and .runId == $runId and .profile == $profile and .secretSafe == true' \
|
||||
'.schemaVersion == "acceptance-load-report/v2" and .runId == $runId and .profile == $profile and .secretSafe == true' \
|
||||
"$local_report" >/dev/null || return 1
|
||||
return "$status"
|
||||
}
|
||||
@@ -2548,7 +2548,7 @@ merge_remote_load_reports() {
|
||||
def max_field($name): [.[].phases[0][$name] // 0] | max;
|
||||
. as $reports
|
||||
| {
|
||||
schemaVersion:"acceptance-load-report/v1",
|
||||
schemaVersion:"acceptance-load-report/v2",
|
||||
runId:$reports[0].runId,
|
||||
profile:$profile,
|
||||
startedAt:([$reports[].startedAt] | min),
|
||||
@@ -3601,7 +3601,7 @@ REMOTE
|
||||
cluster_ssh "$CLUSTER_NINGBO_HOST" "[[ ! -e '$remote_report' ]] || unlink '$remote_report'" >/dev/null || true
|
||||
chmod 0600 "$report_path"
|
||||
jq -e --arg runId "$run_id" --arg profile "$profile" \
|
||||
'.schemaVersion == "acceptance-load-report/v1" and .runId == $runId and .profile == $profile and .secretSafe == true' \
|
||||
'.schemaVersion == "acceptance-load-report/v2" and .runId == $runId and .profile == $profile and .secretSafe == true' \
|
||||
"$report_path" >/dev/null || return 1
|
||||
(( status == 0 )) && jq -e '.passed == true' "$report_path" >/dev/null
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user