[buildbot] phase1: apply feeds_host_override to main repository URL
LEDE Commits
lede-commits at lists.infradead.org
Tue Jan 13 00:01:36 PST 2026
ynezz pushed a commit to buildbot.git, branch main:
https://git.openwrt.org/78343984a6699d6dcaf5e561c6e72887fee5bf3b
commit 78343984a6699d6dcaf5e561c6e72887fee5bf3b
Author: Petr Štetiar <ynezz at true.cz>
AuthorDate: Sat Jan 10 20:30:01 2026 +0100
phase1: apply feeds_host_override to main repository URL
When feeds_host_override is configured, also apply it to the main
OpenWrt repository URL (repo_url). This fixes git fetch 503 errors
when git.openwrt.org is overloaded by redirecting to GitHub mirror.
git fetch -f -t https://git.openwrt.org/openwrt/openwrt.git main --progress
error: RPC failed; HTTP 503 curl 22 The requested URL returned error: 503
fatal: the remote end hung up unexpectedly
Signed-off-by: Petr Štetiar <ynezz at true.cz>
---
phase1/master.cfg | 15 +++++++++++++++
phase2/master.cfg | 2 ++
2 files changed, 17 insertions(+)
diff --git a/phase1/master.cfg b/phase1/master.cfg
index 9967eaf..c045120 100644
--- a/phase1/master.cfg
+++ b/phase1/master.cfg
@@ -109,6 +109,9 @@ def ini_parse_branch(section):
pb_port = inip1.get("port") or 9989
feeds_host_override = inip1.get("feeds_host_override", "").strip()
+if feeds_host_override:
+ repo_url = re.sub(r"git\.openwrt\.org/openwrt", feeds_host_override, repo_url)
+
# This is the dictionary that the buildmaster pays attention to. We also use
# a shorter alias to save typing.
c = BuildmasterConfig = {}
@@ -920,6 +923,18 @@ def prepareFactory(target):
)
)
+ # keep existing checkouts aligned to the configured repo_url if it changes via feeds_host_override
+ factory.addStep(
+ ShellCommand(
+ name="setorigin",
+ description="Syncing Git origin URL",
+ descriptionDone="Git origin URL synced",
+ command=["sh", "-c", 'test ! -d .git || git remote set-url origin "$REPO_URL"'],
+ env={"REPO_URL": repo_url},
+ haltOnFailure=True,
+ )
+ )
+
# workaround for https://github.com/openwrt/buildbot/issues/5
factory.addStep(
Git(
diff --git a/phase2/master.cfg b/phase2/master.cfg
index 7af1b30..0a5bd7e 100644
--- a/phase2/master.cfg
+++ b/phase2/master.cfg
@@ -69,6 +69,8 @@ if ini.has_option("phase2", "port"):
if ini.has_option("phase2", "persistent"):
persistent = ini.getboolean("phase2", "persistent")
+feeds_host_override = ini.get("phase2", "feeds_host_override", fallback="").strip()
+
c['workers'] = []
for section in ini.sections():
More information about the lede-commits
mailing list