Skip to content

feat: support for creating upload v2 notifier jobs - #5729

Merged
shekhar-rudder merged 3 commits into
masterfrom
war-461-create-uploadv2-jobs
Apr 24, 2025
Merged

shekhar-rudder merged 3 commits into
masterfrom
war-461-create-uploadv2-jobs

Conversation

@shekhar-rudder

@shekhar-rudder shekhar-rudder commented Apr 15, 2025 •

Copy link
Copy Markdown
Member

Description

This PR introduces support for creation of upload_v2 notifier jobs required for batching of staging files

Key Changes:

  • Files are grouped into v1 and v2 based on the presence of BytesPerTable and a feature flag.
  • Extracted common logic for v1 and v2 paths into separate methods
  • For now, v2 notifier jobs include only one staging file per job, similar to v1. This is temporary — batching logic will be implemented in the next PR.
  • We will no longer track the processing status (success/failure) of staging files in v2.
  • v2 jobs will always force creation of load files (see state_generate_load_files.go).

Linear Ticket

https://linear.app/rudderstack/issue/WAR-461/enable-creation-of-upload-v2-notifier-jobs

Security

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

@shekhar-rudder
shekhar-rudder force-pushed the war-461-create-uploadv2-jobs branch from 12c5c92 to c10ed87 Compare April 16, 2025 05:36
@shekhar-rudder shekhar-rudder changed the title War 461 create uploadv2 jobs feat: support for creating upload v2 notifier jobs Apr 16, 2025
@shekhar-rudder
shekhar-rudder force-pushed the war-461-create-uploadv2-jobs branch from c10ed87 to 5ef955f Compare April 16, 2025 05:48
@shekhar-rudder
shekhar-rudder force-pushed the war-461-create-uploadv2-jobs branch 2 times, most recently from 770349e to 7c53aef Compare April 16, 2025 12:30
@shekhar-rudder
shekhar-rudder force-pushed the war-461-create-uploadv2-jobs branch from 7c53aef to acaa30f Compare April 16, 2025 12:42
@codecov

codecov Bot commented Apr 16, 2025 •

Copy link
Copy Markdown

Codecov Report

Attention: Patch coverage is 77.36626% with 55 lines in your changes missing coverage. Please review.

Project coverage is 77.10%. Comparing base (fa38f34) to head (116f636).
Report is 9 commits behind head on master.

Files with missing lines Patch % Lines
warehouse/internal/loadfiles/loadfiles.go 76.39% 36 Missing and 19 partials ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master    #5729      +/-   ##
==========================================
+ Coverage   77.00%   77.10%   +0.09%     
==========================================
  Files         488      488              
  Lines       66479    66599     +120     
==========================================
+ Hits        51192    51350     +158     
+ Misses      12504    12462      -42     
- Partials     2783     2787       +4     

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

}

