fix(selfhost): import withOtelSpan in the durable queues (main typecheck broken)#1996
Merged
Conversation
pg-queue.ts and sqlite-queue.ts call withOtelSpan for the admission-deferred span (like server.ts does) but import only withReviewSpan, so tsc fails with 'Cannot find name withOtelSpan' on main — #1922 added the calls and #1986 landed close behind, green separately but broken together. Add the missing import from ./otel. Behavior-preserving (the span was already intended); unblocks CI.
|
Important 🟪🟪🟪🟪🟪🟪🟪🟪🟪🟪🟪🟪 🔍 Gittensory is reviewing…AI analysis is in progress. This comment will update when the review is complete. 🟩 Safe / merged · 🟦 Advisory · 🟨 Held for review · 🟥 Blocked / closed · 🟪 Reviewing |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #1996 +/- ##
=======================================
Coverage ? 95.63%
=======================================
Files ? 220
Lines ? 24395
Branches ? 8846
=======================================
Hits ? 23331
Misses ? 436
Partials ? 628
🚀 New features to boost your workflow:
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
maincurrently failsnpm run typecheck:src/selfhost/pg-queue.ts:345andsrc/selfhost/sqlite-queue.ts:288callwithOtelSpan(...)for the*.queue.admission_deferredspan (exactly assrc/server.ts:689does) but import onlywithReviewSpanfrom./tracing—withOtelSpanis never imported.#1922(sampled Sentry spans) added those calls and#1986(Postgres tooling) merged right behind it; each was green on its own branch, but together on main the import is missing →error TS2304: Cannot find name 'withOtelSpan'. This blocks CI on every open PR.Fix: add
import { withOtelSpan } from "./otel";to both durable-queue files. Behavior-preserving — the span was already intended (it mirrors the existingwithReviewSpancall a few lines down andserver.ts's usage).Validation
npm run typecheck(fails on main without this; passes with it)git diff --checknpx vitest run test/unit/selfhost-pg-queue.test.ts test/unit/selfhost-sqlite-queue.test.ts— 95 pass