Mention in the branch permission dialog that the option "Check for 1 successful build on the last commit" also enforces no failed builds on last commit

Issue #15031 resolved
Theodora Boudale
staff created an issue

Problem Definition

When creating a branch permission, the option Check for 1 successful build on the last commit automatically enforces that there are no failed builds on the last commit.

This is not very clear to the end users, there is some text in the dialog mentioning "Also notifies users of failed builds before merging". However, it's not very clear that this option prevents merging in case of a failed build.

In cases where users have 1 successful and 1 failed build on the last commit, the merge fails when this option is enabled and it's not clear why.

Suggested Solution

Change the text in the 'Branch permission' dialog, to make it clear that the option Check for 1 successful build on the last commit enforces no failed builds on the last commit.

Comments (7)

  1. Alastair Wilkes staff

    Upon review, I see this is confusing because the behavior changes (to block merges) when "Prevent a merge with unresolved merge checks" is checked - but the helper text doesn't change to reflect this.

  2. Marc Burton

    I'm afraid the solution to modify the text doesn't really solve the underlying problem; the behaviour we want is to prevent users from merging to master unless at least 1 of the builds has passed on the last commit, this is the behaviour that the current dialog seems set up to provide (otherwise why have a select box for number of successful builds?).

    Screen Shot 2017-11-02 at 08.51.15.png

  3. Alastair Wilkes staff

    Hi @Marc Burton, that is indeed how it works: you should just need at least one successful build to merge. However, you also have to have zero failed builds. That is not obvious from the dialog, which we need to improve.

    Note: if a build fails (posting a failed status) and then is re-run (posting a new successful status), the new passed build status should overwrite the old failed one, assuming both build statuses were posted using the same build ID.

  4. Joel Courtney

    Chiming in here because we've experienced this too now.

    "However, you also have to have zero failed builds."

    That's not the same thing as "Check for [n] successful build(s) on the last commit". In fact it's an additional check and cannot be inferred from the check provided here.

    Edit:

    That is to say that there should be an additional checkbox which checks that NO build fail.

    i.e.: I have two builds on the one commit. I set to "1 successful build". I have one failed build and one successful build. I meet the conditions UNLESS I have an additional [x] which says "All builds must pass".

    And while we're talking about Bitbucket's approvals process failures.

    https://bitbucket.org/site/master/issues/15090/merge-checks-approval-process-can-be

  5. Alastair Wilkes staff

    We've updated the copy on the branch permission dialog and the branch permission list to better reflect the current state, which resolves this specific ticket.

    Per the feedback on this issue, I've opened #15258 as a feature request to split the "no failed builds" requirement into its own branch permission.

    Thanks,
    Alastair
    Bitbucket PM

  6. Log in to comment