open-telemetry/opentelemetry-collector

Concurrency control does not work with merge queue

Closed this issue · 1 comments

If I try to add two PRs to the merge queue (like I just tried with #11833 and #11827) I get the following error:

Canceling since a higher priority waiting request for 'contrib-tests-' exists

(see e.g. https://github.com/open-telemetry/opentelemetry-collector/actions/runs/12259930519).

This happens because ${{ github.head_ref }} is empty in merge queue events here:

concurrency:
group: ${{ github.workflow }}-${{ github.head_ref }}
cancel-in-progress: true

(Thanks @jade-guiton-dd for looking into this!)

To solve this we can do one of the following:

  • Use github.ref github.sha (Jade thinks this would work, I would try this one first)
  • Use github.head_ref or github.event.merge_group.head_ref depending on the github.event_name