fix: reduce snowplow telemetry timeout from 5s to 1s#12741
Open
claygeo wants to merge 3 commits intodbt-labs:mainfrom
Open
fix: reduce snowplow telemetry timeout from 5s to 1s#12741claygeo wants to merge 3 commits intodbt-labs:mainfrom
claygeo wants to merge 3 commits intodbt-labs:mainfrom
Conversation
claygeo
added a commit
to claygeo/dbt-core
that referenced
this pull request
Mar 30, 2026
claygeo
added a commit
to claygeo/dbt-core
that referenced
this pull request
Mar 30, 2026
84acb92 to
2871e9e
Compare
claygeo
added a commit
to claygeo/dbt-core
that referenced
this pull request
Mar 30, 2026
2871e9e to
16bdeb8
Compare
claygeo
added a commit
to claygeo/dbt-core
that referenced
this pull request
Mar 30, 2026
16bdeb8 to
6905e64
Compare
An unreachable snowplow collector previously stalled dbt for up to 5s (or longer if the underlying TCP stack held the connection open) at the end of every invocation. Reduce both the POST and GET timeouts in TimeoutEmitter to 1s so the failure is near-instant for users with no internet access or a firewalled collector endpoint. Closes dbt-labs#9989
6905e64 to
5751f0e
Compare
MichelleArk
reviewed
Apr 1, 2026
tests/unit/test_tracking.py
Outdated
| assert dbt.tracking.active_user.do_not_track != send_anonymous_usage_stats | ||
|
|
||
|
|
||
| <<<<<<< HEAD |
MichelleArk
reviewed
Apr 1, 2026
Contributor
There was a problem hiding this comment.
This changelog looks extraneous given the one above that references #9989
MichelleArk
reviewed
Apr 1, 2026
| timeout=5.0, | ||
| # Keep the timeout short so that a missing or unreachable collector | ||
| # does not noticeably delay the end of every dbt invocation. | ||
| # See https://github.com/dbt-labs/dbt-core/issues/9989 |
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## main #12741 +/- ##
==========================================
- Coverage 91.39% 88.20% -3.19%
==========================================
Files 203 203
Lines 25841 25841
==========================================
- Hits 23617 22794 -823
- Misses 2224 3047 +823
Flags with carried forward coverage won't be shown. Click here to find out more.
🚀 New features to boost your workflow:
|
Addresses review feedback: - Remove leftover <<<<<<< HEAD conflict marker in test_tracking.py - Remove duplicate changelog YAML (the original Fixes-20260329 entry already covers this change)
Contributor
Author
|
@MichelleArk Thanks for catching those — fixed both:
All commits are GPG signed. |
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.
Summary
Fixes #9989
An unreachable snowplow collector previously stalled dbt for up to several seconds (or longer when the underlying TCP stack holds the connection open past the application timeout) at the end of every invocation.
Reduces both the
POSTandGETtimeouts inTimeoutEmitterfrom5.0to1.0seconds so the failure is near-instant for users with no internet access or a firewalled collector endpoint.Test plan
python -m pytest tests/unit/test_tracking.py -v— 7 tests passTestTimeoutEmitterverify both HTTP methods use a timeout ≤ 2sdbt run— should exit within ~1s of the last model finishing rather than hanging 5+ seconds