feat(stream): make SSE maxEventSize configurable end-to-end - #568
Merged
Conversation
Contributor
📦 Bundle size reportCompared against
|
| dist | raw | gzip |
|---|---|---|
| JS (runtime) | 1.0 MB (+1.2 KB) | 376 KB (+457 B) |
| Type declarations | 385 KB (+533 B) | 136 KB (+186 B) |
| Source maps | 2.1 MB (+2.4 KB) | 705 KB (+858 B) |
| Other | 11 KB | 3.7 KB |
| Total | 3.5 MB (+4.1 KB) | 1.2 MB (+1.5 KB) |
Per-entry composition (own code — deps external (as shipped))
| Entry | Initial (gz) | Lazy (gz) | Total (gz) | node_modules (min) | Own code (min) |
|---|---|---|---|---|---|
. |
95 KB (+6 B) | 2.5 KB | 97 KB (+6 B) | external | 311 KB (+16 B) |
./beta |
75 KB (+189 B) | 457 B | 75 KB (+189 B) | external | 226 KB (+498 B) |
./testing |
17 KB | 0 B | 17 KB | external | 50 KB |
./tsdown |
520 B | 0 B | 520 B | external | 813 B |
./type-generator |
22 KB | 0 B | 22 KB | external | 65 KB |
Chunks:
| Entry | Chunk | Load | Size (gz) |
|---|---|---|---|
. |
index.js |
initial | 91 KB |
. |
utils.js |
initial | 4.0 KB |
. |
remote-tunnel-manager.js |
lazy | 2.5 KB |
./beta |
beta.js |
initial | 59 KB |
./beta |
stream-manager.js |
initial | 5.8 KB |
./beta |
wide-event-emitter.js |
initial | 3.2 KB |
./beta |
databricks.js |
initial | 3.2 KB |
./beta |
configuration.js |
initial | 2.1 KB |
./beta |
service-context.js |
initial | 1.3 KB |
./beta |
client.js |
initial | 434 B |
./beta |
client-options.js |
initial | 220 B |
./beta |
supervisor-api.js |
lazy | 193 B |
./beta |
databricks.js |
lazy | 142 B |
./beta |
index.js |
lazy | 122 B |
./testing |
index.js |
initial | 17 KB |
./tsdown |
index.js |
initial | 520 B |
./type-generator |
index.js |
initial | 22 KB |
@databricks/appkit-ui
npm tarball (packed): 350 KB (+13 B) — gzipped download (dist + bin; excludes release-only docs/NOTICE).
| dist | raw | gzip |
|---|---|---|
| JS (runtime) | 395 KB | 132 KB |
| Type declarations | 229 KB (+23 B) | 84 KB (+6 B) |
| Source maps | 766 KB (+1 B) | 253 KB |
| CSS | 16 KB | 3.2 KB |
| Total | 1.4 MB (+24 B) | 473 KB (+6 B) |
Per-entry composition (consumer bundle — deps bundled, peerDeps external)
| Entry | Initial (gz) | Lazy (gz) | Total (gz) | node_modules (min) | Own code (min) |
|---|---|---|---|---|---|
./js |
5.3 KB | 49 KB | 55 KB | 208 KB | 14 KB |
./js/beta |
20 B | 0 B | 20 B | 0 B | 0 B |
./react |
432 KB | 49 KB | 481 KB | 1.3 MB | 177 KB |
./react/beta |
1.0 KB | 0 B | 1.0 KB | 0 B | 1.9 KB |
Chunks:
| Entry | Chunk | Load | Size (gz) |
|---|---|---|---|
./js |
index.js |
initial | 5.2 KB |
./js |
chunk |
initial | 120 B |
./js |
apache-arrow |
lazy | 49 KB |
./js/beta |
beta.js |
initial | 20 B |
./react |
index.js |
initial | 430 KB |
./react |
tslib |
initial | 2.1 KB |
./react |
apache-arrow |
lazy | 49 KB |
./react/beta |
beta.js |
initial | 1.0 KB |
Plugins constructed their StreamManager with `new StreamManager()`, so the
constructor-level stream defaults (including `maxEventSize`) were unreachable
through plugin config. Combined with the built-in plugins never setting a
per-call `stream` config, an app hitting the event-size limit had no way to
raise it without patching AppKit.
Add `streamConfig?: StreamConfig` to `BasePluginConfig` and forward it to the
plugin's StreamManager. A per-call `executeStream({ stream })` override still
layers on top of these instance defaults.
analytics({ streamConfig: { maxEventSize: 20 * 1024 * 1024 } })
Co-authored-by: Isaac <no-reply@databricks.com>
Signed-off-by: Jorge Calvar <jorge.calvar@databricks.com>
calvarjorge
force-pushed
the
fix/stream-config-per-call-overrides
branch
from
September 2, 2026 13:38
6fdff0b to
617816c
Compare
Contributor
🤖 AppKit PR bot🔬 Run evalsStart an eval for this PR from the evals-monitor app: Go to Evals Monitor → 📦 Try this PR's app templateScaffolds a new app from this PR's SDK build. Run it in any folder (requires the GitHub CLI — gh run download 33636926482 -R databricks/appkit -n appkit-template-0.69.2-pr.2972984-fix-stream-config-per-call-overrides-568 -D appkit-pr-568 \
&& unzip -o "appkit-pr-568/appkit-template-0.69.2-pr.2972984-fix-stream-config-per-call-overrides-568.zip" -d "appkit-pr-568" \
&& databricks apps init --template "appkit-pr-568"The template pins |
ditadi
approved these changes
Sep 2, 2026
IamGalymzhan
added a commit
that referenced
this pull request
Sep 2, 2026
Resolves the one content conflict in plugin/tests/plugin.test.ts: keeps both this branch's 'binds the cache its context carries' test and #568's two streamConfig tests. plugin.ts auto-merged cleanly — new StreamManager( config.streamConfig) from #568 sits alongside the per-app cache/telemetry changes. Regenerated API docs pick up #568's streamConfig on the configs that extend BasePluginConfig; caching.md's upgrade heading moves to 0.71.0 since 0.70.0 already shipped. Signed-off-by: Galymzhan <zhangazy2004@gmail.com>
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
Makes the SSE
maxEventSizelimit actually overridable by application code. Two commits:fix(stream)(existing) — raise the default event limit to 5 MiB, honour a per-callmaxEventSize(it was read off theStreamManagerinstance, so per-call values passed viaexecuteStream({ stream })type-checked and were then silently ignored), and measure UTF-8 bytes instead ofString.length.feat(stream)(new) — exposestreamConfigonBasePluginConfig.Why the second commit
Even after the per-call fix, no shipped path could reach the knob:
Pluginalways constructednew StreamManager()with no options, so the constructor-level defaults (includingmaxEventSize) were unreachable through plugin config.analyticsplugin — the one that emitsEvent exceeds max size— builds itsStreamExecutionSettingswith nostreamfield, so the per-call override never reached it.Result: an app hitting the limit had no way to raise it without patching AppKit.
Change
Add
streamConfig?: StreamConfigtoBasePluginConfigand forward it to the plugin'sStreamManager. A per-callexecuteStream({ stream })override still layers on top of these instance defaults.Notes
connectSSE's defaultmaxBufferSize(5 MiB) will reject a larger event; passconnectSSE({ maxBufferSize })to match.Testing
streamConfigis forwarded to theStreamManagerconstructor (andundefinedwhen unset).plugin.test.ts(54) andstream/tests/(112) pass.This pull request and its description were written by Isaac.