Skip to content

Build all branches and PRs without duplicate jobs? #517

@anna-oake

Description

@anna-oake

I have buildbot-nix configured like this:

services.buildbot-nix.master.branches = {
  all-branches = {
    matchGlob = "*";
    registerGCRoots = false;
  };
};

My goal is to build all branches and all pull requests in my repository.
The configuration above enables that, however each commit in pull requests is built twice.

If i just push a commit to the branch A or the branch B, a single build job is spawned from the push event.
However, if there is an open pull request to merge B into A, each new commit in the branch B would trigger two build jobs via the pull_request event.
These two jobs would race each other, would lock one another, and would eventually complete with the same result (obviously, since the same commit is being built).

It's not the end of the world, but it slows things down and wastes resources.
Is there a way to avoid such job duplication while still building all branches?
Am I misconfiguring my instance?

Thank you!!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions