Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Scripts are still trying to fetch SHA1 online even if OFFLINE_WORK=yes is set #6439

Open
2 tasks done
ColorfulRhino opened this issue Mar 27, 2024 · 6 comments
Open
2 tasks done

Comments

@ColorfulRhino
Copy link
Collaborator

ColorfulRhino commented Mar 27, 2024

What happened?

At this moment of writing, the official kernel git is down or overloaded. In any case, it returns error 502. Trying to work around this by setting OFFLINE_WORK=yes does not work as expected however.
The script (namely lib/functions/general/git-ref2info.sh I believe) is still trying to fetch a git SHA1 online and will fail if it can't.

I suspect this can be solved with a simple if [ ! offline ] in lib/functions/general/git-ref2info.sh, but since this file specifically says This works under memoize-cached.sh::run_memoized() -- which is full of tricks., I decided better not to touch it myself.

Example log:

[...]
[🌿] *  [ You are working offline! ]
[🌿] *  [ Sources, time and host will not be checked ]
[...]
[✨] Repeat Build Options (early) [ ./compile.sh nanopi-r5c-edge kernel-config OFFLINE_WORK=yes ]
[🌱] Producing new & caching [ GIT_INFO_KERNEL ]
[🌱] Fetching SHA1 of 'branch' 'refs/heads/linux-6.8.y' [ https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git ]
fatal: unable to access 'https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/': The requested URL returned error: 502
[🌱] SHA1 of branch refs/heads/linux-6.8.y [ '' ]
[🌱] Failed to fetch SHA1 of 'branch' 'refs/heads/linux-6.8.y' [ https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git ]
[🌱] Fetching SHA1 of 'branch' 'linux-6.8.y' [ https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git ]
fatal: unable to access 'https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/': The requested URL returned error: 502
[🌱] SHA1 of branch linux-6.8.y [ '' ]
[🌱] Failed to fetch SHA1 of 'branch' 'linux-6.8.y' [ https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git ]
[💥] error! [ Failed to fetch SHA1 of 'https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git' 'branch' 'linux-6.8.y' - make sure it's correct  ]
[💥] Exiting with error 43 [ at /home/user/build-fork/lib/functions/logging/traps.sh:1
                exit_with_error() --> lib/functions/logging/traps.sh:1
       memoized_git_ref_to_info() --> lib/functions/general/git-ref2info.sh:75
                   run_memoized() --> lib/functions/general/memoize-cached.sh:69
[...]

How to reproduce?

Try to build with OFFLINE_WORK=yes while https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/ is not reachable.

Branch

main (main development branch)

On which host OS are you running the build script and observing this problem?

Ubuntu 24.04 Noble

Are you building on Windows WSL2?

  • Yes, my Ubuntu/Debian/OtherOS is running on WSL2

Relevant log URL

No response

Code of Conduct

  • I agree to follow this project's Code of Conduct
Copy link

Jira ticket: AR-2114

@igorpecovnik
Copy link
Member

Another workaround is USE_MAINLINE_GOOGLE_MIRROR="yes" but it doesn't work here https://armbian.atlassian.net/browse/AR-2113

@rpardini
Copy link
Member

Yeah, offline work was de-prioritized on the very last weeks of armbian-next. One might make it work

@ColorfulRhino
Copy link
Collaborator Author

Another workaround is USE_MAINLINE_GOOGLE_MIRROR="yes" but it doesn't work here https://armbian.atlassian.net/browse/AR-2113

Yes, this works locally as a workaround for this issue.

@igorpecovnik
Copy link
Member

I got feedback from kernel.org that we are not to blame on this outage.

@rpardini
Copy link
Member

rpardini commented Mar 29, 2024

I got feedback from kernel.org that we are not to blame on this outage.

Cool. We're pretty good citizens to git.kernel.org, using the full/shallow bundles stuff etc.

We're not as great citizens to github.com/u-boot/u-boot though -- that would benefit a lot from a git bundle, very similar to what we have for kernel.

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

No branches or pull requests

3 participants