Repository navigation
feat: incremental definitions on the v2 namespace config - #7487
Conversation
ed29d23 to
ec66378
Compare
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #7487 +/- ##
==========================================
+ Coverage 84.70% 85.13% +0.42%
==========================================
Files 631 631
Lines 62941 62947 +6
==========================================
+ Hits 53317 53587 +270
+ Misses 9621 9357 -264
Partials 3 3 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
76ad6ce to
ed5b52a
Compare
4f76ded to
7fa3610
Compare
| configFromFile = config.GetBoolVar(false, "BackendConfig.configFromFile") | ||
| configEnvReplacementEnabled = config.GetBoolVar(true, "BackendConfig.envReplacementEnabled") | ||
| incrementalConfigUpdates = config.GetBoolVar(false, "BackendConfig.incrementalConfigUpdates") | ||
| incrementalDefinitions = config.GetBoolVar(false, "BackendConfig.incrementalDefinitions") |
There was a problem hiding this comment.
Nothing tests this plumbing. Hardcoding false here, or dropping the field in newForDeployment, keeps everything green. A small subtest in TestNewForDeployment that sets the env vars and checks nc.incrementalDefinitions would catch it. incrementalConfigUpdates has the same gap, so it could cover both.
There was a problem hiding this comment.
Thanks! I'd keep this out: it's a pass-through to cpsdk.WithIncrementalDefinitions, whose behaviour is covered in rudder-cp-sdk, and the gap predates this PR for incrementalConfigUpdates. If we want plumbing tests for both flags I'd rather do that separately.
| fetcher.cache.AccountDefinitions["ACC"].UpdatedAt.Format(updatedAfterTimeFormat)) | ||
| }) | ||
|
|
||
| t.Run("null catalogues on a cold cache reset and refetch", func(t *testing.T) { |
There was a problem hiding this comment.
On a cold cache there's nothing for reset() to drop, so this still passes if reset() keeps f.cache. A warm-cache variant would pin it: full poll, a poll that forces a reset, then a refetch with null catalogues expecting ErrFullFetchRequired. Optional though.
There was a problem hiding this comment.
Agreed it doesn't pin reset() itself, but after a reset lastUpdatedAt is zero, so the next poll is a full fetch and every catalogue is sent; a kept f.cache would be overwritten anyway. A null right after a reset would need a server bug, so I'll leave it as is.
7fa3610 to
033ea16
Compare
There was a problem hiding this comment.
🟢 Approval recommended
Static review identified no blocking issues in the scoped, default-off integration and regression coverage; project tests were not executed.
No open issues 🎉
What changed in this PR
Adds opt-in incremental definition catalogues to v2 namespace configuration, reducing repeated downloads and decoding while retaining cached definitions when unchanged.
Changes:
- Adds default-off
BackendConfig.incrementalDefinitions, effective only with incremental config updates. - Integrates rudder-cp-sdk v1.5.0 for omitted catalogues and server-provided cursors.
- Adds tests for catalogue retention and replacement, cold-cache recovery, flag gating, and response-header preservation.
| File | Description |
|---|---|
go.sum |
Updates SDK checksums for v1.5.0. |
go.mod |
Upgrades rudder-cp-sdk to v1.5.0. |
backend-config/namespace_config.go |
Stores the incremental-definitions option. |
backend-config/namespace_config_v2.go |
Enables the SDK option when both flags are set. |
backend-config/namespace_config_v2_types.go |
Embeds SDK incremental-definitions state. |
backend-config/namespace_config_v2_test.go |
Tests incremental catalogues, cursors, recovery, and gating. |
backend-config/namespace_config_v2_diff.go |
Implements omitted-catalogue detection and SDK contracts. |
backend-config/backend-config.go |
Loads and wires the new configuration flag. |
Review effort: Balanced
033ea16 to
5d8cf77
Compare
Opt in, behind BackendConfig.incrementalDefinitions (default off, effective only with BackendConfig.incrementalConfigUpdates), to the control plane omitting unchanged definition catalogues. The SDK keeps the cached catalogues and returns the server cursor as the next updatedAfter. Co-Authored-By: Claude Opus 5.5 <[email protected]> 🔒 Scanned for secrets using gitleaks 8.30.1
5d8cf77 to
2320b8c
Compare
🤖 I have created a release *beep* *boop* --- ## [1.93.0-rc.1](v1.92.0...v1.93.0-rc.1) (2026-11-09) ### Features * **destination:** recognize machine_oauth accounts as oauth ([#7549](#7549)) ([f51e4ca](f51e4ca)) * incremental definitions on the v2 namespace config ([#7487](#7487)) ([ce51e38](ce51e38)) * **processor:** add flag to abort python transformations on deployments that do not offer them ([#7571](#7571)) ([ca85eb2](ca85eb2)) * **processor:** filter http v2 events by destination message types ([#7538](#7538)) ([58fd176](58fd176)) * **processor:** send the workspace id to per-workspace pyt pods ([#7551](#7551)) ([ea33835](ea33835)) * **warehouse:** add maxcompute destination ([#7568](#7568)) ([a64bfd9](a64bfd9)) ### Bug Fixes * **batchrouter:** abort bq stream all events jobs on terminal auth failures ([#7548](#7548)) ([6b7e023](6b7e023)) * bump andybalholm/brotli to v1.2.7 [SEC-759] ([#7525](#7525)) ([6dfe468](6dfe468)) * bump rudder-go-kit to v0.84.3 ([#7547](#7547)) ([355054a](355054a)) * **core:** schema forwarder panics on shutdown ([#7519](#7519)) ([dd61cfc](dd61cfc)) * database connections hang when context is cancelled during a copy ([#7578](#7578)) ([8dae6e3](8dae6e3)) * **jobsdb:** compaction missing pairs after one that doesn't fit ([#7574](#7574)) ([573271b](573271b)) * **jobsdb:** multiconsumer recovery misses a consumer's executing status after another consumer's later status ([#7554](#7554)) ([69b43e0](69b43e0)) * **jobsdb:** old jobs not expiring for every consumer ([#7573](#7573)) ([366f114](366f114)) * **jobsdb:** pickups stalling on status tables with skewed stats ([#7572](#7572)) ([318446f](318446f)) * **jobsdb:** unionjobsdb functions pick the first datasets by table name ([#7558](#7558)) ([e94d6c5](e94d6c5)) * **router:** event order test only counts drained jobs of the last dataset ([#7552](#7552)) ([b0a097a](b0a097a)) * **router:** mask secrets in array-shaped reporting samples ([#7536](#7536)) ([902160f](902160f)) * **warehouse:** hot-reload degraded workspaces without aborting restored uploads ([#7564](#7564)) ([cb98598](cb98598)) * **warehouse:** match deltalake columns case-insensitively ([#7563](#7563)) ([a7d30d7](a7d30d7)) * **warehouse:** migrate snowflake to gosnowflake v2.3.0 ([#7542](#7542)) ([cc09426](cc09426)) * **warehouse:** skip job-creation error log on router shutdown ([#7567](#7567)) ([895367e](895367e)) ### Miscellaneous * **deps:** bump github.com/go-jose/go-jose/v4 from 4.1.4 to 4.1.6 ([#7545](#7545)) ([35ee952](35ee952)) * export only the +Inf bucket for limiter timers ([#7570](#7570)) ([4429472](4429472)) * **router:** add drainReason label to pipeline_processed_events ([#7561](#7561)) ([af0aef8](af0aef8)) * sync release v1.92.0 to main branch ([#7534](#7534)) ([9ab165d](9ab165d)) * **warehouse:** bump sqlconnect-go to v1.37.1 ([#7575](#7575)) ([acdad67](acdad67)) --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please). Co-authored-by: rudderstack-github-actions[bot] <236995729+rudderstack-github-actions[bot]@users.noreply.github.com>
🤖 I have created a release *beep* *boop* --- ## [1.93.0](v1.92.0...v1.93.0) (2026-11-09) ### Features * **destination:** recognize machine_oauth accounts as oauth ([#7549](#7549)) ([f51e4ca](f51e4ca)) * incremental definitions on the v2 namespace config ([#7487](#7487)) ([ce51e38](ce51e38)) * **processor:** add flag to abort python transformations on deployments that do not offer them ([#7571](#7571)) ([ca85eb2](ca85eb2)) * **processor:** filter http v2 events by destination message types ([#7538](#7538)) ([58fd176](58fd176)) * **processor:** send the workspace id to per-workspace pyt pods ([#7551](#7551)) ([ea33835](ea33835)) * **warehouse:** add maxcompute destination ([#7568](#7568)) ([a64bfd9](a64bfd9)) ### Bug Fixes * **batchrouter:** abort bq stream all events jobs on terminal auth failures ([#7548](#7548)) ([6b7e023](6b7e023)) * bump andybalholm/brotli to v1.2.7 [SEC-759] ([#7525](#7525)) ([6dfe468](6dfe468)) * bump rudder-go-kit to v0.84.3 ([#7547](#7547)) ([355054a](355054a)) * **core:** schema forwarder panics on shutdown ([#7519](#7519)) ([dd61cfc](dd61cfc)) * database connections hang when context is cancelled during a copy ([#7578](#7578)) ([8dae6e3](8dae6e3)) * **jobsdb:** compaction missing pairs after one that doesn't fit ([#7574](#7574)) ([573271b](573271b)) * **jobsdb:** multiconsumer recovery misses a consumer's executing status after another consumer's later status ([#7554](#7554)) ([69b43e0](69b43e0)) * **jobsdb:** old jobs not expiring for every consumer ([#7573](#7573)) ([366f114](366f114)) * **jobsdb:** pickups stalling on status tables with skewed stats ([#7572](#7572)) ([318446f](318446f)) * **jobsdb:** unionjobsdb functions pick the first datasets by table name ([#7558](#7558)) ([e94d6c5](e94d6c5)) * **router:** event order test only counts drained jobs of the last dataset ([#7552](#7552)) ([b0a097a](b0a097a)) * **router:** mask secrets in array-shaped reporting samples ([#7536](#7536)) ([902160f](902160f)) * **warehouse:** hot-reload degraded workspaces without aborting restored uploads ([#7564](#7564)) ([cb98598](cb98598)) * **warehouse:** match deltalake columns case-insensitively ([#7563](#7563)) ([a7d30d7](a7d30d7)) * **warehouse:** migrate snowflake to gosnowflake v2.3.0 ([#7542](#7542)) ([cc09426](cc09426)) * **warehouse:** skip job-creation error log on router shutdown ([#7567](#7567)) ([895367e](895367e)) ### Miscellaneous * **deps:** bump github.com/go-jose/go-jose/v4 from 4.1.4 to 4.1.6 ([#7545](#7545)) ([35ee952](35ee952)) * export only the +Inf bucket for limiter timers ([#7570](#7570)) ([4429472](4429472)) * **router:** add drainReason label to pipeline_processed_events ([#7561](#7561)) ([af0aef8](af0aef8)) * sync release v1.92.0 to main branch ([#7534](#7534)) ([9ab165d](9ab165d)) * **warehouse:** bump sqlconnect-go to v1.37.1 ([#7575](#7575)) ([acdad67](acdad67)) --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please). Co-authored-by: rudderstack-github-actions[bot] <236995729+rudderstack-github-actions[bot]@users.noreply.github.com>
Description
Adds
BackendConfig.incrementalDefinitions(default off, effective only withBackendConfig.incrementalConfigUpdates), which makes the v2 fetcher opt in to the control plane sending definition catalogues as null when unchanged. The rudder-cp-sdk differ keeps the cached catalogues, so unchanged catalogues are no longer downloaded and decoded on every poll; a null catalogue with nothing cached falls back to the existing reset and full refetch. The server's cursor, covering workspaces and definitions, becomes the nextupdatedAfter. Uses rudder-cp-sdk v1.5.0.Linear Ticket
Part of PIPE-3551 (related: DAW-4213)
Security
🤖 Generated with Claude Code