build: upstream_url not used for setup
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 450
- Forks
- 111
- PR merge metrics
- No merged PRs in 30d
Description
@aparcar Not sure how you want to handle this one...
In https://github.com/openwrt/asu/blob/main/asu/build.py#L211
where we run setup.sh, the value of environment["UPSTREAM_URL"] is not set, so the default FILE_HOST=mirror-03.infra... is used, even when the config settings are set to downloads.... On my local host, this bypasses the CDN for a bunch of files, most importantly the imagebuilder itself, and can cause timeouts on builds:
$ podman run -ti ghcr.io/openwrt/imagebuilder:mediatek-filogic-main
buildbot@984608bff4e5:~$ echo $FILE_HOST
mirror-03.infra.openwrt.org
buildbot@984608bff4e5:~$ . setup.sh
2026-04-16 13:07:31 URL:https://mirror-03.infra.openwrt.org/...
If I change the environment as below, works for me, but will that be ok on the production server?
- environment: dict[str, str] = {}
+ environment: dict[str, str] = {
+ "UPSTREAM_URL": settings.upstream_url,
+ }
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start in asu/build.py around lines 163 and 211, then inspect how setup.sh reads UPSTREAM_URL and how settings.upstream_url is populated. Exercise the imagebuilder setup path with a configured upstream URL and confirm that setup uses it instead of the default mirror, including on the production configuration path.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- backend, build-system
- Issue type
- Bug
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 72/100