Skip to content

get-linux-source: always do git fetch#178

Merged
theihor merged 1 commit intolibbpf:mainfrom
theihor:fetch-linux
Apr 8, 2025
Merged

get-linux-source: always do git fetch#178
theihor merged 1 commit intolibbpf:mainfrom
theihor:fetch-linux

Conversation

@theihor
Copy link
Contributor

@theihor theihor commented Apr 8, 2025

Recently proof-of-work proxy was rolled out for git.kernel.org, which prevents wget of the bpf-next snapshots.

This lead to failures of get-linux-source action:

Simplify the download script to always run git init + git fetch sequence.

[1] https://social.kernel.org/notice/AsgziNL6zgmdbta3lY

theihor added a commit to kernel-patches/vmtest that referenced this pull request Apr 8, 2025
Recently proof-of-work proxy was rolled out for git.kernel.org, which
prevents wget of the bpf-next snapshots.

This lead to failures of get-linux-source action:
* https://github.com/kernel-patches/vmtest/actions/runs/14313967784/job/40115985369
* https://github.com/libbpf/libbpf/actions/runs/14316467048/job/40123652831

Simplify the download script to always run git init + git fetch
sequence.

[1] https://social.kernel.org/notice/AsgziNL6zgmdbta3lY

Signed-off-by: Ihor Solodrai <ihor.solodrai@linux.dev>
@theihor theihor merged commit c422391 into libbpf:main Apr 8, 2025
16 checks passed
@theihor
Copy link
Contributor Author

theihor commented Apr 8, 2025

Tesed on kernel-patches/vmtest https://github.com/kernel-patches/vmtest/actions/runs/14322033825

@shunghsiyu
Copy link

shunghsiyu commented Apr 18, 2025

@theihor the root cause here actually seems to be the good manner of setting the user agent to BPFCIBot/1.0 (bpf@vger.kernel.org). If that was dropped wget actually downloads the file just fine.

I'm asking in the announcement whether there's a better approach.

@shunghsiyu
Copy link

shunghsiyu commented Apr 18, 2025

The suggestion is to use BPFCI/1.0 (bpf@vger.kernel.org) as the user agent instead. Testing that out locally it seems to work just fine.

@theihor
Copy link
Contributor Author

theihor commented Apr 22, 2025

@shunghsiyu Hi, thank you for the tip.
In practice downloading a snapshot vs fetching doesn't make much of a difference in terms of download time. So switching back to snapshots only makes sense if kernel.org collects statistics on external hits. Do you know if it does?

@anakryiko
Copy link
Member

@theihor Konstantin (kernel.org admin at that time) did have a preference for snapshot downloading, it's probably causing much less load on their servers. I forwarded you some emails we exchanged a while ago for some context. So yes, snapshots are preferred.

@theihor
Copy link
Contributor Author

theihor commented Apr 22, 2025

@theihor Konstantin (kernel.org admin at that time) did have a preference for snapshot downloading, it's probably causing much less load on their servers. I forwarded you some emails we exchanged a while ago for some context. So yes, snapshots are preferred.

Thanks, I wasn't aware. I find it strange to trigger proof-of-work challenge on "bot" string in the user-agent though.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants