Register a SA Forums Account here!
JOINING THE SA FORUMS WILL REMOVE THIS BIG AD, THE ANNOYING UNDERLINED ADS, AND STUPID INTERSTITIAL ADS!!!

You can: log in, read the tech support FAQ, or request your lost password. This dumb message (and those ads) will appear on every screen until you register! Get rid of this crap by registering your own SA Forums Account and joining roughly 150,000 Goons, for the one-time price of $9.95! We charge money because it costs us money per month for bills, and since we don't believe in showing ads to our users, we try to make the money back through forum registrations.
 
  • Post
  • Reply
Notorious b.s.d.
Jan 25, 2003

by Reene
PRs are really good for your giant open sores project with six vendors, six hundred contributors, and an Apache org. in that context it's always more important to have a change vetted and approved by all stakeholders than it is to avoid wasting the time of developers

PRs are considerably less good for your six man team all working on the same project every week

Adbot
ADBOT LOVES YOU

Phobeste
Apr 9, 2006

never, like, count out Touchdown Tom, man
you know that prs don't have to be across forks, right. they can be to merge branch a into branch b (in the same repo). and most people use them only half for the making sure that people can't push willy-nilly part - the other part is that most providers that support a pull request like concept also provide a nice online way to make comments on code, review them, have conversations, etc that is much better than wheeling your chair over for 15 minutes and letting your eyes glaze over while Jerry talks about poo poo you don't care about and you miss some important bug

DrPossum
May 15, 2004

i am not a surgeon

lol

DrPossum
May 15, 2004

i am not a surgeon

Notorious b.s.d. posted:

PRs are really good for your giant open sores project with six vendors, six hundred contributors, and an Apache org. in that context it's always more important to have a change vetted and approved by all stakeholders than it is to avoid wasting the time of developers

PRs are considerably less good for your six man team all working on the same project every week

not when you have people actually read them and give meaningful feedback and suggestions. doing that has made me a slightly less shameful and terrible programmer from being at both ends of that

Bloody
Mar 3, 2013

Notorious b.s.d. posted:

i fuckin hate pull request workflow

everywhere i've worked that used that poo poo ended up with forever-forks with unfinished work that just needed one more change we'll meet about this again next week

at my last job i had a PR remain open for two years while people yak-shaved

it also makes CI/CD basically impossible -- since everyone is developing in a separate fork it's very difficult to "integrate" any changes in progress.

really showing your whole rear end about how little you know right here lol

Nomnom Cookie
Aug 30, 2009



Notorious b.s.d. posted:

i fuckin hate pull request workflow

everywhere i've worked that used that poo poo ended up with forever-forks with unfinished work that just needed one more change we'll meet about this again next week

at my last job i had a PR remain open for two years while people yak-shaved

it also makes CI/CD basically impossible -- since everyone is developing in a separate fork it's very difficult to "integrate" any changes in progress.

one thing that’s actually very cool about k8s at my job is how easy it makes it for us to run the integration test suite against a full-up backend for every PR. also we land dozens of PRs each day, and it’s pretty rare for a substantial PR to get approved without changes. what is going on at these workplaces that no one is willing to merge to master

MrMoo
Sep 14, 2000

I now have access to years and years of video of old people waving their hands about and smoking cigars,



Something using GraphQL for queries with wonderfully long URL encoded parameters,

JavaScript code:
%7B%0A%20%20search(query%3A%20"HitResult%20%3D%20%5B%27Home%20Run%27%5D%20Order%%
20By%20Timestamp%20DESC"%2C%20limit%3A%2010%2C%20page%3A%200%2C%20languagePreferr
ence%3A%20EN%2C%20contentPreference%3A%20CMS_ONLY)%20%7B%0A%20%20%20%20total%0A%%
20%20%20%20plays%20%7B%0A%20%20%20%20%20%20mediaPlayback%20%7B%0A%20%20%20%20%200
%20%20%20id%0A%20%20%20%20%20%20%20%20guid%0A%20%20%20%20%20%20%20%20title%0A%200
%20%20%20%20%20%20%20description%0A%20%20%20%20%20%20%20%20slug%0A%20%20%20%20%22
0%20%20%20blurb%0A%20%20%20%20%20%20%20%20timestamp%0A%20%20%20%20%20%20%20%20fee
eds%20%7B%0A%20%20%20%20%20%20%20%20%20%20type%0A%20%20%20%20%20%20%20%20%20%20dd
uration%0A%20%20%20%20%20%20%20%20%20%20closedCaptions%0A%20%20%20%20%20%20%20%22
0%20%20playbacks%20%7B%0A%20%20%20%20%20%20%20%20%20%20%20%20name%0A%20%20%20%200
%20%20%20%20%20%20%20%20url%0A%20%20%20%20%20%20%20%20%20%20%7D%0A%20%20%20%20%22
0%20%20%20%20%20image%20%7B%0A%20%20%20%20%20%20%20%20%20%20%20%20title%0A%20%200
%20%20%20%20%20%20%20%20%20%20altText%0A%20%20%20%20%20%20%20%20%20%20%20%20cutss
%20%7B%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20aspectRatio%0A%20%20%20%20%200
%20%20%20%20%20%20%20%20%20width%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20heii
ght%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20src%0A%20%20%20%20%20%20%20%20%22
0%20%20%20%7D%0A%20%20%20%20%20%20%20%20%20%20%7D%0A%20%20%20%20%20%20%20%20%7D%%
0A%20%20%20%20%20%20%7D%0A%20%20%20%20%7D%0A%20%20%7D%0A%7D%0A
welp

Cold on a Cob
Feb 6, 2006

i've seen so much, i'm going blind
and i'm brain dead virtually

College Slice

lmao

jemand
Sep 19, 2018

ctps: There's a specific workflow that involves passing things in and out of json/mongo/strings/python dictionaries. This includes data fields that could be empty, as well as image data which has been base64 encoded.

A "strange and rare failure mode" was debugged and solved this week and it was discovered that replacing the characters "null" for "None" in the "simplest" way possible does indeed end up finding those characters in some small fraction of the coded images and wreck them up.

prisoner of waffles
May 8, 2007

Ah! well a-day! what evil looks
Had I from old and young!
Instead of the cross, the fishmech
About my neck was hung.

Notorious b.s.d. posted:

i fuckin hate pull request workflow

everywhere i've worked that used that poo poo ended up with forever-forks with unfinished work that just needed one more change we'll meet about this again next week

at my last job i had a PR remain open for two years while people yak-shaved

it also makes CI/CD basically impossible -- since everyone is developing in a separate fork it's very difficult to "integrate" any changes in progress.

Bloody posted:

really showing your whole rear end about how little you know right here lol

I’d describe it as “showing your whole rear end re: working anywhere that people are competent enough to run ‘git pull —rebase’”

cool av
Mar 2, 2013

IMO he's right that pushing straight to master is better for small teams/projects (I would say 3 or 4 people; 6 is probably pushing it).

PRs mostly just waste everyone's time and increase merge conflict risk under those circumstances.

Captain Foo
May 11, 2004

we vibin'
we slidin'
we breathin'
we dyin'

I’m not even a developer and i know enough to know that nbsd post was garbage lmao

cool av
Mar 2, 2013

of course "permission to push to master" in git actually means "permission to irreparably destroy your entire repo" but that's a git problem not a workflow one

prisoner of waffles
May 8, 2007

Ah! well a-day! what evil looks
Had I from old and young!
Instead of the cross, the fishmech
About my neck was hung.

cool av posted:

of course "permission to push to master" in git actually means "permission to irreparably destroy your entire repo" but that's a git problem not a workflow one

???

GitHub protected branches feature?

Xarn
Jun 26, 2015

Phobeste posted:

you know that prs don't have to be across forks, right. they can be to merge branch a into branch b (in the same repo). and most people use them only half for the making sure that people can't push willy-nilly part - the other part is that most providers that support a pull request like concept also provide a nice online way to make comments on code, review them, have conversations, etc that is much better than wheeling your chair over for 15 minutes and letting your eyes glaze over while Jerry talks about poo poo you don't care about and you miss some important bug

They are also a place to run your ci pipeline before you poo poo up master with your code.

I actually have push-to-master rights at my job, and I stopped using them, because in 9/10 cases the "trivial, obviously right" change wasn't.

zokie
Feb 13, 2006

Out of many, Sweden

Notorious b.s.d. posted:

i fuckin hate pull request workflow

everywhere i've worked that used that poo poo ended up with forever-forks with unfinished work that just needed one more change we'll meet about this again next week

at my last job i had a PR remain open for two years while people yak-shaved

it also makes CI/CD basically impossible -- since everyone is developing in a separate fork it's very difficult to "integrate" any changes in progress.

Keep the PRs small, and create one often. The previous year I averaged about 1 each day. If your PRs are huge they’ll be a huge pain to review, we tried to make one for each task basically and tasks that are bigger than a day are should be unusual. And if it doesn’t get reviewed the same day it’s the first thing that happens tomorrow.

The only time a PR stays open for longer than a day is for the first few when onboarding a new developer that might have a lot of things to learn.

Having a good pipeline is essential because you want to run your CI against the PR before it’s merged!

If you get bikeshedding comments either just do it if it’s no big deal and fixing it is fast so you can get done. Or resolve the comment with Won’t fix and the reviewer can decide if they want to withhold approval over meaningless bullshit, they probably won’t. If they do and are senior then it’s probably them wanting to contribute “something”, humor them or fight it your call.

I think the key to getting this to work is a combination of technical things, like enforced policies for each PR regarding rests &c, and social. Everyone knows how annoying it is to feel “benched” while waiting for your current PR to close so you can devote yourself to your next task, so when a co-worker opens a PR you review it pronto.

Aramoro
Jun 1, 2012




cool av posted:

IMO he's right that pushing straight to master is better for small teams/projects (I would say 3 or 4 people; 6 is probably pushing it).

PRs mostly just waste everyone's time and increase merge conflict risk under those circumstances.

PRs are good for small teams as well as they build in Code Reviews to the work flow. And code reviews are important because programmers are garbage.

jesus WEP
Oct 17, 2004


a fresh set of eyes on a piece of work is rarely a bad thing*

*notable exception being a rockstar reviewing your ticket and turning <10 changed lines into a major rearchitecting because *~reasons~*

redleader
Aug 18, 2005

Engage according to operational parameters

jesus WEP posted:

a fresh set of eyes on a piece of work is rarely a bad thing*

*notable exception being a rockstar reviewing your ticket and turning <10 changed lines into a major rearchitecting because *~reasons~*

"sorry, but unfortunately we don't have enough time left for a comprehensive refactoring. i'll merge this pr and put in a tech debt ticket"

jesus WEP
Oct 17, 2004


redleader posted:

"sorry, but unfortunately we don't have enough time left for a comprehensive refactoring. i'll merge this pr and put in a tech debt ticket"
yeah lol

not only that but when your comprehensive refactoring introduces a subtle bug that no-one notices for 2 months, it’s a fuckload easier to find it when the change isn’t hidden away in a commit labeled “YOSPOS-219 change button to green”

Aramoro
Jun 1, 2012




redleader posted:

"sorry, but unfortunately we don't have enough time left for a comprehensive refactoring. i'll merge this pr and put in a tech debt ticket"

mm yeah Tech Debt, get round to that anytime now

Chalks
Sep 30, 2009

Aramoro posted:

mm yeah Tech Debt, get round to that anytime now



i'm the A rating

Aramoro
Jun 1, 2012




Chalks posted:

i'm the A rating

Our ratio is still less than 5% so it's A OK!

Private Speech
Mar 30, 2011

I HAVE EVEN MORE WORTHLESS BEANIE BABIES IN MY COLLECTION THAN I HAVE WORTHLESS POSTS IN THE BEANIE BABY THREAD YET I STILL HAVE THE TEMERITY TO CRITICIZE OTHERS' COLLECTIONS

IF YOU SEE ME TALKING ABOUT BEANIE BABIES, PLEASE TELL ME TO

EAT. SHIT.


jesus WEP posted:

a fresh set of eyes on a piece of work is rarely a bad thing*

*notable exception being a rockstar reviewing your ticket and turning <10 changed lines into a major rearchitecting because *~reasons~*

Yeah enforced PRs are great except for this, I often ended up going to specific team members for reviews b/c I knew some people were really poo poo

that might be more of a management issue and I haven't had to deal with it as much as I became more senior

e: to be clear the people I was avoiding were ones with around 2-3 years of experience, I find that more experienced devs are by and large pretty laid back about the whole thing

Private Speech fucked around with this message at 10:47 on May 22, 2020

DrPossum
May 15, 2004

i am not a surgeon

zokie posted:

Having a good pipeline is essential because you want to run your CI against the PR before it’s merged!

forcing computers to look at and deal with what they have shamefully enabled is the only just thing that's happened in the last 10 years

Powerful Two-Hander
Mar 10, 2004

Mods please change my name to "Tooter Skeleton" TIA.


unless it's a toy project that only you work on or it's like a wrapper to package libraries or something don't commit direct to master imho, branch and merge and tag the merge points on master

kind of in two minds on squashing though, not doing it provides the history on master of "how did this get hosed up" at a detailed level, but this also completely bloats the history out.

jesus WEP posted:

yeah lol

not only that but when your comprehensive refactoring introduces a subtle bug that no-one notices for 2 months, it’s a fuckload easier to find it when the change isn’t hidden away in a commit labeled “YOSPOS-219 change button to green”

this is one of the things I blew up about last week, 30 commits just labelled "implementation" with no further detail on what they were doing or why.

edit: so I guess forcing a PR and squashing those would have been fine because its not like we could figure out what the gently caress was going on from the individual commits anyway

fritz
Jul 26, 2003

last two jobs I had a hell of a time getting people to review my PRs to the point that at last job after a couple days is declare "last call" and ok it myself 24 hours later

didn't help that the first few months I was there the guy I was supposed to be working with didn't actually know what a pr was

Aramoro
Jun 1, 2012




We use Phabricator as a little bit of custom scripting to assign code reviews to people so there's just a big open list of things it's hard to ignore.

redleader
Aug 18, 2005

Engage according to operational parameters

Aramoro posted:

mm yeah Tech Debt, get round to that anytime now



:wink:

Phobeste
Apr 9, 2006

never, like, count out Touchdown Tom, man

Xarn posted:

They are also a place to run your ci pipeline before you poo poo up master with your code.

I actually have push-to-master rights at my job, and I stopped using them, because in 9/10 cases the "trivial, obviously right" change wasn't.

yup. I have those rights too because we’re a small enough shop that we do our own admin and I’m honestly never tempted. it’s so much better to have other people see it, to run tests you might have forgotten, run tests on other OSs, etc etc.

my last job was two devs for the fw side and had no unit testing or linting or static analysis and didn’t really do prs, and it was painful - bugs could only be caught through (admittedly quite robust) HIL integration testing or through test-it-on-your-desk and it definitely slowed us down constantly. I was making progress on getting us to code review culture when I remembered I hated working there and quit lol

JawnV6
Jul 4, 2004

So hot ...
ive never seen ‘the pr workflow’ hosed up badly enough to require weekly meetings

raminasi
Jan 25, 2005

a last drink with no ice

Aramoro posted:

We use Phabricator as a little bit of custom scripting to assign code reviews to people so there's just a big open list of things it's hard to ignore.

we use phab too and I find it extremely easy to ignore

Xarn
Jun 26, 2015

Powerful Two-Hander posted:


kind of in two minds on squashing though, not doing it provides the history on master of "how did this get hosed up" at a detailed level, but this also completely bloats the history out.



If your coworkers cannot produce hygienic commits to save their lives (half of mine cannot), it is better to squash-merge than to not. If your coworkers understand atomic commits and rebasing, don't squash commits. EZ

Nomnom Cookie
Aug 30, 2009



squashing is easier and faster. if your massive patch train is incomprehensible as a single commit, try breaking it up into multiple PRs

rotor
Jun 11, 2001

classic case of pineapple derangement syndrome

Notorious b.s.d. posted:

i fuckin hate pull request workflow

everywhere i've worked that used that poo poo ended up with forever-forks with unfinished work that just needed one more change we'll meet about this again next week

at my last job i had a PR remain open for two years while people yak-shaved

it also makes CI/CD basically impossible -- since everyone is developing in a separate fork it's very difficult to "integrate" any changes in progress.

the PR workflow is the only good thing in the poo poo accretion disk that orbits the supermassive effort black hole that is git

everyones job is different and there's no real objectively wrong way to do stuff, but you're getting really close to discovering one imo.

Brain Candy
May 18, 2006

jesus WEP posted:

a fresh set of eyes on a piece of work is rarely a bad thing*

*notable exception being a rockstar reviewing your ticket and turning <10 changed lines into a major rearchitecting because *~reasons~*

read this as rear-architecting because i'm tired butt it works

jesus WEP
Oct 17, 2004


Brain Candy posted:

butt it works
*runs test suite*

actually,

Powerful Two-Hander
Mar 10, 2004

Mods please change my name to "Tooter Skeleton" TIA.


rotor posted:

supermassive effort black hole

mods

Sapozhnik
Jan 2, 2005

Nap Ghost
It would have been nice if Mercurial won instead of Git but it didn't so here we are.

I'm happy as long as I never have to touch Subversion or Perforce ever again. Thank god at least ClearCase seems to be utterly extinct.

Adbot
ADBOT LOVES YOU

taqueso
Mar 8, 2004


:911:
:wookie: :thermidor: :wookie:
:dehumanize:

:pirate::hf::tinfoil:

Remember bitkeeper? Me either

  • 1
  • 2
  • 3
  • 4
  • 5
  • Post
  • Reply