DEV Community

Discussion on: Pull Requests Are Slowing You Down

Collapse
 
brense profile image
Rense Bakker

Entirely agree up to this point:

But for many teams this means:

It's entirely possible to setup a pipeline to run integration tests on pull requests, before they get reviewed and merged and you can continuously update the pull request until the integration test succeed. There's no reason why a pull request would have to slow you down...

You suggested solution to the non-existing problem is pair programming... How is pair programming less time consuming than a code review on a pull request? I mean... I'm not against the concept of pair programming, I just don't see any time benefit, compared to (remote) code reviews on pull requests...

Collapse
 
bentorvo profile image
Ben Brazier

This article is focused on testing that needs to be done after deployment, these tests can't all be done on a branch without other painful side effects.

The issue that pair programming (one of the suggestions) is solving is the delay in waiting for PRs which can be hours, days, or weeks. Having a short feedback loop by making changes, deploying them, testing them, and repeating is basically instant when having the review happen as part of the programming.

Collapse
 
netch80 profile image
Valentin Nechayev

The issue that pair programming (one of the suggestions) is solving is the delay in waiting for PRs which can be hours, days, or weeks.

This means that the team has really fine setup in pair programming, which is quite rare. Typically, one participant gets tired after a few minutes and gets mentally sleeping.

Collapse
 
netch80 profile image
Valentin Nechayev

There's no reason why a pull request would have to slow you down...

Except cost of full test run which could be utterly high. I was reported that some projects require tens of hours even with good test setup.
For such cases I'd suggest marking in PR/commit (e.g. in commit message) what test subset to run automatically before passing to human check.

You suggested solution to the non-existing problem is pair programming...

Well, pair programming is almost never a solution here, but the problem exists. It especially matters in some code types (e.g. "glue") where adding lowest-level functional ("unit") tests is useless because they will just copy the tested code.

Collapse
 
brense profile image
Rense Bakker

Except cost of full test run which could be utterly high

Yes, everything depends on the test setup, but for pull request pipelines of the feature branches, only (~fast) unit tests should be sufficient. Full test run should only happen for merge requests to the staging environment (usually at the end of a sprint) where the human checks (user acceptance tests) will happen before going to production.

It especially matters in some code types (e.g. "glue") where adding lowest-level functional ("unit") tests is useless

I don't think you can do anything about that until it actually becomes a problem... Humans are not designed to think ahead appearantly. We have to feel it first to learn from it, so we can forget it again and feel it again and so on. 😜 But in most cases, the quality of the unit tests will improve over time and the problem will go away, without the interference of time consuming pair programming strategies. 😅

The perceived problem might be bigger though, because these days the time to market is so short for new products, that test coverage and test quality havent had time to mature yet.