Skip to content
This repository has been archived by the owner on Aug 3, 2023. It is now read-only.

Account ID is not loaded when setting up cron triggers #2021

Closed
lujjjh opened this issue Aug 8, 2021 · 0 comments · Fixed by #2023
Closed

Account ID is not loaded when setting up cron triggers #2021

lujjjh opened this issue Aug 8, 2021 · 0 comments · Fixed by #2023
Assignees
Labels
bug Something isn't working regression Something is broken, but works in previous releases

Comments

@lujjjh
Copy link

lujjjh commented Aug 8, 2021

🐛 Bug report

Describe the bug

After I configured triggers.crons in the wrangler.toml, wrangler publish failed with the messages below:

✨  Build completed successfully!
Error: Something went wrong with the request to Cloudflare...
Could not route to /accounts/workers/scripts/***/schedules, perhaps your object identifier is invalid? [API code: 7003]
No route for that URI [API code: 7000]

Note that :account_id is missing in the API URL.

I went through the code and discovered that account_id is not loaded when constructing the DeployTarget::Schedule.

https://github.com/cloudflare/wrangler/blob/d2f49e2d800c72160963952314f35ac0e72644f3/src/settings/toml/manifest.rs#L277

Reproduce the bug

A list of steps to reproduce the bug.

  1. In any wrangler project, add triggers.crons = ["*/5 * * * *"] to the wrangler.toml.
  2. Run wrangler publish without any CF_* environment variables.

Expected behavior

Cron triggers are configured without errors.

Environment and versions

Fill out the following information about your environment.

  • operating system: Ubuntu 20.04
  • output of wrangler -V: wrangler 1.19.0
  • output of node -v: v16.6.1
  • content of wrangler.toml:
name = "***"
type = "javascript"
workers_dev = true

[triggers]
crons = ["*/5 * * * *"]
@lujjjh lujjjh added the bug Something isn't working label Aug 8, 2021
@Electroid Electroid added the regression Something is broken, but works in previous releases label Aug 8, 2021
@jyn514 jyn514 self-assigned this Aug 9, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Something isn't working regression Something is broken, but works in previous releases
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants