Skip to content

fix: use type field from payload to check if event is blocked - #6487

Merged
itsmihir merged 7 commits into
masterfrom
fix.event-blocking-event-type-field
Nov 7, 2025
Merged

itsmihir merged 7 commits into
masterfrom
fix.event-blocking-event-type-field

Conversation

@itsmihir

@itsmihir itsmihir commented Nov 6, 2025 •

Copy link
Copy Markdown
Contributor

Description

Currently, we are using msg.Properties.RequestType as the event type to check if an event is blocking. This is incorrect because RequestType doesn’t represent the actual event type. This PR fixes it by relying on the type field present in the payload instead.

Linear Ticket

Fixes PIPE-2527

Security

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

fracasula and others added 5 commits October 28, 2025 10:57
🔒 Scanned for secrets using gitleaks version is set by build process

# Description

Fixing maxprocs defaults:
https://github.com/rudderlabs/rudder-go-kit/releases/tag/v0.63.5

## Linear Ticket

< Fixes
[PIPE-2504](https://linear.app/rudderstack/issue/PIPE-2504/fix-maxprocs)
>

## 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.
🔒 Scanned for secrets using gitleaks 8.28.0

# Description

- Remove sourceId labels from warehouse repo query stats.

## Linear Ticket

- Resolves INT-4323

## 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.

<!-- CURSOR_SUMMARY -->
---

> [!NOTE]
> Removes sourceId labels from warehouse repo query stats and downgrades
a snowpipe streaming polling log line to debug.
> 
> - **Warehouse Repo (stats tags)**:
> - Drop `sourceId` from `TimerStat` tags across repos: `load.go`
(`Insert`, `DistinctTableName`), `schema.go` (`Insert`, `GetNamespace`),
`source.go` (`Insert`), `staging.go` (`Insert`, `Pending`,
`CountPendingForSource`), `staging_snapshot.go` (`Insert`, `GetLatest`),
`table_upload.go` (`GetByJobRunTaskRun`), `upload.go` (`LastCreatedAt`,
`GetLatestUploadInfo`, `RetryFailedBatches`, `GetSyncLatencies`).
> - Update tests in `warehouse/internal/repo/repo_test.go` to align with
removed `sourceId` tags.
> - **Snowpipe Streaming**:
> - Change polling log for in-progress flushing from `Infon` to `Debugn`
in `snowpipestreaming.go`.
> 
> <sup>Written by [Cursor
Bugbot](https://cursor.com/dashboard?tab=bugbot) for commit
4bdd695. This will update automatically
on new commits. Configure
[here](https://cursor.com/dashboard?tab=bugbot).</sup>
<!-- /CURSOR_SUMMARY -->
🤖 I have created a release *beep* *boop*
---


##
[1.62.2](v1.62.1...v1.62.2)
(2025-11-05)


### Bug Fixes

* remove source labels in repo query stats
([#6483](#6483))
([cced7ae](cced7ae))

---
This PR was generated with [Release
Please](https://github.com/googleapis/release-please). See
[documentation](https://github.com/googleapis/release-please#release-please).
@itsmihir
itsmihir requested review from ktgowtham and mihir20 November 6, 2025 08:32
Comment thread gateway/handle.go
eventName := gjson.GetBytes(msg.Payload, "event").String()
if isEventBlocked(msg.Properties.WorkspaceID, msg.Properties.SourceID, msg.Properties.RequestType, eventName) {
eventType := gjson.GetBytes(msg.Payload, "type").String()
if isEventBlocked(msg.Properties.WorkspaceID, msg.Properties.SourceID, eventType, eventName) {

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

do we need some test to verify?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done

Comment thread gateway/handle.go Outdated

eventName := gjson.GetBytes(msg.Payload, "event").String()
if isEventBlocked(msg.Properties.WorkspaceID, msg.Properties.SourceID, msg.Properties.RequestType, eventName) {
eventType := gjson.GetBytes(msg.Payload, "type").String()

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

instead of gjson we can use jsonparser from go-kit

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done

@codecov

codecov Bot commented Nov 6, 2025 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 79.25%. Comparing base (48f9cfd) to head (d828691).
⚠️ Report is 1 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #6487      +/-   ##
==========================================
- Coverage   79.37%   79.25%   -0.12%     
==========================================
  Files         530      530              
  Lines       59497    59498       +1     
==========================================
- Hits        47223    47158      -65     
- Misses       9455     9514      +59     
- Partials     2819     2826       +7     

☔ View full report in Codecov by Sentry.
📢 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.

@itsmihir
itsmihir changed the base branch from release/1.62.x to master November 7, 2025 06:06
@itsmihir
itsmihir enabled auto-merge (squash) November 7, 2025 06:38
@itsmihir
itsmihir merged commit 5ba053f into master Nov 7, 2025
@itsmihir
itsmihir deleted the fix.event-blocking-event-type-field branch November 7, 2025 07:05
This was referenced Nov 11, 2025
itsmihir pushed a commit that referenced this pull request Nov 11, 2025
🤖 I have created a release *beep* *boop*
---


##
[1.63.0-rc.1](v1.62.0...v1.63.0-rc.1)
(2025-11-11)


### Features

* **router:** dynamic sizing of worker job buffers
([#6463](#6463))
([5b2e519](5b2e519))


### Bug Fixes

* max procs defaults
([#6473](#6473))
([48f9cfd](48f9cfd))
* max procs defaults
([#6473](#6473))
([3d2026c](3d2026c))
* pending batch router jobs for disabled destinations are not being
aborted
([#6477](#6477))
([8effa78](8effa78))
* remove source labels in repo query stats
([#6483](#6483))
([48f9cfd](48f9cfd))
* use type field from payload to check if event is blocked
([#6487](#6487))
([5ba053f](5ba053f))


### Miscellaneous

* apply security best practices from step security
([#6462](#6462))
([a860128](a860128))
* emit filtered metrics from all non-ut stages and clean up diff metrics
([#6485](#6485))
([399c4c6](399c4c6))
* refactor processor to move archival in a preprocess stage
([#6470](#6470))
([8634c3f](8634c3f))
* remove oauth status toggling
([#6492](#6492))
([45e5dba](45e5dba))
* sync release v1.62.0 to main branch
([#6472](#6472))
([65db4ee](65db4ee))

---
This PR was generated with [Release
Please](https://github.com/googleapis/release-please). See
[documentation](https://github.com/googleapis/release-please#release-please).
itsmihir pushed a commit that referenced this pull request Nov 12, 2025
🤖 I have created a release *beep* *boop*
---


##
[1.63.0](v1.62.0...v1.63.0)
(2025-11-11)


### Features

* **router:** dynamic sizing of worker job buffers
([#6463](#6463))
([5b2e519](5b2e519))


### Bug Fixes

* max procs defaults
([#6473](#6473))
([48f9cfd](48f9cfd))
* max procs defaults
([#6473](#6473))
([3d2026c](3d2026c))
* pending batch router jobs for disabled destinations are not being
aborted
([#6477](#6477))
([8effa78](8effa78))
* remove source labels in repo query stats
([#6483](#6483))
([48f9cfd](48f9cfd))
* use type field from payload to check if event is blocked
([#6487](#6487))
([5ba053f](5ba053f))


### Miscellaneous

* apply security best practices from step security
([#6462](#6462))
([a860128](a860128))
* emit filtered metrics from all non-ut stages and clean up diff metrics
([#6485](#6485))
([399c4c6](399c4c6))
* refactor processor to move archival in a preprocess stage
([#6470](#6470))
([8634c3f](8634c3f))
* remove oauth status toggling
([#6492](#6492))
([45e5dba](45e5dba))
* sync release v1.62.0 to main branch
([#6472](#6472))
([65db4ee](65db4ee))

---
This PR was generated with [Release
Please](https://github.com/googleapis/release-please). See
[documentation](https://github.com/googleapis/release-please#release-please).
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.

6 participants