install_threat_detect_binary.sh: fixed 10 s retry delay ends the download before a release-host 504 outage clears

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

维护者通常 1 天内回复

还没有人认领这个 Issue。

评估

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

调研方向

固定延迟的重试位于 actions/setup/sh/install_threat_detect_binary.sh 第 225 行附近(curl 使用 --retry 5 --retry-delay 10)。阅读同级脚本 actions/setup/sh/install_awf_binary.sh 的第 130-132 行,它已经使用指数退避和 --retry 8,然后比较两者。完成标准是:threat-detect 的下载重试时间足够长,能覆盖持续数分钟的 504 故障。验证方法是让脚本访问一个桩化的 URL,该 URL 在一段时间内返回 504。

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

描述

ai-inspected

The threat-detect installer stops after about 50 seconds of HTTP 504 from the GitHub release download host, so the detection job ends with detector_execution_failure. The evidence is from gh-aw v1.0.1 and v1.2.2, and the code is the same at main.

A scheduled workflow compiled with gh-aw v1.0.1 ended with detector_execution_failure on two days, 2026-11-08 and 2026-11-09. In both runs, the detection job did not run the detector.

The detection job log of the 2026-11-09 run shows the install step Install threat-detect binary (threat-detect v0.5.3):

07:38:44.6188063Z Downloading binary from "https://github.com/github/gh-aw-threat-detection/releases/download/v0.5.3/threat-detect-linux-amd64"...
07:38:52.3611133Z curl: (22) The requested URL returned error: 504
07:39:02.4143103Z curl: (22) The requested URL returned error: 504
07:39:12.4670635Z curl: (22) The requested URL returned error: 504
07:39:22.5203890Z curl: (22) The requested URL returned error: 504
07:39:32.5723943Z curl: (22) The requested URL returned error: 504
07:39:42.6244559Z curl: (22) The requested URL returned error: 504
07:39:42.6306004Z ##[error]Process completed with exit code 22.

The 2026-11-08 run shows the same 6 attempts from 09:41:05 to 09:41:55.

The installer downloads the binary with --retry 5 --retry-delay 10, in install_threat_detect_binary.sh#L225. A fixed delay gives 6 attempts in about 50 seconds. The --retry-max-time 180 value does not extend that window, because the retry count ends first.

In the same detection job, the AWF installer got 504 from the same host from 07:33:56 and completed its download at 07:38:33. That installer uses exponential backoff with --retry 8, in install_awf_binary.sh#L130-L132. The comment at line 130 says that exponential backoff spans longer gateway outages than six fixed-delay attempts.

主要语言
Go
星标
5.6k
派生
625
平均合并
5 小时 2 分钟
30 天内合并 PR
827

环境准备

在 Codespaces 中打开

在浏览器里用你自己的 GitHub 账号启动这个项目的开发容器。

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

从这里开始

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

github/gh-aw 的其他 Issue

查看 github/gh-aw 的全部 Issue

相似的 Issue

更多 Go Issue

把新 issue 发到你的邮箱

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