func (lf *LoadFileGenerator) AllowUploadV2JobCreation(job *model.UploadJob) bool {
return lf.Conf.GetBool(fmt.Sprintf("Warehouse.%s.enableV2NotifierJob", job.Upload.DestinationType), false) || lf.Conf.GetBool("Warehouse.enableV2NotifierJob", false)

@vyeshwanth vyeshwanth Apr 17, 2025 •

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.

shouldn't this be?

Suggested change
return lf.Conf.GetBool(fmt.Sprintf("Warehouse.%s.enableV2NotifierJob", job.Upload.DestinationType), false) || lf.Conf.GetBool("Warehouse.enableV2NotifierJob", false)
return lf.Conf.GetBool(fmt.Sprintf("Warehouse.%s.enableV2NotifierJob", job.Upload.DestinationType), false) && lf.Conf.GetBool("Warehouse.enableV2NotifierJob", false)

Toggle has to be enabled and enabled for a destination type. If jobv2 is false for let's say redshift and toggle Warehouse.enableV2NotifierJob is enabled, we would allow creating v2 jobs. we shouldn't be doing it, CMIIW

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

The plan was to use Warehouse.enableV2NotifierJob to switch on for all destinations instead of adding flag for every destination. I never considered the case where I would like to disable it for a specific destination. With the current implementation, I'll need to have all destination flags set to true except for redshift.

@shekhar-rudder
shekhar-rudder merged commit dbc830f into master Apr 24, 2025
@shekhar-rudder
shekhar-rudder deleted the war-461-create-uploadv2-jobs branch April 24, 2025 06:49
Sidddddarth pushed a commit that referenced this pull request Apr 29, 2025
🤖 I have created a release *beep* *boop*
---


##
[1.48.0-rc.2](v1.47.0...v1.48.0-rc.2)
(2025-04-28)


### Features

* introduce common http client for reporting
([#5669](#5669))
([594bdce](594bdce))
* populate bytesPerTable for warehouse process API
([#5737](#5737))
([fd46379](fd46379))
* query load files using upload_id instead of staging_file_id
([#5700](#5700))
([3749ba9](3749ba9))
* support for creating upload v2 notifier jobs
([#5729](#5729))
([dbc830f](dbc830f))
* use header augmenter for router transformer client
([#5640](#5640))
([3749ba9](3749ba9))


### Bug Fixes

* httplb client doesn't respect connection limits
([#5773](#5773))
([ef0a15e](ef0a15e))
* jobsdb payload limit used compressed column sizes instead of actual
payload length
([#5723](#5723))
([c711b25](c711b25))
* race condition in table schema updates causing incorrect schema to be
saved ([#5756](#5756))
([f5ab51a](f5ab51a))
* use copy to load table in append mode for
redshift([#5743](#5743))
([877da25](877da25))
* use warehouse transformer event instead of using processor event
([#5764](#5764))
([f51e260](f51e260))
* version downgrade for databricks-sql-go to 1.6.1
([#5741](#5741))
([c711b25](c711b25))
* warehouse extracting messageId and receivedAt from event payload
([#5757](#5757))
([f5ab51a](f5ab51a))


### Miscellaneous

* add destination type in metrics
([#5727](#5727))
([fa38f34](fa38f34))
* **batchrouter:** limiter cleanup adjust stats and use harmonized
config
([#5783](#5783))
([96aba9d](96aba9d))
* change jobsdb payload column type default to text
([#5746](#5746))
([0f436e7](0f436e7))
* configure pubsub publish settings
([#5755](#5755))
([e481992](e481992))
* **deps:** bump google.golang.org/api from 0.228.0 to 0.229.0 in the
frequent group
([#5734](#5734))
([32854cc](32854cc))
* **deps:** bump the frequent group with 3 updates
([#5769](#5769))
([12b7d96](12b7d96))
* disable transformer compaction by default
([#5766](#5766))
([c504aa0](c504aa0))
* granular configuration for adaptive rate limiting
([#5739](#5739))
([c711b25](c711b25))
* improve BRT performance
([#5730](#5730))
([61642c8](61642c8))
* **jobsdb:** remove jobMinRowsMigrateThres configuration option
([#5763](#5763))
([5d2fae9](5d2fae9))
* processor UT mirroring
([#5710](#5710))
([f4f056c](f4f056c))
* remove payload logging
([#5447](#5447))
([8e08c11](8e08c11))
* trim down tracking plan validation payload
([#5749](#5749))
([e711579](e711579))
* use reloadable limiters
([#5744](#5744))
([d344d40](d344d40))
* use transformer compaction by default
([#5740](#5740))
([53792f2](53792f2))

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


##
[1.48.0](v1.47.0...v1.48.0)
(2025-04-28)


### Features

* introduce common http client for reporting
([#5669](#5669))
([594bdce](594bdce))
* populate bytesPerTable for warehouse process API
([#5737](#5737))
([fd46379](fd46379))
* query load files using upload_id instead of staging_file_id
([#5700](#5700))
([3749ba9](3749ba9))
* support for creating upload v2 notifier jobs
([#5729](#5729))
([dbc830f](dbc830f))
* use header augmenter for router transformer client
([#5640](#5640))
([3749ba9](3749ba9))


### Bug Fixes

* httplb client doesn't respect connection limits
([#5773](#5773))
([ef0a15e](ef0a15e))
* jobsdb payload limit used compressed column sizes instead of actual
payload length
([#5723](#5723))
([c711b25](c711b25))
* race condition in table schema updates causing incorrect schema to be
saved ([#5756](#5756))
([f5ab51a](f5ab51a))
* use copy to load table in append mode for
redshift([#5743](#5743))
([877da25](877da25))
* use warehouse transformer event instead of using processor event
([#5764](#5764))
([f51e260](f51e260))
* version downgrade for databricks-sql-go to 1.6.1
([#5741](#5741))
([c711b25](c711b25))
* warehouse extracting messageId and receivedAt from event payload
([#5757](#5757))
([f5ab51a](f5ab51a))


### Miscellaneous

* add destination type in metrics
([#5727](#5727))
([fa38f34](fa38f34))
* **batchrouter:** limiter cleanup adjust stats and use harmonized
config
([#5783](#5783))
([96aba9d](96aba9d))
* change jobsdb payload column type default to text
([#5746](#5746))
([0f436e7](0f436e7))
* configure pubsub publish settings
([#5755](#5755))
([e481992](e481992))
* **deps:** bump google.golang.org/api from 0.228.0 to 0.229.0 in the
frequent group
([#5734](#5734))
([32854cc](32854cc))
* **deps:** bump the frequent group with 3 updates
([#5769](#5769))
([12b7d96](12b7d96))
* disable transformer compaction by default
([#5766](#5766))
([c504aa0](c504aa0))
* granular configuration for adaptive rate limiting
([#5739](#5739))
([c711b25](c711b25))
* improve BRT performance
([#5730](#5730))
([61642c8](61642c8))
* **jobsdb:** remove jobMinRowsMigrateThres configuration option
([#5763](#5763))
([5d2fae9](5d2fae9))
* processor UT mirroring
([#5710](#5710))
([f4f056c](f4f056c))
* remove payload logging
([#5447](#5447))
([8e08c11](8e08c11))
* trim down tracking plan validation payload
([#5749](#5749))
([e711579](e711579))
* use reloadable limiters
([#5744](#5744))
([d344d40](d344d40))
* use transformer compaction by default
([#5740](#5740))
([53792f2](53792f2))

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

3 participants