Our CI is too slow to really consider this but I w...
# announce
h
Our CI is too slow to really consider this but I wish we could require always being up-to-date against master
a
up-to-date in what sense?
h
Meaning you have to be rebased against master. If someone merged a change into master since you opened the PR, you have to integrate those changes in We should not actually do this because we’ll never get anything done. But in an ideal world where CI only took 10 minutes it would be great
It’s designed to catch issues like what Stu is encountering, where your code works against the old version of master but doesn’t work when combined with another PR that gets merged before yours does
a
that’s what i was thinking. what if we required that on push? or is the idea that it would be useful to have that before doing some work on the PR
ah sorry will read up
h
So the idea is it blocks merging. You can only merge if you’re 100% up to date and that also passes CI
a
right i guess i’m thinking we already have a pre commit hook and if a pre push hook exists we could like do a fetch and rebase there
it’s not ideal because it doesn’t ensure it
but like i think i might use that
unclear
h
That would be interesting. It would at least make sure they’re up to date when they first open the PR. It wouldn’t help if code gets merged to master when the PR is already open though
I’m using the check on my startup and really like it. But I’m the only developer and CI only takes 2 minutes 😂 definitely different circumstances than Pants
a
i’m confused as to the second sentence ?
pants pre commit hook can take ages
when we like make rust happen it will go away
like whenever you push a new commit to your PR it would require you to rebase is the idea
so yeah other code can get into master but you won’t have any race conditions with your code except from the last push to the merge
h
Ah I meant your idea of a pre-commit hook can make sure that they’re up to date when they first open the PR. But until they run that pre-commit hook again, ie to make a new commit, it won’t help with the problem of new code being merged after the PR is already open Still much better than nothing tho!
a
i guess that’s what you’re talking about huh
i’m thinking of a pre push hook
if such a thing exists
looking up
h
I really like that idea as something that will barely add required time to developer, while still helping to solve this problem. It doesn’t solve the issue 100%, but if it can solve it 65% at very little cost I’ll gladly take that
a
to me personally i would opt in — if we could in any way address the time from last push -> merge that would be nice, but just remembering to rebase at that one point is probably fine