bot icon indicating copy to clipboard operation
bot copied to clipboard

Branding cog - RuntimeError: Failed to fetch file due to status: 503

Open sentry[bot] opened this issue 2 years ago • 1 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.

sentry[bot] avatar Nov 09 '23 11:11 sentry[bot]

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.

kwzrd avatar Nov 10 '23 19:11 kwzrd