Skip to content

Commit

Permalink
chromiumchecker: Use Gentoo-hosted tarball mirrors on 404
Browse files Browse the repository at this point in the history
Upstream keeps having issues in their CI pipelines, resulting in
massively delayed tarball uploads. Gentoo has been doing custom uploads
in the interim, so try to automatically fall back to those URLs on 404.

Signed-off-by: Ryan Gonzalez <[email protected]>
  • Loading branch information
refi64 committed Nov 15, 2024
1 parent 6e156e0 commit e950753
Showing 1 changed file with 20 additions and 2 deletions.
22 changes: 20 additions & 2 deletions src/checkers/chromiumchecker.py
Original file line number Diff line number Diff line change
Expand Up @@ -60,12 +60,30 @@ class ChromiumComponent(Component):
"https://commondatastorage.googleapis.com"
"/chromium-browser-official/chromium-{version}.tar.xz"
)
# https://groups.google.com/a/chromium.org/g/chromium-packagers/c/wjv9UKg2u4w/m/SwSvLazmCAAJ
_GENTOO_URL_FORMAT = (
"https://chromium-tarballs.distfiles.gentoo.org/chromium-{version}.tar.xz"
)

async def check(self) -> None:
assert isinstance(self.external_data, ExternalData)

latest_url = self._URL_FORMAT.format(version=self.latest_version)
await self.update_external_source_version(latest_url)
try:
latest_url = self._URL_FORMAT.format(version=self.latest_version)
await self.update_external_source_version(latest_url)
except CheckerFetchError as err:
if (
isinstance(err.__cause__, aiohttp.ClientResponseError)
and err.__cause__.status == 404
):
log.error(
"Chromium tarball is missing (falling back to alternate URL): %s",
err,
)
latest_url = self._GENTOO_URL_FORMAT.format(version=self.latest_version)
await self.update_external_source_version(latest_url)
else:
raise


class LLVMComponent(Component):
Expand Down

0 comments on commit e950753

Please sign in to comment.