Skip to content

Scope Vercel concurrency groups by project ID - #178

Merged
aaronmedina-dev merged 1 commit into
mainfrom
fix/vercel-per-project-concurrency-groups
Aug 26, 2026
Merged

Scope Vercel concurrency groups by project ID#178
aaronmedina-dev merged 1 commit into
mainfrom
fix/vercel-per-project-concurrency-groups

Conversation

@aaronmedina-dev

@aaronmedina-dev aaronmedina-dev commented Aug 26, 2026

Copy link
Copy Markdown
Contributor

Description of the proposed changes

vercel-preview.yml and vercel-production.yml key their concurrency groups only on the PR number and the ref:

# vercel-preview.yml
group: vercel-preview-${{ github.event.pull_request.number }}   # cancel-in-progress: true
# vercel-production.yml
group: vercel-production-${{ github.ref }}                      # cancel-in-progress: false

The two failure modes:

  • Preview (cancel-in-progress: true) both jobs resolve to the same group, so whichever is admitted second cancels the other. Only one project ever gets a preview, and which one wins is a race.
  • Production (cancel-in-progress: false) the jobs queue rather than cancel, so a single push does deploy both. But GitHub keeps only one pending entry per concurrency group, so a second push landing while the first run is still in flight evicts the still-pending deploy. That failure is silent: green run, no deploy.

The change

Add vercel-project-id to both group keys. Each project gets an independent group, and same-project behaviour is unchanged previews still supersede on a new commit, production deploys for a given project still queue in order.

The vercel-preview and vercel-production concurrency groups were keyed only on
the PR number and the ref respectively. A repo that calls either workflow once
per Vercel project put every call into the same group, so the projects fought
each other instead of deploying independently.

vercel-preview used cancel-in-progress: true, so the second job cancelled the
first and only one project ever got a preview. vercel-production used
cancel-in-progress: false, so the jobs queued; because GitHub keeps only one
pending entry per group, a second push while the first run was in flight
evicted the still-pending deploy and dropped it silently.

Adding vercel-project-id to both group keys gives each project an independent
group. Same-project behaviour is unchanged: previews still supersede on a new
commit, production deploys for one project still queue in order.

The PR comment marker had the same problem and is now scoped per project, so
each project keeps its own comment instead of overwriting another's.
@aaronmedina-dev
aaronmedina-dev requested a review from a team as a code owner August 26, 2026 00:48
@aaronmedina-dev
aaronmedina-dev merged commit 395f918 into main Aug 26, 2026
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants