Skip to content

Conversation

@devin-ai-integration
Copy link
Contributor

@devin-ai-integration devin-ai-integration bot commented Oct 30, 2025

Devin PR requested by @southpolesteve

Addresses PR feedback on #11139 to improve cron trigger documentation and user-facing messaging.

Changes

Updated endpoint from legacy to current:

  • Changed /cdn-cgi/mf/scheduled/cdn-cgi/handler/scheduled throughout codebase
  • Updated warning message in packages/wrangler/src/dev/miniflare/index.ts
  • Updated both template files (new-worker-scheduled.js and .ts)

Improved warning message UX:

  • Removed "Miniflare" implementation detail from user-facing message
  • Changed "run wrangler dev --local" to just show the curl command (since warning appears during dev)
  • Replaced manual didWarnMiniflareCronSupport flag with logger.once.warn()
  • Made host/port dynamic using config.initialIp and config.initialPort
  • Added IPv6 support (brackets) and 0.0.0.0/:: → localhost conversion

Fixed documentation links:

  • Updated fragment from #test-cron-triggers to #test-cron-triggers-locally

Review Focus Areas

  1. Host/Port Logic (packages/wrangler/src/dev/miniflare/index.ts:830-836): IPv6 detection using .includes(":") - verify this handles all edge cases correctly
  2. Endpoint Change: Confirm /cdn-cgi/handler/scheduled is universally correct and won't break existing workflows
  3. Template Instructions: Verify wrangler dev (without --local) is the correct recommendation for testing cron triggers

- Updated documentation links to point to the correct cron triggers page
- Inlined instructions for testing cron triggers locally in the error message
- Users now see the curl command directly in the warning instead of having to click through to docs

Co-Authored-By: Steve Faulkner <southpolesteve@gmail.com>
@devin-ai-integration
Copy link
Contributor Author

🤖 Devin AI Engineer

I'll be helping with this pull request! Here's what you should know:

✅ I will automatically:

  • Address comments on this PR. Add '(aside)' to your comment to have me ignore it.
  • Look at CI failures and help fix them

Note: I can only respond to comments from users who have write access to this repository.

⚙️ Control Options:

  • Disable automatic comment and CI monitoring

@changeset-bot
Copy link

changeset-bot bot commented Oct 30, 2025

🦋 Changeset detected

Latest commit: 9444d73

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

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

@pkg-pr-new
Copy link

pkg-pr-new bot commented Oct 30, 2025

create-cloudflare

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

@cloudflare/kv-asset-handler

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

miniflare

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

@cloudflare/pages-shared

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

@cloudflare/unenv-preset

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

@cloudflare/vite-plugin

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

@cloudflare/vitest-pool-workers

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

@cloudflare/workers-editor-shared

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

@cloudflare/workers-utils

npm i https://pkg.pr.new/@cloudflare/workers-utils@11139

wrangler

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

commit: 9444d73

Changed 'Miniflare does not currently trigger scheduled Workers automatically' to 'Scheduled Workers are not automatically triggered during local development' to make the message more user-friendly and avoid referencing internal implementation details.

Co-Authored-By: Steve Faulkner <southpolesteve@gmail.com>
…ve messaging

- Update curl endpoint from /cdn-cgi/mf/scheduled to /cdn-cgi/handler/scheduled
- Replace manual didWarnMiniflareCronSupport flag with logger.once.warn()
- Remove 'wrangler dev --local' recommendation since warning appears during dev
- Make host/port dynamic using config.initialIp and config.initialPort
- Handle IPv6 addresses with brackets and 0.0.0.0/:: as localhost
- Update template files to use new endpoint and remove --local flag

Co-Authored-By: Steve Faulkner <southpolesteve@gmail.com>
@devin-ai-integration
Copy link
Contributor Author

Thanks for the feedback! I've addressed all your comments:

  1. Updated endpoint: Changed from /cdn-cgi/mf/scheduled (legacy) to /cdn-cgi/handler/scheduled
  2. Switched to logger.once.warn(): Removed the manual didWarnMiniflareCronSupport flag
  3. Removed --local recommendation: Since this warning appears during a wrangler dev session, I reworded it to just show the curl command without suggesting to start a new dev session
  4. Made host/port dynamic: Using config.initialIp and config.initialPort with special handling for:
    • 0.0.0.0 or :: → displays as localhost
    • IPv6 addresses (containing :) → wrapped in brackets [...]

All changes have been pushed and are ready for review!

@github-project-automation github-project-automation bot moved this from Untriaged to Approved in workers-sdk Oct 31, 2025
@petebacondarwin petebacondarwin marked this pull request as ready for review October 31, 2025 12:37
@petebacondarwin petebacondarwin requested a review from a team as a code owner October 31, 2025 12:37
@petebacondarwin petebacondarwin merged commit bb00f9d into main Oct 31, 2025
52 of 59 checks passed
@github-project-automation github-project-automation bot moved this from Approved to Done in workers-sdk Oct 31, 2025
@petebacondarwin petebacondarwin deleted the devin/1761845972-fix-cron-docs-link branch October 31, 2025 12:42
@workers-devprod workers-devprod added the contribution [Holopin] Recognizes an open-source contribution, big or small label Oct 31, 2025
@holopin-bot
Copy link

holopin-bot bot commented Oct 31, 2025

Congratulations @devin-ai-integration[bot], the maintainer of this repository has issued you a holobyte! Here it is: https://holopin.io/holobyte/cmheug8zz007tl804vqtbg8yk

This badge can only be claimed by you, so make sure that your GitHub account is linked to your Holopin account. You can manage those preferences here: https://holopin.io/account.
Or if you're new to Holopin, you can simply sign up with GitHub, which will do the trick!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

contribution [Holopin] Recognizes an open-source contribution, big or small

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

4 participants