-
Notifications
You must be signed in to change notification settings - Fork 1.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix conflict with newer versions of Snowplow tracker #9680
Fix conflict with newer versions of Snowplow tracker #9680
Conversation
This should solve errors like this one when installing dbt followed by Meltano in the same environment: $ python -c 'from dbt.tracking import tracker'
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "/Users/me/contrib/dbt-core/core/dbt/tracking.py", line 105, in <module>
emitter = TimeoutEmitter()
^^^^^^^^^^^^^^^^
File "/Users/me/contrib/dbt-core/core/dbt/tracking.py", line 55, in __init__
super().__init__(
TypeError: Emitter.__init__() got an unexpected keyword argument 'buffer_size' And I can confirm that installing dbt with this patch and then Meltano, that command executes without error. Note that this doesn't solve the issues that come from installing Meltano followed by dbt: $ python -c 'from meltano.core.tracking.tracker import Tracker'
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "/Users/me/meltano/meltano/src/meltano/core/tracking/__init__.py", line 5, in <module>
from meltano.core.tracking.tracker import BlockEvents, Tracker
File "/Users/me/meltano/meltano/src/meltano/core/tracking/tracker.py", line 21, in <module>
from snowplow_tracker import Emitter, SelfDescribing, SelfDescribingJson
ImportError: cannot import name 'SelfDescribing' from 'snowplow_tracker' (/Users/me/meltano/meltano-dbt/venv/lib/python3.11/site-packages/snowplow_tracker/__init__.py) but that should be covered by meltano/meltano#8256 or a derivative. |
Using a kwarg should make this compatible: snowplow/snowplow-python-tracker@f2c6b36
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #9680 +/- ##
==========================================
- Coverage 88.06% 88.02% -0.05%
==========================================
Files 178 178
Lines 22375 22379 +4
==========================================
- Hits 19705 19698 -7
- Misses 2670 2681 +11
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
Hi, I am waiting for this issue to be fixed as it blocks me. Is this going to be merged soon? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, thanks for fixing @edgarrmondragon!
resolves #8719, supersedes #9528
Problem
Instaling
dbt-core
withmeltano
in the same virtualenv breaks dbt because contract conflict betweenminimal-snowplow-tracker
(dependency of dbt) andsnowplow-python-tracker
.Solution
Adds explicit version check and use
minimal
orfull
contract call.Checklist
Based on #8680, by @akurdyukov.