Branding cog - RuntimeError: Failed to fetch file due to status: 503
sentry-io opened this issue · comments
Sentry Issue: BOT-3MY
RuntimeError: Failed to fetch file due to status: 503
File "bot/exts/backend/branding/_repository.py", line 204, in get_events
instance = await self.construct_event(event_directory)
File "bot/exts/backend/branding/_repository.py", line 179, in construct_event
meta_bytes = await self.fetch_file(contents["meta.md"].download_url)
File "bot/exts/backend/branding/_repository.py", line 126, in fetch_file
raise RuntimeError(f"Failed to fetch file due to status: {response.status}")
Could not construct event 'events/snake_day'.
This caused some events to be skipped, and the server's branding reverts to the evergreen branding.
We should make this resilient somehow. Potentially not changing the branding if a retry doesn't work.
I would like to look into this. I can implement some retry mechanism. I could also make the requests concurrent so that the sync is much faster and it'd be nice to add some tests.