stop making giant changesets!

stop making giant changesets!

anthonywritescode

1 месяц назад

6,929 Просмотров

Ссылки и html тэги не поддерживаются


Комментарии:

@nexovec
@nexovec - 25.09.2024 19:05

I wish memes could be posted in here because I need to post that green guy looking to the side

Ответить
@mrswats
@mrswats - 25.09.2024 19:17

I guess this works well with a big code like sentry but would create too much overhead with smaller teams. Any advice for this case?

Ответить
@shiftysharpe1234
@shiftysharpe1234 - 25.09.2024 19:50

Could you make use of: git commit --fixup <commit to fix> and git rebase --autosquash on the mega MR and then update the small MRs via cherrypick

Would be interesting to hear a comparison to this approach, if it ends up being meaningfully different or not

Ответить
@Lexaire
@Lexaire - 25.09.2024 20:44

I love the idea of splitting your code into multiple PRs! You should switch to `git switch`! Also, here's a git alias I use all the time that you might like: remaster = !git fetch && git rebase origin/master

Ответить
@rohailtaimourInc
@rohailtaimourInc - 25.09.2024 23:12

I can see that we have an index (mega branch) and then the branches that we create to push to remote for reviews. However, when you’re first fleshing out the code, before breaking it into logical units are you still using the mega-index for that?

Ответить
@rohailtaimourInc
@rohailtaimourInc - 25.09.2024 23:14

Also, I was wondering about how to break up commits with a feature and its corresponding tests. Tests can take up a lot of lines themselves and we can’t have a feature released without all its required tests first right? How do you break those kind of PRs into smaller ones?

Ответить
@SQADIqw
@SQADIqw - 25.09.2024 23:40

Interactive rebase is a king of atomic patches👍

Ответить
@jasonkary8431
@jasonkary8431 - 26.09.2024 00:19

I totally hear you! I have trained myself to keep changes smaller. It’s so much easier to review and keep people close to the main branch.

Ответить
@StanislavSchmidt1
@StanislavSchmidt1 - 26.09.2024 00:23

Agree on breaking up work into smaller bits, but personally I don't like having to rebase. What would be the drawback of having a feature branch instead where every commit must be added via a (small) PR?

Ответить
@Gskvj
@Gskvj - 26.09.2024 01:26

For "first" commits introducing a feature, would each commit instead then be a logical atomic necessary for the feature's implementation? Still feels like a logical atomic could easily exceed 200 lines at times

Ответить
@blacklistnr1
@blacklistnr1 - 26.09.2024 02:03

Frankly this looks like pain, 100-200 LOC should be easy to review and 13 commits just makes it more annoying for both the writer and the reader

I agree that the github (same with gitlab) diff looks cluttered and like pure chaos, but it's just a shit UI, often compounded by bad diff region highlights, a nice vscode setup with side by side files is just so much better

Also, I'm really curious how you'd tackle a migration/updating breaking dependencies (in the range of 90k lines before the code even compiles). <100 line commits would be unmanageable IMO

To be clear, if it works for you, that's great! but the video leaves me with more questions than answers when thinking about how to apply it

Ответить
@pabloqp7929
@pabloqp7929 - 26.09.2024 02:51

Two minutes in and I'm surprised CI/CD wasn't mentioned yet

Ответить
@vvzen
@vvzen - 26.09.2024 10:32

Interesting approach! I love atomic commits and rebasing workflows but I never thought also about doing atomic PRs. As a reviewer, I don’t know if I’d find it easier to review 13 separate PRs vs a relatively small one with 13 commits. I guess it depends how related the changes are. In the small PR I can always just look at the diff of each individual commit anyway, so I feel I’m missing something 🤔. I guess your approach works well for a team where there’s more than just a few reviewers, so those 13 PRs won’t be reviewed by the same 1/2 people.

Ответить
@rosmelylawliet
@rosmelylawliet - 26.09.2024 22:54

GH has now an interface to make reviews by commits, although it is worst than GL's one, it allows you to make review comments and stuff, so it's OK.

Ответить
@sillybuttons925
@sillybuttons925 - 27.09.2024 13:56

"I started by removing this hack that I put in"... yup love it!

Ответить
@PanduPoluan
@PanduPoluan - 28.09.2024 18:10

Sometimes one just can't avoid massive changesets ... Like when I change aiosmtpd's test harness from "nose" to "pytest", it was thousands of lines of change, because all unit tests need to be rewritten.

But afterwards changes are mostly small sized.

Ответить
@6DEM9
@6DEM9 - 28.09.2024 20:54

If this workflow does not have a name I would call it the "async octopus" because this is basically an "octopus merge" but where all the branches are merged sequentially rather than all at once.

Ответить
@codecaine
@codecaine - 09.10.2024 19:10

👏👏👏

Ответить
@GOZES
@GOZES - 10.10.2024 00:48

Maybe worth expanding on what you mean by "rebase workflow"

Ответить
@maurot0p
@maurot0p - 12.11.2024 18:53

What would you do if you were working on a new feature?
Adding models, new views, new graphql queries, etc. I ask this because I have this problem a lot and completely agree in the smaller reviewable changes, however If I just base the graphql code on top of the models, at the end ill have to merge and show a huge changelog off main branch

Ответить