HomeVideos

Github are you joking?

Now Playing

Github are you joking?

Transcript

275 segments

0:00

GitHub just had its magnum opus of a

0:02

bug. Now, I've heard lore that people

0:04

have dropped databases, just some

0:06

showstopper bugs, but I did not think it

0:09

was possible for GitHub to cease being

0:12

Git. Now, we're going to go through what

0:13

actually happened, but more so I just

0:15

have a lot of questions as to how this

0:17

was even possible. All right, so before

0:20

we begin about GitHub ceasing to be Git,

0:23

let's first go over a bit of lore

0:24

because it's important. In 2005, the

0:27

creator of Linux decided that he was

0:29

going to take the Brendan Ike challenge,

0:32

which is to create a programming

0:33

language in 7 days, but instead create

0:35

version control in 10. And thus, Git was

0:38

born. Upon seeing this beautiful

0:41

distributed version control, software

0:42

developers did the only thing that made

0:44

sense. Immediately create a single point

0:47

of failure. GitHub became so popular

0:50

that other services decided to use the

0:52

hub naming convention. Of course, the

0:54

most popular being DockerHub where you

0:57

can store all your your Dockers at

0:59

Microsoft seeing that GitHub attracted

1:01

developers developers developers

1:04

>> decided to purchase GitHub for $7.5

1:07

billion and proceeded to generationally

1:10

fumble the bank. Microsoft, you could

1:12

have done like nothing. Like if you

1:14

would have just left GitHub, it would

1:16

have operated better than whatever has

1:19

happened today. But the impressive part

1:21

is that Microsoft has discovered the

1:23

fourth E in the triple E strategy of

1:26

course which is embrace, extend,

1:28

extinguish and shitify. Yesterday we had

1:31

a regression in the merge Q behavior

1:34

where in some cases squash or rebase

1:38

commits were generated from the wrong

1:40

base state making earlier changes appear

1:43

reverted in branch history. you had one

1:46

job, just one singular job, GitHub,

1:49

which is of course to be Git. Now,

1:51

that's only about half the story because

1:53

it really isn't kind of actually

1:55

illustrating what happened. Now, here's

1:58

a better story. On April 23rd, GitHub's

2:00

merge Q started silently reverting code

2:03

on customers main branches. Now,

2:05

reverting is actually a Git operation.

2:07

It did not revert code. That's very

2:11

important to understand. Not a handful

2:12

of lines, in some cases thousands.

2:15

Nothing looked wrong. A PR with a plus

2:18

29 minus 34 diff got reviewed, approved,

2:21

and cued. What actually landed on main

2:23

was a single commit with plus 245 minus

2:26

1,137.

2:28

Thousands of lines of unrelated already

2:30

shipped code were quietly removed. Every

2:33

merge that followed went in on top of

2:35

that broken history. That means that you

2:37

would look at the PR. your PR would

2:40

actually look correct. And when you hit

2:43

the merge button, what actually went in

2:46

was not what you hit merge on. This is

2:49

absolutely diabolical behavior. I mean,

2:52

to be lied to, like the UI just telling

2:54

you no, everything's good, man. This is

2:56

exactly what's going to happen. And for

2:58

you to have no idea is crazy. I still

3:02

have a lot of questions, but this is

3:03

roughly how it's being reported. Now, we

3:05

do not have the official GitHub kind of

3:08

postmortem that explains exactly what

3:11

went wrong. This is just what is being

3:13

purported by large companies.

3:14

Effectively, what happens is you have

3:16

history that looks like this in git. And

3:18

this would be your main branch. So,

3:19

let's just say you have four commits on

3:21

your main branch. And for whatever

3:23

reason, you branched off back here to

3:25

make your new branch and then you've

3:27

added two commits. So the actual root

3:30

cause of what would happen is that when

3:31

you'd go to merge, what would end up

3:33

happening is they would run something

3:34

called a merge Q, which would take your

3:36

two merges, which if you just drew this

3:38

in a straight line would be three

3:39

circles because you'd have where you

3:41

branched from and your two changes, and

3:43

it would squash these two into a

3:45

singular change. So they are just one

3:47

single branch. This is actually a whole

3:48

new branch that's uh created internally

3:51

in one of Microsoft's CI. Let's just

3:54

call this singular squashed merge A.

3:56

What should happen is that A should be

3:58

merged to the tip of Maine.

4:02

But what actually ended up happening is

4:04

that they would take this history right

4:06

here and overwrite whatever was on main

4:09

with this right here. So that means if

4:11

this thing was called B, that means what

4:13

would be on main now would simply be B

4:16

to A and that is it. That means these

4:19

three commits were just gone. Now this

4:21

obviously caused teams to scramble all

4:23

afternoon. There are hundreds of tweets

4:25

of people saying, "Hey, I had to spend

4:26

all afternoon or multiple days trying to

4:28

figure out how to detangle whatever has

4:31

happened and what is actually missing

4:33

from all of their PRs." GitHub, of

4:35

course, has said there's only 2,84

4:38

poll requests that were messed up out of

4:39

4 million merged. Then later on said

4:41

there was only 800K PRs. Either way,

4:44

that's the difference between 007% and 3

4:47

plus%. It's a big difference. So, which

4:49

one is it, GitHub? And obviously even

4:51

more confusing thing if you go to April

4:53

23rd. That's weird. I don't Do you see

4:57

Do you see like some major outage or a

4:59

partial outage going up there? No, they

5:01

don't show anything went wrong on the

5:04

23rd. Obviously, the reason for that is

5:06

that the only downtime was you and your

5:09

team trying to figure out how to undo

5:11

what just happened. But I also just have

5:13

a lot of questions and maybe you guys

5:14

can help me on this one. So the first

5:16

thing I have is that if this is B and

5:19

this is A and this is the temporary

5:20

branch that we have created. If history

5:23

looked like this, wouldn't pulling down

5:26

cause you to have some sort of hey the

5:28

remote branch is like out of sync with

5:31

your local branch, meaning your two

5:32

histories have diverged? You wouldn't

5:34

even be able to pull down main anymore.

5:37

Or the other option is that instead of

5:39

just simply putting a right here, it

5:41

actually had uh revert commits, meaning

5:43

that it would have these three commits

5:45

right here, and then it would have

5:46

another commit that was like, hey, I'm

5:48

reverting these three commits right

5:50

here. And then you would have something

5:52

like a, which would make this not too

5:54

difficult to be able to go, okay, well,

5:56

here's the only revert we have.

5:58

Unreverted, which is not like how

5:59

anything sounds like. But even more

6:01

importantly, git is still git. You

6:04

cannot change history like this easily.

6:07

Does that mean internally is Microsoft

6:10

like pushing with force? Right? Because

6:13

the only way that you could push this

6:15

right here, this history onto main would

6:19

be that you have to force push because

6:20

you're changing history. And if that's

6:23

the case, if that's the case that

6:24

they're force pushing, makes me kind of

6:26

nervous. Like what other issues are

6:28

there? What other things have been

6:30

silently happening? And of course, this

6:33

there's no shot it was 2,84 total.

6:36

Please double check this stat. We

6:38

probably had 200 plus as a single

6:40

customer. So, I'm actually just pretty

6:42

curious. Did you lose any commits? Are

6:44

you using the kind of the auto squash

6:46

feature and thus you have things gone?

6:48

Also, this has opened up the most

6:50

legendary excuse of all time for the

6:52

next year. When any company gets hacked

6:55

and stuff gets leaked or something goes

6:57

horribly wrong, they can go, "Oh, yeah.

6:59

Well, actually, uh, we actually did

7:00

implement perfect security. We actually

7:03

had this exact situation already

7:05

covered, but GitHub decided to silently

7:08

drop our commit, brother. It's not our

7:11

fault, it's GitHub's. It's also funny

7:14

because there's probably a bunch of vibe

7:16

coders that they just simply just kept

7:18

on going on with their day. Some weird

7:20

thing happened and they're getting

7:21

they're just like, "Oh, fix it. Oh, AI,

7:23

just fix it." And then when a bug

7:24

appeared, they're like, "Stupid AI

7:26

always reverting previous changes. Hey,

7:28

fix that one. Now again, you know that

7:31

happened. Absolutely beautiful. And the

7:34

worst part is for once it actually

7:35

wasn't AI. They're just they're just

7:37

going to be blamed for part of this for

7:39

a whole group of people. Actually, I

7:40

mean, to be fair, it could have been AI.

7:43

It could Hey, it could have been.

7:44

There's some there's some reports going

7:45

around that it was a faulty feature

7:47

flag. Of course, Hacker News had its

7:49

heyday and people were viciously

7:51

discussing what happened to GitHub. Four

7:54

people spend hours putting our repo back

7:56

together at my company after this.

7:58

GitHub has been unreliable and now they

8:01

are breaking core tenant of what I

8:03

expect from this service. Cortenant, you

8:05

mean tenant, not tenant. You must be fun

8:08

at parties. I don't care to associate

8:10

with people who are offended by being

8:12

corrected. They can saw off and I never

8:16

go to what you Americans call parties.

8:19

Whenever you use quotes and they are

8:22

directly followed by punctuation,

8:26

you must include

8:28

the punctuation within the quotes.

8:31

Parties period reply. Don't you love

8:35

hacker news? It's just such a lovely

8:37

place where you see really thoughtful

8:39

and amazing discussions about topics.

8:42

But at the end of the day, we still do

8:43

not have the exact uh postmortem. But we

8:46

don't know the exact uh cause or

8:47

reasoning or will GitHub even provide us

8:49

with the exact details. I don't know. So

8:51

if anybody can answer these questions,

8:53

does Microsoft actually use a force

8:55

underneath the hood to be able to align

8:57

histories? Were there revert commits,

9:00

which I don't think there was because

9:01

nobody is saying that on the internet,

9:03

wouldn't this cause all sorts of history

9:05

being absolutely destroyed? Wouldn't

9:06

this be kind of easy to be able to kind

9:08

of resolve? Maybe, yeah, it would take a

9:11

little bit of time. And maybe you have

9:12

to ask Claude Opus for, you know, Mythos

9:15

to be able to resolve it. But you should

9:16

be able to get this done pretty quick.

9:18

And really, was it only 2,800 PRs? Is

9:21

that is that it? I mean, Mr. 200 over

9:23

there doesn't seem to make it that that

9:25

to be the case. the name is that I think

9:28

the most impressive thing out of all of

9:30

this is that GitHub created such a

9:33

monumentously good name that even after

9:37

GitHub ceased to be Git for a little

9:40

bit, everybody's probably still going to

9:42

keep on using it. I mean, now that my

9:44

friends is one of the most impressive

9:47

products of all time at this point, it

9:49

seems like GitHub is more addictive than

9:51

cigarettes.

9:53

A gen. Hey, is that HTTP? Get that out

9:58

of here. That's not how we order coffee.

10:00

We order coffee via ssh terminal.shop.

10:03

Yeah, you want a real experience. You

10:04

want real coffee. You want awesome

10:06

subscriptions so you never have to

10:08

remember again? Oh, you want exclusive

10:10

blends with exclusive coffee and

10:13

exclusive content? Then check out cron.

10:15

You don't know what SSH is?

10:18

>> Well, maybe the coffee is not for you.

10:23

in hand.

10:25

Living the dream.

Interactive Summary

A significant bug occurred on GitHub, causing its merge queue to silently revert code on customers' main branches. This issue, which affected thousands of lines of code in some cases, led to broken commit histories and required extensive effort from development teams to rectify. While GitHub initially reported a small number of affected pull requests, later statements suggested a higher number. The exact cause remains officially undisclosed, but speculation points to a faulty feature flag or internal process. The incident has raised questions about GitHub's reliability and internal practices, including the potential use of force pushes. Despite the severity of the bug, the overall impact on GitHub's reputation might be mitigated by its strong brand recognition.

Suggested questions

4 ready-made prompts