cloudflare / workers-sdk

โ›…๏ธ Home to Wrangler, the CLI for Cloudflare Workersยฎ
https://developers.cloudflare.com/workers/
Apache License 2.0
2.53k stars 647 forks source link

๐Ÿ› BUG: npm create cloudflare => Deploy doesn't prompt to auto-report bug? #6230

Open irvinebroque opened 1 month ago

irvinebroque commented 1 month ago

Which Cloudflare product(s) does this pertain to?

C3

What version(s) of the tool(s) are you using?

2.21.9

What version of Node are you using?

v22.3.0

What operating system and version are you using?

Sonoma 14.5

Describe the Bug

  1. Run npm create cloudflare
  2. Select the hello world template
  3. Choose the option to deploy
  4. Observe (what looks like an intermittent) error
  5. Observe that the failure prompts you to report an issue here on the cloudflare/workers-sdk repository, but appears to skip over the automated error reporting
"? Would you like to report this error to Cloudflare?
๐Ÿค– Using fallback value in non-interactive context: no"
...
โ”œ Selecting Cloudflare account retrieving accounts 
โ”‚ account more than one account available
โ”‚ 
โ”œ Which account do you want to use?
โ”‚ account ACCOUNT
โ”‚
โ”œ Deploying your application 
โ”‚ 
> service-binding-to@0.0.0 deploy
> wrangler deploy

 โ›…๏ธ wrangler 3.63.1
-------------------

Total Upload: 0.19 KiB / gzip: 0.16 KiB

โœ˜ [ERROR] fetch failed

If you think this is a bug then please create an issue at https://github.com/cloudflare/workers
-sdk/issues/new/choose
? Would you like to report this error to Cloudflare?
๐Ÿค– Using fallback value in non-interactive context: no
๐Ÿชต  Logs were written to
...

It's not clear to me if the bug was automatically reported, or if I need to report it.

Please provide a link to a minimal reproduction

No response

Please provide any relevant error logs

No response

Babuprasanth27 commented 1 month ago

@irvinebroque hey interested in fixing this issue. Assign to me.

penalosa commented 1 month ago

I'm pretty certain this is because we're running wrangler deploy non-interactively from C3, which means that we don't prompt the user (and instead fallback to the default value, which is not to report).

@Babuprasanth27 we'd be happy to accept a PR to fix this! You'll probably want to look at how create-cloudflare runs subcommands, and make sure that it runs wrangler deploy interactively. You should be able to draw inspiration from how it runs framework subcommands like create-vue, which are currently run interactively.