HackerTrans
TopNewTrendsCommentsPastAskShowJobs

dapirian

no profile record

Submissions

Trunk Merge

trunk.io
14 points·by dapirian·4 ปีที่แล้ว·5 comments

A better way to merge code

blog.trunk.io
3 points·by dapirian·4 ปีที่แล้ว·0 comments

Show HN: Trunk detects and handles preexisting linter issues

blog.trunk.io
3 points·by dapirian·4 ปีที่แล้ว·0 comments

comments

dapirian
·3 ปีที่แล้ว·discuss
Hey thanks for the Q: We will support other CI systems than GitHub Actions, but exact timeline of which and when is TBD.

With regards to cost, you can self-host GitHub Actions runners. Internally we use an autoscaling group of spot instances via k8s, which is much cheaper than GitHub-hosted runners. We actually didn't do it for the cost, we did it because we wanted a local cache to persist on machines during the day, for performance reasons. When cost is a factor, having an analytics system help you optimize your jobs is super important.
dapirian
·3 ปีที่แล้ว·discuss
In SF, $35/walk is cheap. If you've watched 10hrs of dog training videos on youtube you can command $100/hr (the going rate for an unqualified dog trainer), or $150+/hr for a qualified dog trainer.
dapirian
·4 ปีที่แล้ว·discuss
Especially if you're using a finite pool of CI runners. Lots of companies do run their own CI runners either for added security, or to get persistent CI machines with a hot local cache so builds/tests are much faster. Then everyone's PRs are blocked waiting for CI machines just because of people's weird push workflows or micro stacked PRs
dapirian
·4 ปีที่แล้ว·discuss
I think this definition is outdated - linters find real bugs now. The boundaries between linters, static analyzers, and security tools in real life are basically nonexistent, it's entirely tool by tool. Also, autoformatters should style code, not linters. Used to be that linters told you about code style issues, and many still do, but ppl should turn all rules off and use autoformatters instead. Much easier/better.
dapirian
·4 ปีที่แล้ว·discuss
why?
dapirian
·4 ปีที่แล้ว·discuss
If each of your commits are tested and make sense independently, they should be different PRs - sounds to me like you're just smashing 5 stacked PRs into 1 with highly fussy curated commits, which aren't guaranteed by github settings to each be passing CI
dapirian
·4 ปีที่แล้ว·discuss
> As for squashing, I believe that everything should be rebased instead to maintain a proper, linear git history

Rebasing on your PR branches is up to you, it's subjective, but setting GitHub to rebase your PR commits onto your main branch as it's merge strategy is not proper at all. It might 'work' for a tiny hobby project, but it does NOT work for any kind of team activity / professional environment - it would be an immense amount of bloat onto your main branch, and git will eventually start to get slow as mud on every operation because of it. Fun fact, git performance does not scale linearly, and big monorepos hit this problem. Beyond performance, when looking through git history on the main branch: - Every commit on the main branch should map 1:1 with a reviewed PR that passed CI tests/checks - The 'mapping' can just be done by having the PR number in the commit message title. GitHub does that for you with the settings in this blog post - It's not uncommon that someone has 30+ commits on their PR branch, many of which are in a totally broken state, have blatant typos, etc. People just don't (and it's not even desire-able for them to) structure their local commits while working on a PR to be some kind of iterative working state that is useful for others to look at. It's beyond clutter to have these 30 broken commits with crummy commit messages like "update" rebased onto the main branch for all to see for all time.
dapirian
·4 ปีที่แล้ว·discuss
Trunk Merge is an intelligent service that orchestrates merging pull requests to maintain a repository of code that always passes tests. Airbnb, Uber, Twitter, Robinhood, and many other big tech companies internally have their own sophisticated merge queues. Now, you can get the same thing without having to build it.
dapirian
·4 ปีที่แล้ว·discuss
true story
dapirian
·4 ปีที่แล้ว·discuss
100% agree that documenting the practices of your repo is a losing battle: automate it or don't bother. I don't think you go far enough here. Every file in your repo should minimally have an autoformatter and some kind of linter/static analyzer/validator set up. Even shell scripts, ci pipeline configs, dockerfiles, terraform, etc. I recommend https://docs.trunk.io ;)