run-offload.sh: a commit that is not on main cannot be given by SHA ("not found on GitHub" for a pushed branch)
还没有人认领这个 Issue。
评估
调研方向
Start with the ref resolution and fetch case in tools/offload/remote-run.sh, especially lines 48–53. Reproduce the failure with a pushed commit on a non-main branch and a bare SHA, then check how branch refs and missing refs are reported. Done means the SHA resolves when reachable from a pushed branch, with a useful error when it cannot be fetched.
由索引模型根据 Issue 内容生成。
描述
tools/offload/remote-run.sh resolves the ref by fetching, then git rev-parse origin/$ref || git rev-parse $ref. The fetch case list (line 49-53) sends a bare hex SHA down the *) arm, which runs git fetch --depth 50 origin <sha>. GitHub refuses a fetch by object id (uploadpack.allowReachableSHA1InWant is off), so nothing is fetched and the rev-parse fails with
FAIL: ref e0e25622b not found on GitHub (push it first)
even though the commit is pushed and git ls-remote shows it as a branch tip.
It only works today for a SHA that happens to be reachable from main, because line 48 always fetches main; that is why a SHA on main looks fine and a SHA on a wip/* branch does not.
The message is the worst part: it tells you to do the one thing you have already done, so the natural response is to push again and re-queue, which fails the same way. Two queued jobs were lost to this today before the cause was found.
Suggested fix: when the ref is a bare SHA that rev-parse cannot resolve after the fetch, fetch the branches that contain it (or simply git fetch --depth 50 origin '+refs/heads/*:refs/remotes/origin/*' as a fallback) before failing; and make the failure say whether the ref was not found at all or found but not fetchable by id.
Workaround: pass the branch name (wip/rundir-default) instead of the SHA.
- 主要语言
- C
- 星标
- 10
- 派生
- 8
- 平均合并
- 6 小时 32 分钟
- 30 天内合并 PR
- 1
环境准备
这个项目没有提供开发容器、Dockerfile 或贡献指南,环境需要你自己搭建:先看它的 README,通用步骤见我们的新手贡献指南。
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
FriendsofECCE/ECCE 的其他 Issue
-
难度 2/5 1-3 小时 新手友好度 68/100
FriendsofECCE/ECCE#1358 ·
-
bug
难度 2/5 1-3 小时 新手友好度 72/100
FriendsofECCE/ECCE#1353 ·
-
难度 2/5 1-3 小时 新手友好度 78/100
FriendsofECCE/ECCE#1348 ·
-
难度 2/5 1-3 小时 新手友好度 76/100
FriendsofECCE/ECCE#1347 ·
-
bug
难度 2/5 1-3 小时 新手友好度 72/100
FriendsofECCE/ECCE#1345 ·
查看 FriendsofECCE/ECCE 的全部 Issue
相似的 Issue
-
难度 2/5 1-3 小时 新手友好度 78/100
vincentarelbundock/xtx#11 ·
-
难度 1/5 1-3 小时 新手友好度 88/100
-
难度 2/5 1-3 小时 新手友好度 70/100
compiler-explorer/compiler-explorer#9738 ·
维护者通常 2 天内回复
-
难度 1/5 1-3 小时 新手友好度 88/100
维护者通常 3 天内回复
-
[Android Auto] MU1017 (MHI2Q_JP_AUG22_P1017) cluster map works with a pinned profile — values inside未关闭
难度 1/5 1 小时以内 新手友好度 92/100
kamgurgul/mib2q-carplay#74 ·