我正在探索Dependabot是如何工作的,而它并不像我所期望的那样起作用。
我创建了两个私有 Golang repos (one,two),根据two使用one
one's go.mod
module github.com/dazwilkin/one
go 1.17
require github.com/dazwilkin/two v0.0.0-20210927170438-e7aa41e4107b备注
e7aa41e4107b是一种预先提交,目的是检查VS代码和Dependabot的更新检查。
和dependabot.yml
version: 2
updates:
- package-ecosystem: "gomod"
directory: "/"
schedule:
interval: "daily"two最近的2次提交如下:
curl \
--silent \
--header "Authorization: Bearer ${TOKEN}" \
https://api.github.com/repos/${OWNER}/${REPO}/commits \
| jq -r '.[]|{"sha":.sha,"date":.commit.committer.date}'和:
{
"sha": "b2f2074829aa61218d7e38f27bb6051ccd97ab7a",
"date": "2021-09-27T18:03:33Z"
}
{
"sha": "e7aa41e4107b8c28f99cadfe55b831380730e808",
"date": "2021-09-27T17:04:38Z"
}注意:
注意到,
b2f2074829aa是我希望被告知的提交,而e7aa41e4107b是one继续引用的two上的先前提交。
VS Code迅速确定可以使用更新,并且:
go list -m -u all
github.com/dazwilkin/one
github.com/dazwilkin/two v0.0.0-20210927170438-e7aa41e4107b [v0.0.0-20210927180333-b2f2074829aa]备注正确标识最新提交(
b2f2074829aa)以替换先前提交(e7aa41e4107b)
但是,经过22个小时和多次强制更新之后,dependabot继续报告e7aa41e4107b是当前的:
updater | INFO <job_214390230> Starting job processing
updater | INFO <job_214390230> Starting update job for DazWilkin/one
updater | INFO <job_214390230> Checking if github.com/dazwilkin/two 0.0.0-20210927170438-e7aa41e4107b needs updating
updater | INFO <job_214390230> Latest version is 0.0.0-20210927170438-e7aa41e4107b
updater | INFO <job_214390230> No update needed for github.com/dazwilkin/two 0.0.0-20210927170438-e7aa41e4107b
updater | INFO <job_214390230> Finished job processing注意到, Dependabot在访问
github.com/dazwilkin/two时似乎没有问题,但它找不到最近的提交。
这只是一个最终的一致性问题,我需要更长时间的等待吗?
Update我又等了24小时了,它继续找到早期提交作为
latest version
还是我误解或错误配置了德潘达博特?
一个可能相关的问题是,我的GitHub帐户是混合大小写的DazWilkin,但为了简单起见,我使用全小写(github.com/dazwilkin)发布和引用Golang。但是,Dependabot似乎没有发现先前提交的问题。
发布于 2022-02-10 17:55:10
我相信这是因为依赖者不支持假想-- https://github.com/dependabot/dependabot-core/issues/3017
https://stackoverflow.com/questions/69365074
复制相似问题