Finish the skipped Durable Object storage instrumentation tests - #200
Finish the skipped Durable Object storage instrumentation tests#200ayaangazali wants to merge 1 commit into
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (1)
🔗 Linked repositories identifiedCodeRabbit considers these linked repositories for cross-repo context during reviews:
📝 WalkthroughWalkthroughThe tests now cover rejected 🚥 Pre-merge checks | ✅ 4✅ Passed checks (4 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
|
The whole Cloudflare instrumentation package/approach needs reconsideration. After we made this package, Cloudflare themselves added excellent first-party OTel support (with the exception of missing way to send manual spans, which I guess will come soon), so the value of a third-party package is quite questionable. |
8b7e85d to
90f1cdf
Compare
|
Rebased onto current main (817fca1) and re-verified there, since the original run was against a base from before the dependency refresh in #212. State on HEAD: the 5 No code changes, tests only. Ready whenever you want it. |
petyosi
left a comment
There was a problem hiding this comment.
Reviewed the full diff and relevant surrounding code. No significant correctness, failure-mode, compatibility, or test-coverage issues found.
90f1cdf to
7fed54d
Compare
|
Rebased onto current main (79bcac0) and re-verified there. State on HEAD: the 5 Tests only, no source change. Let me know if you would rather I close it. |
|
You approved this on 08-10 and it has been green and conflict-free since. It is still clean against I am not asking you to prioritise it. I am asking whether approved-but-unmerged is a state you are holding deliberately, because I have a few in that state and I would rather close them than have them sit in your queue looking like work you owe me. Happy either way. Tests only, no source change. |
packages/otel-cf-workers/test/instrumentation/do-storage.test.tshad fivetest.skipcases that were left unfinished, so the rejection path ofinstrumentStoragehad no coverage at all. Three of them calledtoMatchInlineSnapshot()with no argument, the other two still expected the pre-semconv shape (do:storage:deleteAllas the span name, bareallowConcurrency/hasResultattributes), and thegetone mockedstorage.getto reject while actually callinginstrument.list(). All five also assertedeventswas empty, which cannot hold on a rejection since the instrumentation records an exception event.This enables all five and writes the assertions against current behavior: the
Durable Object Storage <op>span name, thedb.*attributes actually emitted (nodb.cf.do.has_resulton the error path, since that is only set after the call resolves), anERRORstatus, and oneexceptionevent carrying the thrown message. ThedeleteAllcase picks updb.cf.do.allow_unconfirmed, which nothing covered before.Ran
pnpm run checkfrom the root, all green, and the package went from 48 passing with 5 skipped to 53 passing. I also sanity-checked that the new assertions bite: deleting therecordExceptionandsetStatuslines fromdo-storage.tsmakes four of them fail. Test-only change, so no changeset.quick disclosure: put this together with Claude Code and read the diff myself before opening. Freshman still learning, so if you would rather just delete these stubs than finish them, say so and I will send that instead :)