Skip to content

add warning about env not specified to potentially risky wrangler commands#9344

Merged
dario-piotrowicz merged 11 commits intomainfrom
dario/DEVX-1785/no-env-specified-warning
Jun 13, 2025
Merged

add warning about env not specified to potentially risky wrangler commands#9344
dario-piotrowicz merged 11 commits intomainfrom
dario/DEVX-1785/no-env-specified-warning

Conversation

@dario-piotrowicz
Copy link
Copy Markdown
Member

@dario-piotrowicz dario-piotrowicz commented May 22, 2025

Fixes https://jira.cfdata.org/browse/DEVX-1785.

add warning about env not specified to potentially risky wrangler commands (for more details check the changeset)


  • Tests
    • TODO (before merge)
    • Tests included
    • Tests not necessary because:
  • Wrangler / Vite E2E Tests CI Job required? (Use "e2e" label or ask maintainer to run separately)
    • I don't know
    • Required
    • Not required because:
  • Public documentation
    • TODO (before merge)
    • Cloudflare docs PR(s):
    • Documentation not necessary because: DX improvement
  • Wrangler V3 Backport
    • TODO (before merge)
    • Wrangler PR:
    • Not necessary because: this change can't easily be backported, so I think that not doing so here is valid, I'm happy to reconsider if someone disagrees1

Footnotes

  1. The main issue is that this change is built upon the changes made in https://github.com/cloudflare/workers-sdk/pull/8966 (where createCommand is being introduced for the various commands) which is not backported, so potentially a different solution would need to be implemented for this in order to do a v3 backport

@dario-piotrowicz dario-piotrowicz requested a review from a team as a code owner May 22, 2025 22:47
@dario-piotrowicz dario-piotrowicz added the e2e Run wrangler + vite-plugin e2e tests on a PR label May 22, 2025
@changeset-bot
Copy link
Copy Markdown

changeset-bot bot commented May 22, 2025

🦋 Changeset detected

Latest commit: 40cd2ec

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

This PR includes changesets to release 2 packages
Name Type
wrangler 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

Failed to automatically backport this PR's changes to Wrangler v3. Please manually create a PR targeting the v3-maintenance branch with your changes. Thank you for helping us keep Wrangler v3 supported!

Depending on your changes, running git rebase --onto v3-maintenance main dario/DEVX-1785/no-env-specified-warning might be a good starting point.

@github-actions
Copy link
Copy Markdown
Contributor

A Wrangler prerelease is available for testing. You can install this latest build in your project with:

npm install --save-dev https://prerelease-registry.devprod.cloudflare.dev/workers-sdk/runs/15198288351/npm-package-wrangler-9344
Prereleases for other packages:

cloudflare-workers-bindings-extension:

wget https://prerelease-registry.devprod.cloudflare.dev/workers-sdk/runs/15198288351/npm-package-cloudflare-workers-bindings-extension-9344 -O ./cloudflare-workers-bindings-extension.0.0.0-vbdc16482a.vsix && code --install-extension ./cloudflare-workers-bindings-extension.0.0.0-vbdc16482a.vsix

create-cloudflare:

npx https://prerelease-registry.devprod.cloudflare.dev/workers-sdk/runs/15198288351/npm-package-create-cloudflare-9344 --no-auto-update

@cloudflare/kv-asset-handler:

npm install https://prerelease-registry.devprod.cloudflare.dev/workers-sdk/runs/15198288351/npm-package-cloudflare-kv-asset-handler-9344

miniflare:

npm install https://prerelease-registry.devprod.cloudflare.dev/workers-sdk/runs/15198288351/npm-package-miniflare-9344

@cloudflare/pages-shared:

npm install https://prerelease-registry.devprod.cloudflare.dev/workers-sdk/runs/15198288351/npm-package-cloudflare-pages-shared-9344

@cloudflare/unenv-preset:

npm install https://prerelease-registry.devprod.cloudflare.dev/workers-sdk/runs/15198288351/npm-package-cloudflare-unenv-preset-9344

@cloudflare/vite-plugin:

npm install https://prerelease-registry.devprod.cloudflare.dev/workers-sdk/runs/15198288351/npm-package-cloudflare-vite-plugin-9344

@cloudflare/vitest-pool-workers:

npm install https://prerelease-registry.devprod.cloudflare.dev/workers-sdk/runs/15198288351/npm-package-cloudflare-vitest-pool-workers-9344

@cloudflare/workers-editor-shared:

npm install https://prerelease-registry.devprod.cloudflare.dev/workers-sdk/runs/15198288351/npm-package-cloudflare-workers-editor-shared-9344

@cloudflare/workers-shared:

npm install https://prerelease-registry.devprod.cloudflare.dev/workers-sdk/runs/15198288351/npm-package-cloudflare-workers-shared-9344

@cloudflare/workflows-shared:

npm install https://prerelease-registry.devprod.cloudflare.dev/workers-sdk/runs/15198288351/npm-package-cloudflare-workflows-shared-9344

Note that these links will no longer work once the GitHub Actions artifact expires.

@dario-piotrowicz dario-piotrowicz force-pushed the dario/DEVX-1785/no-env-specified-warning branch from 3b79c91 to 8fd3589 Compare June 10, 2025 21:01
@pkg-pr-new
Copy link
Copy Markdown

pkg-pr-new bot commented Jun 10, 2025

create-cloudflare

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

@cloudflare/kv-asset-handler

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

miniflare

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

@cloudflare/pages-shared

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

@cloudflare/unenv-preset

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

@cloudflare/vite-plugin

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

@cloudflare/vitest-pool-workers

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

@cloudflare/workers-editor-shared

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

wrangler

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

commit: 40cd2ec

@dario-piotrowicz dario-piotrowicz force-pushed the dario/DEVX-1785/no-env-specified-warning branch 4 times, most recently from c1f2cc4 to aeab127 Compare June 12, 2025 14:16
@dario-piotrowicz dario-piotrowicz force-pushed the dario/DEVX-1785/no-env-specified-warning branch from aeab127 to cd1e378 Compare June 12, 2025 15:51
@github-project-automation github-project-automation bot moved this from Untriaged to Approved in workers-sdk Jun 13, 2025
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.

2 nits

dario-piotrowicz and others added 2 commits June 13, 2025 17:19
Co-authored-by: Pete Bacon Darwin <pete@bacondarwin.com>
@dario-piotrowicz
Copy link
Copy Markdown
Member Author

2 nits

Both addressed, thank you very much! 🙏

@dario-piotrowicz dario-piotrowicz added this pull request to the merge queue Jun 13, 2025
Merged via the queue into main with commit 02e2c1e Jun 13, 2025
19 checks passed
@dario-piotrowicz dario-piotrowicz deleted the dario/DEVX-1785/no-env-specified-warning branch June 13, 2025 17:08
@github-project-automation github-project-automation bot moved this from Approved to Done in workers-sdk Jun 13, 2025
jseba added a commit to jseba/workers-sdk that referenced this pull request Jun 14, 2025
* 'main' of ssh://github.com/cloudflare/workers-sdk: (213 commits)
  fix(vite-plugin-cloudflare): allow unknown entrypoint on startup (cloudflare#9583)
  add warning about env not specified to potentially risky wrangler commands (cloudflare#9344)
  test: correctly delete test d1 databases (cloudflare#9598)
  Add details to v3 maintenance worflow error message (cloudflare#9602)
  drop unused `WRANGLER_UNENV_RESOLVE_PATHS` env var (cloudflare#9593)
  warn instead of erroring if no exposed ports. and remove unused dev_exposed_ports (cloudflare#9573)
  fix(wrangler): point to the right doc location (replaces cloudflare#9353) (cloudflare#9592)
  [vitest-pool-worker] Add `type: module` in package.json (cloudflare#9595)
  Enable HTML handling for HTML files in the public directory (cloudflare#9548)
  switch from go container to js (cloudflare#9588)
  containers: switch to Cloudflare container registry (cloudflare#9564)
  performance improvement: restart a mixed mode session only if the worker's remote bindings have changed (cloudflare#9536)
  ci: delete more orphaned resources from e2e tests (cloudflare#9580)
  test: remove `verifyBuildScript` logic from c3 e2e tests (cloudflare#9504)
  fix(vite-plugin): ensure node compat globals are injected before any imports (cloudflare#9581)
  feat(containers-shared): Move `isDockerfile` utility function to `containers-shared` (cloudflare#9577)
  allow `startWorker` to accept `false` as an `inspector` option (to disable the inspector server) (cloudflare#9550)
  Update capnp generated code from the workerd.capnp (cloudflare#9582)
  Bump `@cloudflare/unenv-preset` to 2.3.3 (cloudflare#9566)
  test: make custom build bundling tests more robust (cloudflare#9494)
  ...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

e2e Run wrangler + vite-plugin e2e tests on a PR

Projects

Archived in project

Development

Successfully merging this pull request may close these issues.

3 participants