Freeze source does not work when USE_MAINLINE_GOOGLE_MIRROR="yes" is used
Description
Environment
Checklist
hideActivity

Igor Pecovnik May 21, 2024 at 6:16 PM
I merged it as we need this functionality for this release … even implementation was clearly not brainstormed enough. It good that bug was found and recorded.

Gunjan Gupta May 21, 2024 at 5:15 PMEdited
Probably one way to handle it will be to create a parser that will extract project path assuming that's common across mirror. For example if https://github.com/armbian/build is the url, project path will be armbian/build. Then instead of storing url, we can store path and do lookup using path + branch combo.

Gunjan Gupta May 21, 2024 at 5:05 PMEdited
The only issue here I see is that the code doesn’t handle mirrors. As the lookup is performed with url + branch combo, using mirror changes the url. That results in not finding the required information. If you see the logs, this is pretty much obvious as it never printed a statement like Found cached git version
When I posted that code, the PR was a RFC, proposing an Idea and seeking guidance on how that can be made better. It was never supposed to be merged like that. Sadly no one gave any ideas on making it better. I was not sure how to make it safe for multiprocessing environment. I used flock there which is clearly not designing for this usecase and was only used because it was already installed. But no one seemed to have noticed that either.
If I get enough time and willingness, I will fix it. But meanwhile, I don’t think this should be assigned to me.
Commits IDs on both systems are correct / identical.
Second problem, perhaps related. Reading from JSON is not placed on correct place as it seeks wrong artefact. It should seek for 6.6.30 (which ID is pointing to) but he seeks for head (6.6.31).
🐳|🌱] Getting ORAS manifest [ ORAS manifest from http://ghcr.io/armbian/os/kernel-rockchip64-current:6.6.31-Se3d3-D440d-P303d-C909fH5c21-HK01ba-Vc222-Bf15a-R448a ] Error: ghcr.io/armbian/os/kernel-rockchip64-current:6.6.31-Se3d3-D440d-P303d-C909fH5c21-HK01ba-Vc222-Bf15a-R448a: not found [🐳|🌱] Artifact is not available in remote cache [ http://ghcr.io/armbian/os/kernel-rockchip64-current:6.6.31-Se3d3-D440d-P303d-C909fH5c21-HK01ba-Vc222-Bf15a-R448a ] [🐳|🌱] Kernel build starting [ linux-kernel-worktree/6.6__rockchip64__arm64 ] [🐳|🌱] Using full Kernel bare tree for 6.6 [ existing worktree points to full ] [🐳|💖] Kernel bare tree already exists [ /armbian/cache/git-bare/kernel ] [🐳|🌱] Getting sources from Git [ kernel:6.6 linux-6.6.y ] [🐳|🌿] Fetching updates from remote repository [ kernel:6.6 linux-6.6.y ] POST git-upload-pack (321 bytes) From https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux branch linux-6.6.y -> FETCH_HEAD [🐳|🌱] git: Fetch from remote completed, rev-parsing... [ 'kernel:6.6' 'linux-6.6.y' 'FETCH_HEAD' ] [🐳|🌿] Using Kernel git revision [ 5697d159afef8c475f13a0b7b85f09bd4578106c at 'Fri May 17 10:02:40 UTC 2024' ]
Then its a problem of sources that are being re-based, collabora git for example.