isaacs / github

Just a place to track issues and feature requests that I have for github
2.2k stars 128 forks source link

502 on homepage on long streak #370

Closed cirosantilli closed 8 years ago

cirosantilli commented 9 years ago

https://github.com/cirosantilli unicorns most of the times http://i.imgur.com/y2v7N11.png (not always) because of my huge 100 year long computationally generated streak: https://github.com/cirosantilli/test-streak

Inspired by http://stackoverflow.com/questions/20099235/who-is-the-user-with-the-longest-streak-on-github

EDIT: I have pushed a 1000 year streak later: https://github.com/cirosantilli/test-streak-1000

bwin commented 9 years ago

:disappointed: Why always mess with the system in the first place? (Rhetorical question, needs no answer.) Delete the repos, see what happens. Maybe do some real work (this sounds more offensive than it's meant, but still). I think it's safe to assume that you're the only one affected and you consciously provoked it. The rest of us (and GitHub BTW) is probably safe for the next decades...

I apologize in advance, but... "I have a (fake) 1000-year streak on GitHub, hihi." Yay! You go, boy! Edit: :tada: :balloon: :clap:

Don't misinterpret my comment as me not liking you personally or whatnot, you're probably a nice guy when you're not faking commits. :wink:

bwin commented 9 years ago

BTW since I don't know if you knew:

This is not the actual repository for the GitHub website.

Edit:

[...] But you should also email support@github.com, since this repo is strictly for our own (unofficial) tracking purposes.

cirosantilli commented 9 years ago

@bwin my goals are:

They are all purely for the lolz, non important, and will likely not be furthered by my actions :wink:

This is not the actual repository for the GitHub website.

Yup, I always do: https://github.com/isaacs/github/pull/182

But I bet at least one GitHubber reads this repo.

bwin commented 9 years ago

:wink:

NARKOZ commented 9 years ago

That's a unique way to hide your identity by slaying unicorns.

And according to Github, it isn't a bug, but feature:

The contributions graph is not designed to work when people push commits at a date in the future, which has happened in this case.

When I view the following page and hover over the highlighted square, I see "12 contributions on Jun 12, 2030".

https://github.com/kana?tab=contributions&from=2030-06-12

This indicates that the user has pushed commits using a timestamp in 2030, which is causing the issue with calculating and displaying contributions correctly. Currently we don't support this kind of commit activity in the contributions graph.

Deal with it!

cirosantilli commented 9 years ago

@NARKOZ GitHub's definition of "bug" is quite strict if they don't consider 502 as bugs :smile:

I could also make it 1000 years in the past if they like :wink:

Can you point to where did you got the quote from just for reference? Or was it a support request that you've made?

NARKOZ commented 9 years ago

@cirosantilli excerpt from a support ticket.

stuartpb commented 9 years ago

Assuming they calculate the streak by walking backwards from the current date, I'd say they could probably fix this by bailing out once it reaches February 29, 2008 (the date CrunchBase lists as the founding of GitHub).

stuartpb commented 9 years ago

And it definitely should be fixed. Isn't something that triggers 502 errors a vector for Denial-of-Service attacks (as it indicates that the server has crashed)?

cirosantilli commented 9 years ago

@stuartpb you're a genious! I think that in the past this might haven been usable to DoS other people because commits are only considered by email and are perfectly falsifieable!

@github: sorry, I hadn't noticed that this had DoS potential against others

Right now, GitHub seems to have pushed a hotfix for that already? https://github.com/cirosantilli-puppet is maxing out at 1000 days: https://github.com/cirosantilli-puppet on a streak from 1990 to 2020 Not sure why 1000, maybe a random maximum number? Also note that there are two empty days before the green days: hovering on them does not say no activity like the others.

screenshot from 2015-03-25 09 44 51 streak missing dates

But this introduced the bug that commits in the future appear as "authored just now": GitHub shouldn't modify commit data like that, it's confusing:

screenshot from 2015-03-25 08 06 22 streak future

The real solution is to consider the timestamp of when the commit was pushed for the streak, cache things properly as they are pushed / process things asynchronously and show whatever data is in the repo on the commits.

stuartpb commented 9 years ago

@stuartpb you're a genious! I think that in the past this might haven been usable to DoS other people because commits are only considered by email and are perfectly falsifieable!

That's true, but I was thinking in terms of DDoSing all of GitHub by making every server spin and crash doing this instead of handling requests.

That's a crazy idea, though: destroy the contribution graph for any user by pushing a fake repository with fake commits. (Maybe GitHub should start only counting signed commits as contributions, for repos the user isn't marked as a contributor to?)

stuartpb commented 9 years ago

Indeed, it would appear GitHub already doesn't track contributions on repos you don't own: I just pushed 10000+ commits by cirosantilli-puppet to https://github.com/stuartpb/test-streak and they haven't moved the needle on https://github.com/cirosantilli-puppet.

NARKOZ commented 9 years ago

The same reason why @GoogleCodeExporter's contributions don't count.

cirosantilli commented 8 years ago

Streak is dead. Long live streak: https://github.com/blog/2173-more-contributions-on-your-profile