Repository navigation
chore: sync release v1.75.2 to main branch - #6977
Merged
achettyiitr merged 6 commits intoMay 19, 2026
Merged
Conversation
# Description
When a job is drained in the batch router's `scheduleJobs` (job expired,
source not found, destination disabled, etc.), the `ErrorResponse`
written to `job_status` was synthesized from an empty `{}` with just
`{"reason": "<drain reason>"}`, e.g.
```json
{ "reason": "job expired" }
```
Any upstream error from the previous delivery attempt that lived on
`job.LastJobStatus.ErrorResponse` — fields like `error`, `response`,
`firstAttemptedAt` — was clobbered, so by the time a job reached status
`Aborted` with code `410` we'd lost all the context about *why* it had
been failing.
### Change
In `router/batchrouter/worker.go`, base the drained status's
`ErrorResponse` on `job.LastJobStatus.ErrorResponse` instead of
`[]byte("{}")`. `routerutils.EnhanceJSON` then merges the new `reason`
field into the existing object rather than replacing it.
```diff
- ErrorResponse: routerutils.EnhanceJSON([]byte(`{}`), "reason", finalReason),
+ errResponse := routerutils.EnhanceJSON(job.LastJobStatus.ErrorResponse, "reason", finalReason)
+ ErrorResponse: errResponse,
```
After the fix, a drained job's `ErrorResponse` carries the prior
upstream context alongside the drain reason:
```json
{
"error": "500 internal server error",
"response": "upstream timed out",
"firstAttemptedAt": "2024-01-01T00:00:00.000Z",
"reason": "job expired"
}
```
`ErrorCode` stays `410` and `JobState` stays `Aborted` — no change to
drain semantics, only what we surface to debuggers and downstream
reporting.
### Tests
New file `router/batchrouter/worker_test.go` with
`TestScheduleJobsDrainBranch` covering three cases against a real
`scheduleJobs` call (mocked `jobsDB`, fake drainer):
1. **`preserves prior LastJobStatus error fields and stamps the drain
reason`** — the bug-fix path. A job with a prior
`{"error":"…","response":"…","firstAttemptedAt":"…"}` is drained;
asserts all three fields survive and `reason` is stamped on top.
2. **`synthesizes reason when LastJobStatus has no prior error
response`** — first-attempt jobs (empty `LastJobStatus.ErrorResponse`)
still end up with `{"reason":"job expired"}`. No regression on the
existing behavior.
3. **`uses source_not_found reason when the job's source is missing from
the destination`** — the second branch of the same drain condition
(`!sourceFound`) also benefits from the fix; the prior error is
preserved alongside `reason: "source_not_found"`.
## Linear Ticket
- Resolves INT-6358, INT-6356, INT-6349.
## Security
- [x] The code changed/added as part of this pull request won't create
any security issues with how the software is being used.
---------
Co-authored-by: Akash <[email protected]>
🤖 I have created a release *beep* *boop* --- ## [1.75.1](v1.75.0...v1.75.1) (2026-05-15) ### Bug Fixes * **batchrouter:** preserve prior LastJobStatus error on drain ([#6958](#6958)) ([eaabb87](eaabb87)) --- 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 Add support for quarterly partitioning in ClickHouse destinations using \`toStartOfQuarter(received_at)\` as the partition expression. ## Changes - \`clickhouse.go\`: Added \`case \"quarter\"\` to \`partitionExpr()\` returning \`toStartOfQuarter(received_at)\` - \`partition_test.go\`: Added unit test case for \`\"quarter\"\` partition type - \`clickhouse_test.go\`: Added integration test case verifying \`toStartOfQuarter(received_at)\` partition key in \`system.tables\` ## Linear Ticket - Resolves INT-6377 ## Security - [ ] The code changed/added as part of this pull request won't create any security issues with how the software is being used. Co-authored-by: Akash Chetty <[email protected]>
🔒 Scanned for secrets using gitleaks 8.29.1 # Description - Fixes offset-based duplicate detection for Snowpipe Streaming when `SnowpipeStreaming.bulkStatusEnabled `is on. Duplicate checks now use the bulk status API (with a single pre-fetch per upload) instead of per-channel GetStatus calls. ## Linear Ticket - Resolves INT-6378 ## Security - [ ] The code changed/added as part of this pull request won't create any security issues with how the software is being used. --------- Co-authored-by: Akash Chetty <[email protected]>
🤖 I have created a release *beep* *boop* --- ## [1.75.2](v1.75.1...v1.75.2) (2026-05-19) ### Bug Fixes * clickhouse quarter partition type ([#6965](#6965)) ([e4ebe9c](e4ebe9c)) * snowpipe streaming bulk status offset ([#6966](#6966)) ([1f2a141](1f2a141)) --- 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>
achettyiitr
approved these changes
May 19, 2026
mihir20
approved these changes
May 19, 2026
achettyiitr
deleted the
sync-release-b211809dd1ce16a333ad9e2ecefcec4deb25c49a
branch
May 19, 2026 09:51
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #6977 +/- ##
==========================================
+ Coverage 79.72% 80.06% +0.33%
==========================================
Files 565 565
Lines 63714 63745 +31
==========================================
+ Hits 50796 51036 +240
+ Misses 9910 9675 -235
- Partials 3008 3034 +26 ☔ View full report in Codecov by Sentry. 🚀 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.
Description
Syncing patch release v1.75.2 to main branch
↓↓ Please review and edit commit overrides before merging ↓↓
BEGIN_COMMIT_OVERRIDE
fix(batchrouter): preserve prior LastJobStatus error on drain (#6958)
fix: clickhouse quarter partition type (#6965)
fix: snowpipe streaming bulk status offset (#6966)
END_COMMIT_OVERRIDE