Skip to content

[wrangler] fix: prevent multiple workflows definition with same name#10179

Merged
pombosilva merged 3 commits intomainfrom
osilva/prevent-workflows-with-same-name-definition
Aug 7, 2025
Merged

[wrangler] fix: prevent multiple workflows definition with same name#10179
pombosilva merged 3 commits intomainfrom
osilva/prevent-workflows-with-same-name-definition

Conversation

@pombosilva
Copy link
Copy Markdown
Contributor

@pombosilva pombosilva commented Aug 1, 2025

Fixes WOR-795

Users should not be allowed to define multiple workflows with the same "name" property within a single Wrangler jsonc/toml file. If duplicate names are allowed, only the last-defined workflow would be active, as it would overwrite any earlier workflows with the same name.

To fix this, the code now includes a check for duplicate "name" properties within the workflows array.


@pombosilva pombosilva requested a review from a team as a code owner August 1, 2025 16:11
@changeset-bot
Copy link
Copy Markdown

changeset-bot bot commented Aug 1, 2025

🦋 Changeset detected

Latest commit: 7b0363c

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 3 packages
Name Type
wrangler Patch
@cloudflare/vite-plugin Patch
@cloudflare/vitest-pool-workers Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Aug 1, 2025

These changes have been automatically backported to Wrangler v3 🎉 You can view the automatically updated PR at v3-maintenance...v3-backport-10179. Please check that PR for correctness, and make sure it's merged after this one. Thank you for helping us keep Wrangler v3 supported!

@pkg-pr-new
Copy link
Copy Markdown

pkg-pr-new bot commented Aug 1, 2025

create-cloudflare

npm i https://pkg.pr.new/create-cloudflare@10179

@cloudflare/kv-asset-handler

npm i https://pkg.pr.new/@cloudflare/kv-asset-handler@10179

miniflare

npm i https://pkg.pr.new/miniflare@10179

@cloudflare/pages-shared

npm i https://pkg.pr.new/@cloudflare/pages-shared@10179

@cloudflare/unenv-preset

npm i https://pkg.pr.new/@cloudflare/unenv-preset@10179

@cloudflare/vite-plugin

npm i https://pkg.pr.new/@cloudflare/vite-plugin@10179

@cloudflare/vitest-pool-workers

npm i https://pkg.pr.new/@cloudflare/vitest-pool-workers@10179

@cloudflare/workers-editor-shared

npm i https://pkg.pr.new/@cloudflare/workers-editor-shared@10179

wrangler

npm i https://pkg.pr.new/wrangler@10179

commit: 7b0363c

@petebacondarwin petebacondarwin force-pushed the osilva/prevent-workflows-with-same-name-definition branch from 8b17304 to b4e18f4 Compare August 4, 2025 07:42
Copy link
Copy Markdown
Contributor

@petebacondarwin petebacondarwin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for adding this @pombosilva - can you add a test for it somewhere... I know we discussed the fact that the other workflow stuff is tested separately to the standard config validation code.

@github-project-automation github-project-automation bot moved this from Untriaged to In Review in workers-sdk Aug 4, 2025
@petebacondarwin petebacondarwin marked this pull request as draft August 4, 2025 13:45
@pombosilva pombosilva force-pushed the osilva/prevent-workflows-with-same-name-definition branch from 06b751a to 8b6f00b Compare August 4, 2025 14:48
@github-project-automation github-project-automation bot moved this from In Review to Approved in workers-sdk Aug 5, 2025
@pombosilva pombosilva force-pushed the osilva/prevent-workflows-with-same-name-definition branch 3 times, most recently from bff8dd2 to ac04b76 Compare August 6, 2025 16:28
@pombosilva pombosilva force-pushed the osilva/prevent-workflows-with-same-name-definition branch from ac04b76 to 7b0363c Compare August 6, 2025 17:10
@pombosilva pombosilva marked this pull request as ready for review August 7, 2025 07:23
@pombosilva pombosilva merged commit 5d5ecd5 into main Aug 7, 2025
37 of 38 checks passed
@pombosilva pombosilva deleted the osilva/prevent-workflows-with-same-name-definition branch August 7, 2025 10:55
@github-project-automation github-project-automation bot moved this from Approved to Done in workers-sdk Aug 7, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Archived in project

Development

Successfully merging this pull request may close these issues.

3 participants