Copilot commented on code in PR #2172:
URL: https://github.com/apache/nifi-minifi-cpp/pull/2172#discussion_r3201412361
##########
.github/workflows/ci.yml:
##########
@@ -5,6 +5,9 @@ on:
workflow_dispatch:
schedule:
- cron: '0 1 * * 1'
+concurrency:
+ group: ${{ github.workflow }}-${{ github.ref }}
Review Comment:
`group` uses `github.ref`, which differs between `push`
(`refs/heads/<branch>`) and `pull_request` (`refs/pull/<n>/merge`). That means
CI runs triggered by both events on the same branch will not share a
concurrency group and won’t cancel each other, so this may not actually prevent
the “double starting” mentioned in the PR description. Consider grouping by the
head branch name for PRs (e.g., `github.head_ref` /
`github.event.pull_request.head.ref`) and falling back to `github.ref_name` for
non-PR events so both triggers map to the same key.
##########
.github/workflows/ci.yml:
##########
@@ -5,6 +5,9 @@ on:
workflow_dispatch:
schedule:
- cron: '0 1 * * 1'
+concurrency:
+ group: ${{ github.workflow }}-${{ github.ref }}
+ cancel-in-progress: ${{ github.event_name != 'workflow_dispatch' }}
Review Comment:
`cancel-in-progress` is enabled for `schedule` runs as well (anything except
`workflow_dispatch`). Since scheduled runs always use the default branch ref,
they can be cancelled by (or cancel) normal `push`/`pull_request` CI on `main`,
potentially causing the weekly scheduled run to never complete. If the schedule
is intended to be a periodic baseline check, consider excluding `schedule` from
cancellation or using a separate concurrency group for scheduled runs.
--
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]