Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

require PRs to pass against master before getting merged #7566

Closed
jrhizor opened this issue Nov 2, 2021 · 4 comments
Closed

require PRs to pass against master before getting merged #7566

jrhizor opened this issue Nov 2, 2021 · 4 comments

Comments

@jrhizor
Copy link
Contributor

jrhizor commented Nov 2, 2021

We've seen several problems lately where master is broken because conflicting changes on master and some pr don't show up in a merge conflict.

Latest example:
#6975 was passing on the PR build, was merged but immediately caused failures due to changes on master that weren't part of the PR builds, which broke Airbyte registry access and required #7565 to fix.

@jrhizor jrhizor added type/enhancement New feature or request build labels Nov 2, 2021
@jrhizor
Copy link
Contributor Author

jrhizor commented Nov 5, 2021

@noahkawasakigoogle
Copy link
Contributor

I'm curious about this issue existing, it seems like it could be a pretty big problem. Especially when Airbyte scales engineering up and more and more PRs are merging each week.

Do Airbyte pull requests not build jobs/tests using the merge candidate commit but instead build literally the branch itself?

If thats true, there's a way to change this behavior to run builds against the current master branch with the developer branch merged together (merge candidate commit) by using the event pull_request instead of push.

It might be as simple as changing the workflow file to this:

on: 
  pull_request

Would probably require some additional testing/verification on certain things though

@timroes
Copy link
Contributor

timroes commented Feb 16, 2022

Passing PRs against master sounds a good first step. Unfortunately there will still be one potential conflict case. If you let your PR hang around for too long after the last CI build (e.g. because reviewing takes some time), it could already be in a state causing problems merging into master, and it won't be detected because the CI simply doesn't run again anymore since there have been no changes triggering it.

In my previous projects we automatically invalidated PRs that have not been rebased/merged from master longer than 48h. That would enforce everyone to make sure their PR is also based on a recent master branch, plus makes sure that even after CI ran and passed it, it would automatically invalidate if it's staying around for too long without activity. I feel this was a good solution reducing conflicts (on a repo with roughly 30-50 PRs merged per day).

@davinchia
Copy link
Contributor

We've discussed this several times and decided that this is something that will slow down dev speed enough that we don't want to enact this yet. I'm closing this or now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants