lhotari opened a new pull request, #25968:
URL: https://github.com/apache/pulsar/pull/25968
### Motivation
The **Pull Request Labeler** workflow (`.github/workflows/labeler.yml`)
triggers on
`pull_request_target`. For `pull_request_target` events, `github.ref`
resolves to the
**base branch** (`refs/heads/master`) rather than `refs/pull/<n>/merge` as
it would for
`pull_request` events. The concurrency group was:
```yaml
group: ${{ github.workflow }}-${{ github.ref }}-${{ github.event_name }}
```
so it evaluated to the same value — `Pull Request
Labeler-refs/heads/master-pull_request_target` —
for **every** open PR targeting `master`. With `cancel-in-progress: true`, a
labeler run for one
PR would cancel the in-progress run of an *unrelated* PR, producing errors
like:
```
Canceling since a higher priority waiting request for
Pull Request Labeler-refs/heads/master-pull_request_target exists
```
### Modifications
- Add the PR number (`github.event.number`) to the concurrency group so each
PR gets its own
group and runs only cancel earlier runs of the **same** PR.
- Restrict the trigger to changes under `pip/**` via a `paths` filter. That
matches the only
labeling rule defined in `.github/labeler.yml` (the `PIP` label for
`pip/**`), so the workflow
no longer runs when nothing labelable changed — which also reduces
contention on the
concurrency group.
- Add a comment in `.github/labeler.yml` documenting the coupling between
the rules file and the
workflow's `paths` filter.
### Verifying this change
- [x] Make sure that the change passes the CI checks.
This change is a trivial rework / code cleanup without any test coverage. It
only modifies
GitHub Actions workflow configuration.
### Does this pull request potentially affect one of the following parts:
*If the box was checked, please highlight the changes*
- [ ] Dependencies (add or upgrade a dependency)
- [ ] The public API
- [ ] The schema
- [ ] The default values of configurations
- [ ] The threading model
- [ ] The binary protocol
- [ ] The REST endpoints
- [ ] The admin CLI options
- [ ] The metrics
- [ ] Anything that affects deployment
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]