Closed Mulugruntz closed 1 year ago
This is what I see when accessing https://github.com/RubbaBoy/BYOB/issues/8 and inspecting the unreachable badge.
We can see that the neat https://byob.yarr.is/mulugruntz/celery-pubsub/m_linux_3.8_celery345 link got replaced by https://camo.githubusercontent.com/43939e1e54e7f73a96439b7b826f0b7ef1c624e61b17160107bb5a9d464be9b0/68747470733a2f2f62796f622e796172722e69732f6d756c756772756e747a2f63656c6572792d7075627375622f6d5f6c696e75785f332e385f63656c657279333435 probably through GitHub's caching policy.
Also, there's x-cache: MISS
and x-cache-hits: 0
.
As a comparison, this is the result of the one that works, with x-cache: HIT
and x-cache-hits: 1
:
To be noted that it also happened sometimes with valid badges.
So when a badge isn't found, a 404 is returned on the image. Camo will only display images with a 200 status code (cache is ignored otherwise, which is why the x-cache is MISS and it makes a unique request to BYOB each time). What are you expecting to see, other than an invalid image? I can't speak for valid badges having this happen to them, I've seen that bug in the past but I haven't been able to reproduce it recently, I will keep trying though (x-cache MISS will appear if the cache has expired and a new request is sent to BYOB, however, it is still displayed).
Edit: I did just find this bug occur while manually sending requests on a valid badge, it appears as if badgen gave an invalid XML response and it couldn't parse it. I will be looking more into this, however, this is a separate issue from the non-200 response images being invalid.
I am fairly convinced the issue regarding valid badges not being displayed has been fixed, today I have moved away from the hosted Badgen service and migrated to a local version, so reliability is much higher now that it is completely self-contained.
As mentioned in #8 , there seems to be some issues related to caching. I'm guessing this is caching, because when going directly to the link and refreshing the page, it seems to "sometimes" resolves the issue.
But maybe it's different.
An example here: