Skip to content

chore: enable warehouse race test - #5997

Merged
achettyiitr merged 4 commits into
masterfrom
chore.enable-warehouse-race-test
Jun 19, 2025
Merged

achettyiitr merged 4 commits into
masterfrom
chore.enable-warehouse-race-test

Conversation

@achettyiitr

@achettyiitr achettyiitr commented Jun 16, 2025 •

Copy link
Copy Markdown
Member

Description

  • Added support for running tests with race. We just need to pass RACE_ENABLED=true while invoking it.
  • Race condition was happening around Rollback because stmt.Close was not getting closed properly.
  • With 1.22 and above, tc := tc is not required. https://go.dev/blog/loopvar-preview
  • For docker-based setups like (minio.Setup or postgres.Setup), there is a race condition with func (d *Pool) Retry(op func() error) error {. Removing concurrency here.
  • warehouse/slave/worker.go (activeJobId is being accessed concurrently), making it atomic.Int64.

Linear Ticket

  • Resolves WAR-771

Security

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

@achettyiitr
achettyiitr force-pushed the chore.enable-warehouse-race-test branch 10 times, most recently from 1c10427 to 327de52 Compare June 17, 2025 05:38
@achettyiitr
achettyiitr force-pushed the chore.enable-warehouse-race-test branch from 327de52 to 5593b43 Compare June 17, 2025 06:24
@codecov

codecov Bot commented Jun 17, 2025 •

Copy link
Copy Markdown

Codecov Report

Attention: Patch coverage is 86.11111% with 5 lines in your changes missing coverage. Please review.

Project coverage is 76.65%. Comparing base (f327f9f) to head (97d35dc).
Report is 1 commits behind head on master.

Files with missing lines Patch % Lines
warehouse/integrations/clickhouse/clickhouse.go 82.35% 3 Missing ⚠️
warehouse/slave/worker.go 60.00% 1 Missing and 1 partial ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master    #5997      +/-   ##
==========================================
- Coverage   76.69%   76.65%   -0.04%     
==========================================
  Files         515      515              
  Lines       69219    69234      +15     
==========================================
- Hits        53090    53074      -16     
- Misses      13239    13276      +37     
+ Partials     2890     2884       -6     

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

@achettyiitr
achettyiitr merged commit 09e5a91 into master Jun 19, 2025
@achettyiitr
achettyiitr deleted the chore.enable-warehouse-race-test branch June 19, 2025 05:16
This was referenced Jun 23, 2025
atzoum pushed a commit that referenced this pull request Jun 23, 2025
# Description

- Added support for running tests with race. We just need to pass
`RACE_ENABLED=true` while invoking it.
- Race condition was happening around `Rollback` because `stmt.Close`
was not getting closed properly.
- With 1.22 and above, `tc := tc` is not required.
https://go.dev/blog/loopvar-preview
- For docker-based setups like (`minio.Setup` or `postgres.Setup`),
there is a race condition with `func (d *Pool) Retry(op func() error)
error {`. Removing concurrency here.
- warehouse/slave/worker.go (`activeJobId` is being accessed
concurrently), making it `atomic.Int64`.

## Linear Ticket

- Resolves WAR-771

## 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: Ranjeet <[email protected]>
This was referenced Jun 23, 2025
satishrudderstack pushed a commit that referenced this pull request Jun 23, 2025
🤖 I have created a release *beep* *boop*
---


##
[1.53.0-rc.1](v1.52.0...v1.53.0-rc.1)
(2025-06-23)


### Features

* add support for Snowflake Iceberg tables
([#5922](#5922))
([93b3f5e](93b3f5e))


### Bug Fixes

* add golang.org/x/net/html vulnerability
([#5988](#5988))
([92f8c1c](92f8c1c))
* add source type to internalBatch request stats
([#6030](#6030))
([1c8350e](1c8350e))
* add validation to skip disabled destinations to be associated with
accounts
([#5985](#5985))
([06a584c](06a584c))
* signal handling in NotifyContextWithCallback
([#5987](#5987))
([c3fc223](c3fc223))


### Miscellaneous

* add metrics for duplicate events in staging files
([#5998](#5998))
([2e3ffc5](2e3ffc5))
* bump go kit
([#6034](#6034))
([1fcb140](1fcb140))
* create enterprise images with an additional race enabled build
([#5999](#5999))
([f8d2a94](f8d2a94))
* enable warehouse race test
([#5997](#5997))
([baa83f7](baa83f7))
* gateway warehouse integration test
([#5996](#5996))
([861fada](861fada))
* sync release v1.52.1 to main branch
([#6009](#6009))
([deb8c00](deb8c00))
* sync release v1.52.2 to main branch
([#6019](#6019))
([6cdbb65](6cdbb65))
* sync release v1.52.3 to main branch
([#6024](#6024))
([3fecf81](3fecf81))
* sync release v1.52.4 to main branch
([#6027](#6027))
([fbf54fe](fbf54fe))
* sync release v1.52.5 to main branch
([#6032](#6032))
([8f60155](8f60155))
* update nodeSelector for warehouse benchmark deploy
([#6001](#6001))
([4e6d4ac](4e6d4ac))
* use a reloadable config for deciding whether to shudown on
non-reloadable config change
([#6036](#6036))
([3d0a05a](3d0a05a))
* use kitsync.ErrGroup instead of errgroup.Group
([#6011](#6011))
([bba66d6](bba66d6))

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


##
[1.53.0](v1.52.0...v1.53.0)
(2025-06-23)


### Features

* add support for Snowflake Iceberg tables
([#5922](#5922))
([93b3f5e](93b3f5e))


### Bug Fixes

* add golang.org/x/net/html vulnerability
([#5988](#5988))
([92f8c1c](92f8c1c))
* add source type to internalBatch request stats
([#6030](#6030))
([1c8350e](1c8350e))
* add validation to skip disabled destinations to be associated with
accounts
([#5985](#5985))
([06a584c](06a584c))
* signal handling in NotifyContextWithCallback
([#5987](#5987))
([c3fc223](c3fc223))


### Miscellaneous

* add metrics for duplicate events in staging files
([#5998](#5998))
([2e3ffc5](2e3ffc5))
* bump go kit
([#6034](#6034))
([1fcb140](1fcb140))
* create enterprise images with an additional race enabled build
([#5999](#5999))
([f8d2a94](f8d2a94))
* enable warehouse race test
([#5997](#5997))
([baa83f7](baa83f7))
* gateway warehouse integration test
([#5996](#5996))
([861fada](861fada))
* sync release v1.52.1 to main branch
([#6009](#6009))
([deb8c00](deb8c00))
* sync release v1.52.2 to main branch
([#6019](#6019))
([6cdbb65](6cdbb65))
* sync release v1.52.3 to main branch
([#6024](#6024))
([3fecf81](3fecf81))
* sync release v1.52.4 to main branch
([#6027](#6027))
([fbf54fe](fbf54fe))
* sync release v1.52.5 to main branch
([#6032](#6032))
([8f60155](8f60155))
* update nodeSelector for warehouse benchmark deploy
([#6001](#6001))
([4e6d4ac](4e6d4ac))
* use a reloadable config for deciding whether to shudown on
non-reloadable config change
([#6036](#6036))
([3d0a05a](3d0a05a))
* use kitsync.ErrGroup instead of errgroup.Group
([#6011](#6011))
([bba66d6](bba66d6))

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

4 participants