Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

refactor(wrangler): runWranglerDev always log error #7907

Merged
merged 1 commit into from
Jan 27, 2025
Merged

Conversation

vicb
Copy link
Contributor

@vicb vicb commented Jan 25, 2025

@petebacondarwin this is reverting one change you made a couple weeks ago.

I had CI (and local) that were impossible to debug without this.

I see that you mention that the logs would be printed on timeout anyway... but that's unless your test timeout is less than the timeout in runLongLivedWrangler - it is the case with the failures I had (30 vs 50s in updated file).

Adding stderr only should hopefully not be too spammy?


  • Tests
    • TODO (before merge)
    • Tests included
    • Tests not necessary because: tested locally
  • E2E Tests CI Job required? (Use "e2e" label or ask maintainer to run separately)
    • I don't know
    • Required
    • Not required because: not affected
  • Public documentation
    • TODO (before merge)
    • Cloudflare docs PR(s):
    • Documentation not necessary because: no user facing change

Copy link

changeset-bot bot commented Jan 25, 2025

⚠️ No Changeset found

Latest commit: bc0a189

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

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

Copy link
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/12963461044/npm-package-wrangler-7907

You can reference the automatically updated head of this PR with:

npm install --save-dev https://prerelease-registry.devprod.cloudflare.dev/workers-sdk/prs/7907/npm-package-wrangler-7907

Or you can use npx with this latest build directly:

npx https://prerelease-registry.devprod.cloudflare.dev/workers-sdk/runs/12963461044/npm-package-wrangler-7907 dev path/to/script.js
Additional artifacts:

cloudflare-workers-bindings-extension:

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

create-cloudflare:

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

@cloudflare/kv-asset-handler:

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

miniflare:

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

@cloudflare/pages-shared:

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

@cloudflare/unenv-preset:

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

@cloudflare/vite-plugin:

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

@cloudflare/vitest-pool-workers:

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

@cloudflare/workers-editor-shared:

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

@cloudflare/workers-shared:

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

@cloudflare/workflows-shared:

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

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


[email protected] includes the following runtime dependencies:

Package Constraint Resolved
miniflare workspace:* 3.20250124.0
workerd 1.20250124.0 1.20250124.0
workerd --version 1.20250124.0 2025-01-24

Please ensure constraints are pinned, and miniflare/workerd minor versions match.

@vicb vicb requested a review from petebacondarwin January 25, 2025 08:45
@petebacondarwin
Copy link
Contributor

I am not convinced this is the right thing to do. When the tests are passing we do not want to see all these logs.
Locally it is enough to just add the WRANGLER_LOG env var and you get the logging back for debugging.

I'd prefer to look into how we could capture the logs in CI for tests that fail without constantly spamming the output.

@petebacondarwin
Copy link
Contributor

Rather worryingly, the fixtures that depend upon this e.g. additional-modules got a cache hit, which means that Turbo didn't realise that they had a dependency on fixtures/shared. So it is not easy to see in the current CI runs what the impact of this change is.

@vicb
Copy link
Contributor Author

vicb commented Jan 25, 2025

This would only display errors though.
Maybe we could have an extra option to silent errors when they are expected?

Yes the problem is mostly CI as it used different platforms which make it impossible to test locally - in my case the error was reproducible locally but seeing the error on the CI would have speed up the process

Copy link
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.

OK so I had a play around and I think that the stderr is pretty minimal when there are no failures. Can you confirm that this would have actually shown you the errors you needed @vicb?

@petebacondarwin petebacondarwin merged commit 7d0be5f into main Jan 27, 2025
39 of 40 checks passed
@petebacondarwin petebacondarwin deleted the log/errors branch January 27, 2025 12:57
@vicb
Copy link
Contributor Author

vicb commented Jan 27, 2025

Can you confirm that this would have actually shown you the errors you needed @vicb?

Yes it does - thanks for merging!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

2 participants