Skip to content

Potential race condition when getting PR labels for releasing #2482

@d9su

Description

@d9su

Describe the bug

The label function by default gets the labels from the most recently merged PR on any branch, not the most recently merged PR on the target branch. This can cause a potential race condition messing up releases.

For example:

  1. PR A is merged into master, awaiting a release to be generated.
  2. PR B is merged into next immediately after, with a skip-release label.
  3. When auto is run for PR A, it picks up the skip-release label from PR B, thus not end up creating a release.

This issue will happen for any project with multiple release tracks.

To Reproduce

Repeat the above steps, and observe that the release labels for PR B will be used for the release of PR A.

Expected behavior

When auto is run on a specific branch to create releases, it should only pick up PRs merged from that branch, and not any other branches.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions