9 ms·
Improving how we deploy GitHub
- aszen 6y agoKind of sad to see GitHub doesn't use GitHub itself to deploy and monitor their releases.
- illnewsthat 6y agoI was surprised to read that they are using Slack since it is such a competitor to Microsoft's Teams (parent company).
- kuschkufan 6y agoAre you expecting them to use Windows everywhere as well?
- dubcanada 6y agoNo but why would you use a product that is $7 or what ever times the number of employees (so let's say 200, so $1400 a month) when you can use a free one.
- maccard 6y agoSpeaking from experience, just because you work for a company doesn't mean you can use all of their products (or that you'll even get favorable pricing on them).
- lostapathy 6y agoI'd love to hear this story! Seems crazy ... but we live in a crazy world.
- vulcan01 6y agoWhen I worked at MS Azure, we had to pay for Azure servers! (I believe our team had a $5k/month Azure bill.) It's part of internal budgeting, so that people within MS don't splurge on expensive things (because it does cost MS money for each person on Teams).
- names_are_hard 6y agoDid you drop a k? What can you do with 50 dollars?
- vulcan01 6y agoYes, thank you, it should be $5k. Edited.
- scott_w 6y agoUnrelated to software but the company my dad works for (motor repair) has to buy all its parts from its own distribution arm, at the marked up price. He then has to turn a profit on those parts as well as pricing the labour. If cost price is £5 and the markup is 20%, he has to pay £6 to get the part, then charge £7.20 on the invoice to the customer. I’ll let you guess what that does to tender bids ;-)
- names_are_hard 6y agoAt Microsoft if you build a product using Azure (and if you want to use the cloud you MUST use Azure, you're not going to get approval to write a check to AWS) the costs come out of your budget. And it's taken seriously, to the point where teams will very much emphasize managing costs (what will this new feature cost on our Azure bill? Can we build it more efficiently? Oh wow, that refactor saved us 100k/month in cloud costs, don't forget that when we start talking about promotions...)
- lostapathy 6y agoThat makes sense since the amount you could use is variable. I was thinking more like somebody couldn't get a free word license at a MS subsidiary or something.
- theshrike79 6y agoOn the other hand sometimes it means you MUST use the company products. Consulted for a sub-sub-sub-subsidiary of Toshiba. All computer equipment had to be from Toshiba - the closest place to get Toshiba laptops was two COUNTRIES over. They even had to tape over non-Toshiba branding from external displays that would be visible.
- eyelidlessness 6y agoIn fact, from what I've heard, Microsoft generally charges internally for usage of products across orgs.
- NordSteve 6y agoServices, yes. Code is shared across the board at no cost.
- paxys 6y ago$1400 a month is less than a rounding error for a company that size. If you can get even the tiniest bit of extra developer productivity from the software then it is worth it. And Github will definitely still have to "pay" for Teams, whether that is internal accounting or actual money being exchanged.
- names_are_hard 6y agoMy understanding of Microsoft policy is that it's easier to buy macbooks for your developers than it is to buy Slack. Which makes sense, because they're currently doing head to head with slack for market share right now, while a few macbooks doesn't threaten their credibility when selling windows. My guess is that github was using slack before they were bought and inertia is a thing. I'm sure there are people within the parent company that would like to see them transition, but I'm sure there's a ton of resistance, especially "on the ground" at github. Buyouts are a delicate thing, they don't want to ruin github by trying to force it to change too quickly.
- dubcanada 6y agoProbably because Teams is the worst. More then likely it's because that's what they used before they got bought and haven't been forced to migrate over yet, they also seem to have bots, which are not really a direct copy and paste into MS Teams, and likely them converting over isn't a high priority.
- jen20 6y agoIIRC GitHub used to use Campfire and it took a long time to switch to Slack - a switch to Teams would no doubt take a long time too!
- paxys 6y agoEasy to switch a chat application, hard to switch your entire chatops ecosystem. This blog post shows the perfect example of that.
- WJW 6y agoThat seems like an extremely good idea actually, since if you dogfood your own releasing service then you can't fix it anymore if you accidentally bring down the service.
- xxpor 6y agoThat's usually solved with a parallel stack deployment, use the other stack if something is broken
- paxys 6y agoIf the "other stack" isn't regularly used then you can assume it will be broken when needed
- cpascal 6y agoYou just run the previous version of the production stack in your "dogfood/operations" stack. Once you've fully rolled out production and have vetted it, you can upgrade the other one to match production.
- epidemian 6y agoWith large codebases maintained by many people, sometimes it's difficult to "just" do things like that. It's a bit weird to think that no one within that large group of professional developers hasn't thought of doing a simple obvious solution. It's probably not that simple.
- cutemonster 6y agoLots of comments here around that say "just do it like this: ...", or "why don't you: ... it'd be good because ..."
- marcinzm 6y agoAnd then you get hit with a subtle bug that utterly nukes your system when the year changes from 2020 to 2021. Now you can't deploy anything because both systems are down. Given Github's scale and number of engineers it's basically guaranteed that they'll hit some sort of bug like that eventually. Not all bugs act immediately.
- jules2689 6y agoThere is some GitHub used, but as others stated we don't want to create a circular dependency on ourselves in case we deploy something that is broken.
- qppo 6y agoCompilers seem to manage just fine with bootstrapping themselves. The trick is not to overwrite yourself
- cbb330 6y agoWas some mix of decoupling / parallelizing the Actions service considered? I believe the value of dogfooding would be immense. Not only could you become the customer (massive reduction to the deploy/measure feedback loop), but it would be a key marketing move. On top of that, the GUI that will now require critical care and development is essentially a clone of what is offered by Github Actions.
- jules2689 6y agoYes there was. The change would have been quite a lot to do at once, and we aren't ready to safely add that circular dependency yet. We aren't done on this path, and this certainly won't be the last iteration. I suspect that iteration will come at some point after we can figure out the circular dependency issue. It also makes sense internally. Our actions team is much larger than the team that manages the project I wrote/lead, so it also makes logistical sense IMO We also started before the CD product was ready on actions and we directly influenced it, so yea haha
- bomdo 6y agoI'd love to learn more about their canary rollouts. Is there any more info from either them or similar large sites about this? For example, what usually has to happen for a dev to trigger a rollback? Or how do they handle stateful changes such as database schema changes?
- t3rabytes 6y agoRe db migrations: they've built their own DB management tooling (https://github.com/openark/orchestrator https://github.com/openark/orchestrator) and online migration tooling (https://github.com/github/gh-ost https://github.com/github/gh-ost)
- abrkn 6y agoIs there anything like this for PostgreSQL?
- jules2689 6y agoWe monitor Datadog dashboards, exceptions, and other metrics mainly, as well as smoke testing the application
- mapme 6y agoCurious what does the “Debug” button do on the right hand side?
- jules2689 6y agoa ton of internal debug logs :) We log all state machine transitions, poll the state machine to make sure it stays running, and do a ton of checks in the process. The debug button is a timeline of all of that. Basically trace-level logs
- zoobab 6y agoGithub source code did not leak recently?
- KinesisMagic 6y agoCan anyone explain why they might go with a slack based deployment system as opposed to something more robust like CircleCI or Jenkins? Is it mainly about the simplicity of it?
- zug_zug 6y agoAs a devops person myself, I am super skeptical that there is any good reason to do a chatops deploy. My guess is "new toys are cool" / "Want this on my resume" To be clear, it's hopefully just some connector that does slack message -> triggers jenkins job. But from a security, compliance, reliability, debuggability, auditability perspective I think it's inferior. Not to mention an inferior interface.
- swagonomixxx 6y agochatops deploys aren't really new toys, a place I was at was doing them around 2013/14. We liked it because the chat history you see is essentially a deploy history, no need to login into some other website to check some obscure logs page to see who did what. We did end up having to debug the service that processed the chat messages maybe once, but never ran into an issue when we had to deploy a hotfix.
- zug_zug 6y agoI enjoy having a copy of the history in slack. What I do is have all jenkins deploys send a record to the #deploys channel (Service X, version Q deployed by person Y completed successfully in Z minutes), which comes for free with a tiny jenkins plugin. However one of the unicorns I worked at deleted all slack messages after 3 months for legal reasons, as one example. Also, slack has periodic outages. I think a lot of people underutilize jenkins, but once you're handy with it (and get over its god-awful ui) you never go back.
- eyelidlessness 6y ago> My guess is "new toys are cool" / "Want this on my resume" Whenever I read comments like this I’m always deeply suspicious of the commenter (is that how you justify trying/adopting tech) or their employer (are they so draconian in tech/design choices that everything is frozen for good). I’m not trying to cast aspersions on you or your employer directly... but it’s fascinating to me to see such a myopic take on a problem space I hope you’d agree is very much not one-approach-fits-all. I’m surprised to hear about their flow too, but my more charitable assumption is that their teams have tried different things and settled on an evolving process that works for them. They’re proud enough to boast it from the corporate blog, it can’t be entirely lark.
- sandGorgon 6y ago>GitHub.com is deployed primarily through chatops What is the best chatops right now ? I dont see a lot of popularity around chatops. Its most usually some version of github based triggers. Its funny that Github themselves uses chatops. I think that's a very nice take - especially for early stage startups. Anyone else use anything like it ?
- paxys 6y agoI'm guessing they are using Hubot (https://hubot.github.com/ https://hubot.github.com/)
- swagonomixxx 6y agoA place I was at used Hubot as well. It gets the job done, we never really ran into a fuss. Easily extensible as well.
- jules2689 6y agoThis is correct :)
- icey 6y agoWe're just starting beta, but my friend Phil and I both worked together at GitHub and are building what we hope to be a better Hubot at https://ab.bot https://ab.bot right now. It's missing some of the chatops stuff that is mentioned in the blog post but since we support a lot more languages than Hubot we're hoping it's a matter of time before someone in our community builds a better replacement deployment script (or we'll do it while building out sample scripts :)) (Also, hi GitHub friends!)
- Xorlev 6y agoI was surprised to see their canary stages are just 5 minutes. Many problems take longer to manifest. That seems like a fairly risky release process.
- paxys 6y agoThe problems that don't immediately manifest could very well take hours or days or longer. There has to be a limit, and 5 minutes is as good as any.
- closeparen 6y agoA lot of alerts use moving averages or sustain times to squelch transient noise. You have to wait for the max sustain time to pass before you can conclude that lack of alert = lack of problem. That time could very well be 5 minutes but the two need to be coordinated.
- jules2689 6y agoIt's actually longer than 5 minutes. There is the duration of the 2% canary deploy where we start to see pick up of traffic, a 5 minute wait, then a 20% "deploy", and a 5 minute wait. All in all this comes out to around 10-15ish minutes in canary. This is a stage where we can almost instantly shut off traffic to the canary deploy. Could we reduce risk by lengthening the process? Maybe, but you also make deploys longer which means less stuff can get through in a day. This makes devs respond with larger PRs, for example, which increases the risk profile. So we need to balance time and duration. Typically large problems will manifest quickly, or take a lot longer to detect (and thus are generally more minor problems) when you have our scale of a user base in my experience.
- cutemonster 6y ago> around 10-15ish minutes in canary 10-15 is fast I think Sounds as if you can do more than 100 deployments per day? -- but I guess you don't do that many?
- wdb 6y ago
- alexchamberlain 6y agoThat's pretty awesome to go from nothing to full production in 15 minutes. I would like to encourage others to bear in mind that simply adding more time wouldn't significantly decrease the risk of things going wrong.
- cytzol 6y agoSomething I found surprising is that a change to the GitHub codebase will be run in canary, get deployed to production, and then merged. I would have expected the PR to be merged first before it gets served to the public, so even if you have to `git revert` and undeploy it, you still have a record of every version that was seen by actual users, even momentarily. Does anyone know the pros and cons of GitHub's approach?
- halukakin 6y agoI think this method seems to get more popular by day. IMHO, previously master was the branch you merge before the deploy process. But today this is reversed. The main benefit is, other developers can rely on the master branch even more. They will know there will not be a revert on the master branch they just pulled one hour ago and already started coding on.
- Kwpolska 6y agoA `git revert` creates a new commit. To a developer, a revert commit appearing on master has the same effect as a pull request (or ten) being merged into it. If the revert affects code you’re working on, you will need to resolve conflicts, just like you would need to if a merged PR affected the same code.
- irjustin 6y agoWhile what you're saying is true for all situations, the of the github flow is that to a developer relying on master, problematic code never made it in. Agreed that any codes can be added/removed but those are 100% valid changes in github flow.
- lucasyvas 6y agoI thought this was what tests were for :)
- 6y ago
- hoprocker 6y agoThis is generally a good flow, but something that absolutely baffles me is that GitHub changes the commit SHAs when branches are rebase-merged from PRs[0]. This totally breaks a fundamental notion in Git that the same work, based on the same commits, has the same hash. It also makes it incredibly difficult to determine which PR branches have been merged into master. [0] https://docs.github.com/en/github/collaborating-with-issues-and-pull-requests/about-pull-request-merges#rebase-and-merge-your-pull-request-commits https://docs.github.com/en/github/collaborating-with-issues-...
- comfydragon 6y agoThe page you linked to does subtly explain why that happens: > Rebase and merge on GitHub will always update the committer information and create new commit SHAs
- lordgilman 6y agoI really don't think this is a "fundamental notion in Git." They ship git-patch-id to do what you're trying to do and frequently used internal tools like git-cherry use it. It's also not a true statement for LKML-like workflows that are landing patches off of mailing lists with git-am or git-apply.
- leafmeal 6y ago> This totally breaks a fundamental notion in Git that the same work, based on the same commits, has the same hash. This is not a fundamental notion in git. The hash includes timestamps as well. edit: It also contains author and commiter details. Here's a slightly revised list borrowed from a blog post[1] - commit message - The file changes - The commit author (and committer- they can be different) - The date - The parent commit hash(es) [1]: https://www.mikestreety.co.uk/blog/the-git-commit-hash https://www.mikestreety.co.uk/blog/the-git-commit-hash
- juped 6y agoThat is not something Github is doing, it's fundamental to how git works that different commits have different hashes - and rebasing creates different commits (they have different parents). Not rebase-merging would probably suit your workflow better.