rickub/feedbackpublic Fork 0
main
Commits
Clone
git clone https://git.rickub.com/rickub/feedback.git
git clone ssh://git@rickub.com/rickub/feedback.git

CI: concurrency groups that mention github.ref all collapse into one group per ref #1

Closed@ogirardot opened this issue 5d ago · 1 comment
  • @ogirardot opened this issue · 5d ago

    Two workflows in the same repo with different concurrency groups that both use the ${{ github.ref }} idiom cancel each other.

    Observed on rickub/cli: ci.yml has group: ci-${{ github.ref }} and a new security.yml had group: security-${{ github.ref }}, both cancel-in-progress: true. On one push to main, the Security run started and CI run #15 was cancelled with no reason shown (RC, whose group is the literal rc, was unaffected).

    Cause (web/ci_dispatch.go, concurrencyGroup): any raw group containing the substring github.ref is replaced by "ref:" + ref, discarding the rest of the expression. So ci-…, security-…, and even ${{ github.workflow }}-${{ github.ref }} all become the same key. GitHub substitutes the expression inside the string instead, so the prefixes keep the groups distinct.

    Expected: substitute ${{ github.ref }} (and github.ref_name, github.workflow, …) within the group string rather than collapsing the whole group to the ref, or at minimum key the group on <workflow> + ref.

    Workaround used in rickub/cli: a verbatim group name per workflow.

  • @ogirardot · 5d ago

    Moved to rickub/rickub#192 (the server repo); closing here.

Sign in to comment.