Repository navigation
fix(deps): update krm-stream to 0.10.0 - #45
Conversation
The Go gateway and the vendored browser bundle move from 0.7.0 to 0.10.0 together, still over the gateway's SSE stream (protocol 1). - gateway.Options: the shared settings move into StreamConfig; NewSharedBackendWithOptions is NewSharedBackend. - hello example: connectManagedResourceStream is gone; the page feeds the store through connectResourceStream and applyStreamEvent, shows state through subscribe, and reports a rejected closed. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configuration
⛔ Files ignored due to path filters (1)
📒 Files selected for processing (11)
Included review availability: This review used your included allowance. Your plan provides up to 1 included review per hour; 0 remain after this review. 📝 WalkthroughWalkthroughThe change upgrades krm-stream to 0.10.0, updates the browser stream API, and adds a native Kubernetes LIST-then-WATCH connector with checkpoint resumption. It also changes store event handling and adds investigation documents on native-watch adoption and proposed watch sharing. ChangesStream integration and native watches
Priority: ⬇️ Low Estimated code review effort: 4 (Complex) | ~45 minutes Change: Other Sequence Diagram(s)sequenceDiagram
participant HelloPage
participant connectNativeWatch
participant K8sAPI as /k8s
participant applyStreamEvent
participant LiveResourceStore
HelloPage->>connectNativeWatch: Start collection watch with event callback
connectNativeWatch->>K8sAPI: LIST collection
K8sAPI-->>connectNativeWatch: Collection and resource version
connectNativeWatch->>HelloPage: Deliver reset and added events
HelloPage->>applyStreamEvent: Apply delivered events
applyStreamEvent->>LiveResourceStore: Update resource state
connectNativeWatch->>K8sAPI: WATCH from resource version
K8sAPI-->>connectNativeWatch: Watch events
connectNativeWatch->>HelloPage: Deliver watch events
Merge Risk: ⚪ Minimal · up to This updates the stream library and adjusts the gateway setup and hello example to its new API. Pages still use the existing gateway stream, and no behavior regression was identified. The native-watch material is documentation only, so the change is ready to merge. 🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
Full details: Docstring CoverageExplanation Docstring coverage is 21.62% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 37 functions across 4 files. (7 skipped: 7 unsupported.)
✨ Finishing Touches 💡 1📝 Generate docstrings 💡
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Moves krm-foyer from krm-stream 0.7.0 to 0.10.0: the Go gateway (
gateway,gateway/kube) and the browser bundle vendored into the hello example, together. Pages still read through the gateway's SSE stream at/stream/v1(protocol 1, unchanged); nothing switches to native watches.Changes
gateway.Optionstakes the shared settings (Authorizer,Clients,Projections,Diagnostics,WriteTimeout) insideStreamConfig. The shared-stream overrides keep working through field promotion.NewSharedBackendWithOptionsis nowNewSharedBackend.KRM_STREAM_VERSION/KRM_STREAM_INTEGRITYpin 0.10.0, and the bundle is re-vendored (task vendor-checkpasses). Inexamples/hello/web/app.js, the removedconnectManagedResourceStream(url, store, {onSynced, onStateChange})is replaced byconnectResourceStream(url, event => applyStreamEvent(store, event)), withsubscribe(showConnection)for state and asyncedevent for the first snapshot. A rejectedclosedis now reported on the page (since 0.8.0, a throwing callback stops the stream).docs/watches.md./k8sshare watches transparently, and an update to the native-connector request. Nothing in them is implemented.The server's behaviour does not change. The existing unit, e2e and browser specs are the check that nothing moved.
🤖 Generated with Claude Code
Summary by CodeRabbit