Issue #9361 new

Add an option to turn off pull request auto-updating (BB-10402)

Nathan Goldbaum
created an issue

Recently we've noticed several old open PRs get updated without any human intervention.

This is not the best behavior given our development workflow, which is based around pull requesting from anonymous heads in a mercurial repository and does not use feature branches.

Worse, it appears that pull requests do not actually auto-update at all, instead all pending PRs get auto-updated when another pull request is merged.

For example, last night the following pull requests was merged:

https://bitbucket.org/enzo/enzo-dev/pull-request/206/adding-rotating-sphere-test-problem/activity

This caused the following pull requests to be automatically updated:

https://bitbucket.org/enzo/enzo-dev/pull-request/173/fixes-header-include-order-and-missing/activity

https://bitbucket.org/enzo/enzo-dev/pull-request/199/keep-initially-uniform-metallicity-fields/diff

https://bitbucket.org/enzo/enzo-dev/pull-request/202/adding-the-agora-isolated-disk-problem-and/diff

In all three cases this was not the desired behavior.

I don't think it's a good idea to let pull requests be updated without some sort of manual confirmation from the PR issuer. I would appreciate a way to revert to the old behavior.

Comments (14)

  1. Britton Smith

    As the person who was responsible for the merger the first PR mentioned above, I can say that the auto-updating of the other PRs was definitely not desired behavior. Regardless of my opinion of auto-updating PRs, this is definitely a major bug.

    I also have to agree with Nathan Goldbaum that auto-updating PRs with no human confirmation is not something I would ever want. While it may make streamline things for some people, I think the larger effect is to take power away from users. Additionally, I have, on occasion, mistakenly pushed additional changes to a head with an open PR and this new feature effectively removes the safety net.

  2. Michael Frauenholtz staff

    Hi Nathan and Britton,

    I believe your pull requests were updated because the destination branch changed once the first pull request was merged. This appears to be our intended behavior.

    However, I understand that this behavior may not be ideal for some workflows, so I've added a ticket to our backlog to make auto-updating optional. We'll update this issue when we have more to share.

  3. Britton Smith

    Hi Michael,

    Thanks for getting back to us. The problem for us is PRs getting updated through actions of people that are not the issuers of the PR itself. We often have multiple PRs open at once to and from anonymous or only bookmarked heads. This may not be the best workflow, but it seems like this new feature will make things a bit chaotic for us. Anyway, thanks again for responding and please let Nathan Goldbaum or myself know if there is anything we can provide you with when the status of this issue changes.

  4. Matthew Turk

    Hi there, I've been seeing this as well. PRs that I've issued have been updated to different heads than my current line of development, they aren't following bookmarks, and on and on. I would really prefer to be able to update them myself rather than having someone else do this, or even worse, having a buggy or opaque system do it. Any help would be greatly appreciated!

  5. Tarik Guney

    I also think there should at least be a setting via which we can disable this feature. There could be certain cases in which people find this a really nice improvement, but so far I have not seen a good use case for it.

  6. Nathan Goldbaum reporter

    For what it's worth, the really buggy behavior described above seems to have been fixed. Pull requests issued from forks now auto-update as expected.

    That said, it would be very nice to have an option to turn off this behavior if that is not what is desired for a project's development workflow.

  7. Nathan Goldbaum reporter

    Here's another pull request that was corrupted due to the change in behavior: https://bitbucket.org/yt_analysis/yt/pull-request/895/fixing-ramses-density-and-mass-units/diff

    Now, for example, if I want to incorporate changes from a proposed PR into subsequent work, I cannot merge with the PR head and then push to my bitbucket fork, since that will auto-update the pull request. The only way to incoporate changes from proposed PRs is (in mercurial) with a graft or a transplant - duplicating the changesets needlessly.

  8. Chris Morgan

    Yeah, we've been having the same problem. We are pushing to branches with outstanding pull requests in order to fix some issues found during review or testing and everyone is incorrectly seeing that as a request to review the pull request again.

    An option to turn on/off this auto update would be helpful. Auto update is really messing us up here.

  9. thadeudepaula

    It causes a security issue, once the code can change unexpectedly after the review and before the merge.

    I think that the pull requests should be like a snapshot as the tags marks a specific point in the history or, for the use of commits, a branch with special name and special permissions for commits only of the reviewers.

  10. Log in to comment