-
Notifications
You must be signed in to change notification settings - Fork 1.1k
fix wrangler dev logs being logged on the incorrect level in some cases #10004
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
Conversation
🦋 Changeset detectedLatest commit: b3ccc35 The changes in this PR will be included in the next version bump. This PR includes changesets to release 5 packages
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 |
create-cloudflare
@cloudflare/kv-asset-handler
miniflare
@cloudflare/pages-shared
@cloudflare/unenv-preset
@cloudflare/vite-plugin
@cloudflare/vitest-pool-workers
@cloudflare/workers-editor-shared
wrangler
commit: |
36f2c53 to
376b15d
Compare
73df5c3 to
ba19731
Compare
80669b8 to
fdf3ecb
Compare
|
@danlapid I've added you as a reviewer just in case you were interested since you added the structured logging feature to workerd 🙌 🫶 |
🥳 🥳 🥳 |
Hey @danlapid 🙂 All very good generally thanks 🫶 One thing that I thought could be a bit problematic but I am getting worried that it could be quite problematic is this regex: https://github.com/cloudflare/workers-sdk/blob/fdf3ecbf8b07c5193a0d5215e4c193059719182a/packages/wrangler/src/dev/miniflare.ts#L1192C3-L1192C74 I can be quite brittle.... I will try to make it more robust (I need to add some more testing around this 🤔) But however much I can improve it, I feel like it can always be a bit brittle to some extent 🤔 (since user logs can literally have anything in them...) |
Why not just use a json parser? |
mh... yeah that's a good point! Thanks I'll try that 🙂👍 |
fdf3ecb to
f478ebd
Compare
b23b844 to
5eb20bc
Compare
Nice! I actually didn't know that they were consistently divided by newlines 😃 Thanks for the suggestion, I've applied that and it seems to work very nicely 🫶 |
5d14fec to
98b0c9e
Compare
| QUEUE: 11, | ||
| ANALYTICS_ENGINE: 12, | ||
| HYPERDRIVE: 13, | ||
| DURABLE_OBJECT_CLASS: 14, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this is all auto-generated right? but do you why the DO stuff has been added in? is this just because we haven't updated this file recently since the facets stuff was added to the runtime? i wonder if this is something we should automate
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yeah this was automatically generated via
| "capnp:workerd": "node scripts/build-capnp.mjs", |
honestly I haven't really looked much at the changes in the file 😕 (as it just works and doesn't seem to break anything)
I guess it can be periodically automated, but I think that there's no much benefit in it since the file only needs to update when miniflare needs to pass new/different capnp configs, and that updating it only when necessary makes sense to me 🤔
(In other words, I think that the file getting updated when Miniflare doesn't use the new options is not going to have any effect anyways)
I'd be keen to hear what @penalosa thinks of this 🙂
812faac to
f6e1b92
Compare
|
PR converted to draft as I think it now needs to wait for cloudflare/workerd#4620 to be merged (released and bumped in wrangler). Also a test for top level errors (like the one I mentioned above) that would get logged onto stderr, should be added. |
384679f to
c6e5510
Compare
0f7df5e to
d25e783
Compare
|
I've added the |
2dc6b72 to
b3ccc35
Compare
…rect level in some cases (#10015) * [miniflare] add `structuredWorkerdLogs` option * fix `wrangler dev` logs being logged on the incorrect level in some cases * update lock file * adapt tests for v3
Fixed https://jira.cfdata.org/browse/DEVX-2087
Fixes #8063