Skip to content

fix(batchrouter): recover snowpipe streaming channels for tables dropped externally - #7434

Merged
achettyiitr merged 1 commit into
release/1.89.xfrom
fix/snowpipe-streaming-stale-channel-cache
Sep 29, 2026
Merged

achettyiitr merged 1 commit into
release/1.89.xfrom
fix/snowpipe-streaming-stale-channel-cache

Conversation

@achettyiitr

@achettyiitr achettyiitr commented Sep 29, 2026 •

Copy link
Copy Markdown
Member

Description

Fixes two Snowpipe Streaming failures when a table is dropped externally while its channel is still open.

1. Stale channel + new columns aborts every upload. The cached (or Snowpipe service's) channel has the old schema, so we ALTER TABLE ... ADD COLUMN on the dropped table, abort the jobs, and keep reusing the same channel:

adding columns for table T: adding column: abort error, ... 002003 (42S02): Table '...T' does not exist or not authorized.

Fix: when adding columns fails, delete the channel and retry once with a fresh one, which recreates the missing table.

2. Failed channel recreation is cached after bulk status. handleChannelRecoveryPostBulkStatus didn't check Success, cached a response with an empty channel ID, then failed with:

getBulkChannelStatus.channelIds: must not be empty

Fix: return the error instead of caching the response.

Testing: unit tests in channel_test.go (fail on master), and verified end to end against Snowflake: dropping a table while events add a new column now recreates the table instead of aborting.

Linear Ticket

Resolves INT-7242

Security

  • The code changed/added as part of this pull request won't create any security issues with how the software is being used.

🤖 Generated with Claude Code

@achettyiitr achettyiitr changed the title fix(snowpipestreaming): recover channels for tables dropped externally fix(batchrouter): recover snowpipe streaming channels for tables dropped externally Sep 29, 2026
@achettyiitr
achettyiitr marked this pull request as ready for review September 29, 2026 10:06
When a table is dropped externally while its channel is cached (in rudder-server
or in the Snowpipe service) and the events carry new columns (e.g. jsonPaths),
adding the columns fails with "table does not exist" and every subsequent upload
is aborted, since the stale channel is never discarded.

- On adding columns failure, delete the channel and retry once with a fresh
  channel, which recreates the table if it is missing.
- When recreating a channel after polling bulk status, don't cache an
  unsuccessful response. It has an empty channel ID, which made the following
  bulk status request fail with "channelIds: must not be empty".

Co-Authored-By: Claude Opus 5.5 <[email protected]>

🔒 Scanned for secrets using gitleaks 8.29.1
@achettyiitr
achettyiitr force-pushed the fix/snowpipe-streaming-stale-channel-cache branch from c2a2b87 to 9f7696b Compare September 29, 2026 10:12
@achettyiitr
achettyiitr changed the base branch from master to release/1.89.x September 29, 2026 10:12
@codecov

codecov Bot commented Sep 29, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 85.07%. Comparing base (d8f18bf) to head (9f7696b).

Additional details and impacted files
@@                Coverage Diff                 @@
##           release/1.89.x    #7434      +/-   ##
==================================================
- Coverage           85.07%   85.07%   -0.01%     
==================================================
  Files                 622      622              
  Lines               62119    62060      -59     
==================================================
- Hits                52849    52795      -54     
+ Misses               9267     9262       -5     
  Partials                3        3              

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@achettyiitr
achettyiitr merged commit 2c79aa8 into release/1.89.x Sep 29, 2026
74 checks passed
@achettyiitr
achettyiitr deleted the fix/snowpipe-streaming-stale-channel-cache branch September 29, 2026 11:01
achettyiitr pushed a commit that referenced this pull request Sep 29, 2026
🤖 I have created a release *beep* *boop*
---


##
[1.89.1](v1.89.0...v1.89.1)
(2026-09-29)


### Bug Fixes

* **batchrouter:** recover snowpipe streaming channels for tables
dropped externally
([#7434](#7434))
([2c79aa8](2c79aa8))

---
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 added a commit that referenced this pull request Sep 29, 2026
# Description

Syncing patch release v1.89.1 to main branch

**↓↓ Please review and edit commit overrides before merging ↓↓**

BEGIN_COMMIT_OVERRIDE
fix(batchrouter): recover snowpipe streaming channels for tables dropped
externally (#7434)
END_COMMIT_OVERRIDE

---------

Co-authored-by: Akash Chetty <[email protected]>
Co-authored-by: rudderstack-github-actions[bot] <236995729+rudderstack-github-actions[bot]@users.noreply.github.com>
mihir20 pushed a commit that referenced this pull request Oct 12, 2026
🤖 I have created a release *beep* *boop*
---


##
[1.90.0-rc.1](v1.89.0...v1.90.0-rc.1)
(2026-10-12)


### Features

* **processor:** add source_out reporting metric
([#7435](#7435))
([909fba9](909fba9))
* **processor:** allow disabling event schemas v2 per source
([#7429](#7429))
([a8c12b2](a8c12b2))
* **processor:** report dest_transformer diff rows for multiplexing
destination transformations
([#7446](#7446))
([cd95c32](cd95c32))
* **processor:** report dest_transformer succeeded for destinations
without a destination transformation
([#7445](#7445))
([21f7e41](21f7e41))
* **processor:** report user_transformer succeeded for destinations
without a user transformation
([#7440](#7440))
([f424257](f424257))
* **router:** mask live events destination credentials
([#7460](#7460))
([5fa5fe2](5fa5fe2))
* **warehouse:** add Microsoft Fabric destination
([#7441](#7441))
([74940c2](74940c2))


### Bug Fixes

* **batchrouter:** do not abort warehouse jobs on a zero failure
timestamp
([#7426](#7426))
([506f6d5](506f6d5))
* **batchrouter:** recover snowpipe streaming channels for tables
dropped externally
([#7434](#7434))
([93cd81d](93cd81d))
* **destination:** encode Lytics bulk upload URL values
([#7433](#7433))
([08e6937](08e6937))
* **destination:** retry bqstream transport failures
([#7464](#7464))
([cd3dc3e](cd3dc3e))
* **warehouse:** cap deltalake validation schema describes
([#7444](#7444))
([d119779](d119779))
* **warehouse:** keep snowflake copy credentials out of logs
([#7442](#7442))
([f91747b](f91747b))
* **warehouse:** set explicit lineSep for deltalake csv copy
([#7455](#7455))
([cc22d18](cc22d18))


### Miscellaneous

* migrate self-hosted arm64 docker build runners to gha-runner-scale-set
([#7425](#7425))
([5cdffde](5cdffde))
* **processor:** retire the destination-filter reorder, dedup and
gw_ingested reporting flags
([#7450](#7450))
([1040511](1040511))
* pull openapi-generator through the ECR pull-through cache
([#7449](#7449))
([6e9f920](6e9f920))

---
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>
mihir20 pushed a commit that referenced this pull request Oct 13, 2026
🤖 I have created a release *beep* *boop*
---


##
[1.90.0](v1.89.0...v1.90.0)
(2026-10-12)


### Features

* **processor:** add source_out reporting metric
([#7435](#7435))
([909fba9](909fba9))
* **processor:** allow disabling event schemas v2 per source
([#7429](#7429))
([a8c12b2](a8c12b2))
* **processor:** report dest_transformer diff rows for multiplexing
destination transformations
([#7446](#7446))
([cd95c32](cd95c32))
* **processor:** report dest_transformer succeeded for destinations
without a destination transformation
([#7445](#7445))
([21f7e41](21f7e41))
* **processor:** report user_transformer succeeded for destinations
without a user transformation
([#7440](#7440))
([f424257](f424257))
* **router:** mask live events destination credentials
([#7460](#7460))
([5fa5fe2](5fa5fe2))
* **warehouse:** add Microsoft Fabric destination
([#7441](#7441))
([74940c2](74940c2))


### Bug Fixes

* **batchrouter:** do not abort warehouse jobs on a zero failure
timestamp
([#7426](#7426))
([506f6d5](506f6d5))
* **batchrouter:** recover snowpipe streaming channels for tables
dropped externally
([#7434](#7434))
([93cd81d](93cd81d))
* **destination:** encode Lytics bulk upload URL values
([#7433](#7433))
([08e6937](08e6937))
* **destination:** retry bqstream transport failures
([#7464](#7464))
([cd3dc3e](cd3dc3e))
* **warehouse:** cap deltalake validation schema describes
([#7444](#7444))
([d119779](d119779))
* **warehouse:** keep snowflake copy credentials out of logs
([#7442](#7442))
([f91747b](f91747b))
* **warehouse:** set explicit lineSep for deltalake csv copy
([#7455](#7455))
([cc22d18](cc22d18))


### Miscellaneous

* migrate self-hosted arm64 docker build runners to gha-runner-scale-set
([#7425](#7425))
([5cdffde](5cdffde))
* **processor:** retire the destination-filter reorder, dedup and
gw_ingested reporting flags
([#7450](#7450))
([1040511](1040511))
* pull openapi-generator through the ECR pull-through cache
([#7449](#7449))
([6e9f920](6e9f920))

---
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>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants