A failed results upload passes silently

未关闭 适合新手
#378 0 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

@ekamran 已经在做这个了。

开始于 2026年11月30日。

  • #379 来自 @ekamran —— 未关闭

评估

难度
2/5
预计耗时
1-3 小时
新手友好度
78/100
Issue 类型
缺陷
描述清晰度
描述清楚
活跃度
活跃
技术栈
github-actions, php
领域
backend, ci-cd

调研方向

阅读 .github/workflows/tests.yml、report.php 和 host-tools/testrunner.sh,然后检查上传失败处理和 workflow 的报告步骤。检查 upload_results() 如何报告 cURL 失败,以及 runner 如何在清理过程中保留失败状态。完成标准是上传失败会导致 workflow 失败,并且消息中包含具体的 cURL 错误。

由索引模型根据 Issue 内容生成。

描述

When the results upload fails, nothing tells the host clearly.

1. The workflow stays green. In .github/workflows/tests.yml, the report step has continue-on-error: true. report.php exits 1 when the upload fails, but the job still passes, so the host keeps running tests while nothing reaches the results page. This was raised on #339: https://github.com/WordPress/phpunit-test-runner/pull/339#issuecomment-5481141761

host-tools/testrunner.sh already handles this the right way: a failed report sets the exit status, and cleanup still runs.

2. The error does not say why. upload_results() never reads curl_error(), so every network failure prints the same line:

Error: Error uploading results (HTTP status 0)

Tested with master (087bb29), report.php with an API key and these report URLs:

Report URL Output
http://127.0.0.1:1/ (connection refused) Error uploading results (HTTP status 0)
https://no-such-host.invalid/ (DNS) Error uploading results (HTTP status 0)
https://expired.badssl.com/ Error uploading results (HTTP status 0)

Expected: a failed upload fails the workflow run, and the error says what went wrong.

Related: #316.

主要语言
PHP
星标
77
派生
83
平均合并
4 天 9 小时
30 天内合并 PR
2

环境准备

  • 提供 Dockerfile 或 Docker Compose 文件
  • 没有 Pull Request 模板
  • 没有贡献指南

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

WordPress/phpunit-test-runner 的其他 Issue

查看 WordPress/phpunit-test-runner 的全部 Issue

相似的 Issue

更多 PHP Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。