Skip to content

[Dev][CI] Extra labels are confusing #50133

Closed

Description

@pitrou

Describe the bug, including details regarding any error messages, version, and platform.

When you add an Extra label for CI, sometimes it gets later removed by a bot. It's not obvious why or when this happens.

Component(s)

Developer Tools, Continuous Integration

Activity

  1. pitrou commented on Jun 9, 2026

    @pitrou
    MemberAuthor
  2. kou commented on Jun 9, 2026

    @kou
    Member

    Could you share a sample PR that the problem happened?

  3. kou commented on Jun 10, 2026

    @kou
    Member
  4. kou commented on Jun 10, 2026

    @kou
    Member

    @raulcd It seems that

    def set_state(self, state):
    """Sets the State label to the PR."""
    self.pull.add_to_labels(state.value)
    that uses https://docs.github.com/en/rest/issues/labels?apiVersion=2026-03-10#add-labels-to-an-issue may remove existing labels when multiple label add requires are processed at once. (I think that it's a bug of GitHub...)

    Are we using the "awaiting ..." labels? If we don't use the "awaiting ..." labels, how about removing them? If we remove them, we can avoid this timing sensitive problem.

  5. pitrou commented on Jun 10, 2026

    @pitrou
    MemberAuthor

    I've just used the "Add labels to an issue" API as instructed here to add the Java label to this issue, it didn't remove other labels.

  6. pitrou commented on Jun 10, 2026

    @pitrou
    MemberAuthor

    Note that "Add labels to an issue" uses POST while "Set labels for an issue" uses PUT.

  7. pitrou commented on Jun 10, 2026

    @pitrou
    MemberAuthor

    The GHA-based issue bot uses setLabels instead of addLabels or removeLabel and that might be the issue.

  8. kou commented on Jun 10, 2026

    @kou
    Member

    #50125 (comment) is a problem case, right?

    It's a PR. Our issue bot isn't executed for PR:

    on:
    issues:
    types:
    - opened

    #50125 (comment) (you added CI: Extra: C++ and CI: Extra: R) happened on 2026-06-08T14:02:30Z and
    #50125 (comment) (Archery added awaiting review and removed CI: Extra: C++) happened on 2026-06-08T14:02:40Z.

    I think that this timeline is related...

  9. pitrou commented on Jun 10, 2026

    @pitrou
    MemberAuthor

    #50125 (comment) is a problem case, right?

    Yes. It happens to me often actually.

    It's a PR. Our issue bot isn't executed for PR:

    Hmm. I see.

    I think that this timeline is related...

    It is. But it's weird because add_labels is not supposed to remove existing labels...

  10. pitrou commented on Jun 10, 2026

    @pitrou
    MemberAuthor

    I think the problem is that we're using https://github.com/actions/labeler for PRs which uses setLabels.

    Another project had the same problem with it: flutter/flutter#128440

  11. pitrou commented on Jun 10, 2026

    @pitrou
    MemberAuthor

    Also see actions/labeler#763 . They claim the issue is fixed but I don't understand how.

  12. pitrou commented on Jun 25, 2026

    @pitrou
    MemberAuthor

    Ok, the AI upstream said this:

    In Arrow's labeler.yml, CI: Extra: C++ is configured as a labeler-managed label. PR #50125 modified Docker and compose files, which do not match the configured rules for that label. As a result, when labeler ran with sync-labels: true, it removed CI: Extra: C++ as expected.

    It looks like the AI is right. @kou Do we need to add more paths to labeler.yml? Or should we perhaps make the "Extra" labels entirely manual (non-automated)?

  13. raulcd commented on Jun 25, 2026

    @raulcd
    Member

    I'd personally remove them from the labeler.yml and make the extra labels completely manual. I don't think trying to be smart adding them automatically is that useful and I personally trigger them when I think a PR requires those jobs to be executed. Similar to how we trigger crossbow jobs basically.

  14. kou commented on Jun 25, 2026

    @kou
    Member

    I think that the answer isn't right.

    The labelar job is executed when PR is opened or synchronized (pushed):

    on:
    # TODO: Enable this when eps1lon/actions-label-merge-conflict is available.
    # push:
    # branches:
    # - master
    # - main
    pull_request_target:
    types:
    - opened
    - edited
    - synchronize

    - name: Assign GitHub labels
    if: |
    (github.event.action == 'opened' ||
    github.event.action == 'synchronize')
    uses: actions/labeler@v6
    with:
    repo-token: ${{ secrets.GITHUB_TOKEN }}
    configuration-path: .github/workflows/dev_pr/labeler.yml
    sync-labels: true

    The CI: Extra: C++ label isn't removed after you set it manually again #50125 (comment) and then you pushed to the branch again #50125 (comment) .

    If the answer is right, the CI: Extra: C++ label should be removed when you pushed to the branch again. But the CI: Extra: C++ label wasn't removed.

  15. added a commit that references this issue on Jun 29, 2026
  16. added a commit that references this issue on Jun 30, 2026
  17. added this to the 25.0.0 milestone on Jun 30, 2026
  18. raulcd commented on Jun 30, 2026

    @raulcd
    Member

    Issue resolved by pull request 50256
    #50256

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

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions