You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Updated CI workflows to avoid race conditions on PRs with concurrency label (#778)
**Context:**
Currently there exists a race condition within the CI due to
misconfiguration of the concurrency label.
This PR updates the affected workflows to fix the concurrency labels.
**Description of the Change:**
`${{ github.event }}` is not a string, but rather an object, when you
have that in the concurrency label you get:
```yaml
# Label
group: my-workflow-${{ github.event }}-${{ github.ref }}
# Renders as
group: my-workflow-[object Object]-refs/heads/my-branch
```
This was causing workflows that had `pull_request` and `workflow_call`
triggers to overstep on each other's runtime as they both rendered with
the same concurrency label.
This PR changes the attribute to use the correct string name
`event_name`.
```yaml
# Label
group: my-workflow-${{ github.event_name }}-${{ github.ref }}
# Renders as
group: my-workflow-pull_request-refs/heads/my-branch
```
**Benefits:**
Race conditions averted. No random job cancellations especially when PR
needs wheels built.
**Possible Drawbacks:**
None.
**Related GitHub Issues:**
None.
[sc-66955](https://app.shortcut.com/xanaduai/story/66955/fix-bug-in-lightning-ci-causing-race-conditions-of-parallel-job-runs)
---------
Co-authored-by: ringo-but-quantum <[email protected]>
Co-authored-by: AmintorDusko <[email protected]>
Co-authored-by: Ali Asadi <[email protected]>
0 commit comments