-
-
Notifications
You must be signed in to change notification settings - Fork 5.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
GitHub Releases Broken #161
Comments
Wait, what? Now it is showing up. How can that be? Why does it keep switching between working and broken? |
Sometimes, the vendor's servers (or Heroku's connection to them) lag, and the request takes over 20 seconds to be processed. I'll see how this evolves. |
@espadrine This sounds like a place where the caching strategy I was employing previously would be helpful: always return an image instantly, and then kick off a call to refresh the info. |
@whit537 That would be useful for code coverage badges (coveralls). I see large delays with them, and even timeouts for image loading sometimes. |
There's a little more detail on the algorithm in comments here:
|
I'm having this issue as well. Maybe use some sort of caching or something so that when the vendor lags you can use slightly outdated data? |
This one fails way more often than any other vendor. I'd love to have a hard explanation. I'll try extending the cache in the next few days. |
i seem to be having issues with mine as well, it's not updating the release version! |
@BrendanThompson This sounds like a different issue than the one discussed here. Can you open a new bug, give a link to the badge that is not updating, and to the project's repository location? |
Having this issue with Release and Tag on Github: https://github.com/krainboltgreene/scrawl.gem |
I made an update in which I manage a large cache that is used only when the vendor's server is unresponsive. It does mean that a badge that was never requested since the start of the Shields server will still show a "vendor unresponsive" badge. |
@espadrine Nice! :-) |
As for the algorithm that @whit537 used before, I feel a bit strange about it, so I did a bit of math to explain why. The data we provide occasionally gets changed, and the only way for us to know is to perform the request to the server. On the other hand, we receive requests for badges. Let's assume that requests for a particular badge and the data changes associated with the information provided by the badge are perfectly regular (they happen at fixed intervals with frequency If we apply the suggested algorithm, a portion of the badges we provide will be outdated. The quotient of accurate badges we provide is
If the frequency of badge requests is twice as high as that of data changes, we only get half of our badges right, and our badges are outdated by up to That said, we now have a huge cache that is hardly ever used, and in many cases it contains accurate information, which it can send fast. Assuming we have a target minimum accuracy, say |
Good to know you've put some thought into this. 👍 This will sound like bikeshedding after your last comment, but it might be useful to add a visible (yet unobtrusive) marking to a badge when its information was retrieved from cache, or when it is particularly stale. This should be optional, of course. |
👍 |
I would rather have an outdated badge than a broken image show up on my thing. Broken images just look unprofessional and sloppy, and I think that reflect far more poorly on a project than the occasion wrong graphic. To add to that, most of the time when I release a new upgrade I have no problem hitting refresh on my readme page to see what it looks like- I can prime the cache myself. I think you're completely overdoing it with that algorithm. Here's how it should work, in my opinion-
Even if you decide it's better to show an error message instead of outdated information I feel the experience can be a lot better by fixing the error state itself. Right now we're not even getting proper errors, we're getting images that are just completely failing to load. However, I also feel that the occasionally wrong value is acceptable, especially since it should be a rather rare event that only occurs after an update is put out. |
@tedivm I'm not discussing broken badges anymore. I have added a fix to show "server inaccessible" badges instead of broken images a couple of weeks ago, and around 12h ago I have added a cache to show the previous version of the badge instead whenever possible. Those changes are in. Therefore, the algorithm you propose is already in (except we send a proper error image instead of just "null" or "error"). If you witness failings in the current implementation, I am all ears; there might be bugs which I didn't notice. The algorithm I suggested above is a way to make most badges snappier to load by using the cache I created to fix this issue. Therefore, it is actually partially irrelevant to this issue, which should be considered fixed. |
I didn't realize this was fixed because I'm still getting errors where the images do not load at all. |
@mhelvens Do you mean an HTTP header? Which one would you suggest? |
@tedivm Excellent! Is it reproducible? Which link does that? (Edit: just loaded the logs, can't find an app timeout.) |
This link wasn't working for most of this morning, although it is now- |
@tedivm If you are in Europe or in Eastern US, that timeframe does coincide with a bug I fixed about 5h ago. |
The coverage thing wasn't working as recently as an hour ago, but it is working just fine right now. |
@tedivm In which way exactly wasn't it working? Was it showing the "server inaccessible" badge, or a 500? |
There was no image showing at all, so I'm guessing a 500 error although I can't be sure (I wasn't tracking the headers). |
On a sidenote, you should add a "max-stale" header to your HTTP output so that CDN's and Proxy's will display the image even if there's a gateway timeout or something during revalidation. |
@tedivm Hmm, can't find a 500 (or anything but a 200) for that URL in the logs. Ping me as soon as you experience this again. I'll try to add a |
Still broken here- I'm getting "invalid" for all the releases on my projects. |
None of my projects are showing the badges anymore. They are all failing by showing "invalid" as it's release. |
@tedivm Hmm, that's really odd. I assume you mean http://img.shields.io/coveralls/tedivm/JShrink/master.svg (the others seem to look ok). "Unknown", for coveralls badges, means that the percentage did not parse as a number — or more specifically, it parsed as |
I'm talking about github releases, not coveralls. Check out this image for Stash, it shows as invalid. |
Same result for JShrink- |
Coveralls is working fine, the reason you're seeing that error from yours is that I moved JShrink out of my personal account and to a new Github repository, and you're using the older link. The new one is working great for Coveralls- http://img.shields.io/coveralls/tedious/JShrink/master.svg |
Ah, right, that was dumb on my part. I made the code work for GitHub tags, but didn't fully copy it for GitHub releases, which means it still had the 60 requests/minute limit. Should be fixed in a jiffy. |
It is (hopefully permanently) looking good now. |
Looks good, thank you! |
Cool! ☺ |
Closing as fixed. |
All the mentioned release badges (http://img.shields.io/github/release/tedious/stash.svg http://img.shields.io/github/release/tedious/jshrink.svg https://img.shields.io/github/release/GrahamCampbell/Bootstrap-CMS.svg) now showing "vendor unresponsive" |
Seems broken (badges/shields#161)
Seems broken (badges/shields#161)
any clue? I just came around this issue |
The main issue left is rate limiting, which is this issue: #529. |
The GitHub releases badge for many of my repos don't work. Here is one of them: https://img.shields.io/github/release/GrahamCampbell/Bootstrap-CMS.svg.
Here are the tags for the repo: https://github.com/GrahamCampbell/Bootstrap-CMS/releases.
The text was updated successfully, but these errors were encountered: