I think there is a magic environment variable you can set to force it to a certain CDN but I can’t find it right now, perhaps @cjwatson can chime in here …
how does one tell the launchpad builders to do that? it looks to me that @joachimmg is using snapcraft remote-build. Also, this is specifically for stage-snaps where we have no control over what snapcraft sets for the environment when calling snap download or equivalent.
Yeah. My first though was that I could override-stage, but then I realized the packages is pulled before the stage-stage. Then tried to override-pull, but the packages is pulled before this stage too. Now trying to set it in the build-environment-part.
My next try will be to create a nil part and set this environment-variable, that the part with the snaps depends on (using: after).
ah, too bad, I guess because it applies to the build step but not to pull … I had hoped (despite the name of the snapcraft.yaml option) it would set for all steps …
Hoping that the build-environment from the part «pre-dependencies» isn’t cleared before the pull stage of «dependencies», since the snaps is pulled before this step.
It’s not deployed yet, no. I have a ticket in with our sysadmins to deploy it, and I’ll change the bug status to “Fix Released” (and hopefully also remember to post here) once that’s done.
The download is not done over snap download but using the Snap Store APIs themselves. There were some issues at the time, among those, I believe snap download was not machine callable friendly. We may be able to now communicate with the snapd socket since we use that for the snap injection logic.
Failing that, would you consider a patch to honour SNAPPY_STORE_NO_CDN=1 in snapcraft's environment and turn it into an HTTP header in the same way that snapd does?