From 277b3c9c21eb983b2800a7e38477a109b8398141 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Edgar=20Ram=C3=ADrez-Mondrag=C3=B3n?= Date: Tue, 6 Feb 2024 15:47:58 -0600 Subject: [PATCH] Use keyword arguments in tracker initialization for compatibility Using a kwarg should make this compatible: https://github.com/snowplow/snowplow-python-tracker/commit/f2c6b3642ebc4a21606dbed01a7f714fa35c97b1 --- core/dbt/tracking.py | 21 ++++++--------------- 1 file changed, 6 insertions(+), 15 deletions(-) diff --git a/core/dbt/tracking.py b/core/dbt/tracking.py index e494a411ac6..c28be8c68ea 100644 --- a/core/dbt/tracking.py +++ b/core/dbt/tracking.py @@ -10,7 +10,7 @@ import pytz import requests from snowplow_tracker import Emitter, SelfDescribingJson, Subject, Tracker -from snowplow_tracker import __version__ as snowplow_version # type: ignore +from snowplow_tracker import __version__ as snowplow_version # type: ignore from snowplow_tracker import logger as sp_logger from dbt import version as dbt_version @@ -107,20 +107,11 @@ def http_get(self, payload): emitter = TimeoutEmitter() - -# workaround in case real snowplow tracker is in the env -if snowplow_version == "0.0.2": - tracker = Tracker( - emitter, - namespace="cf", - app_id="dbt", - ) -else: - tracker = Tracker( - "cf", - emitters=emitter, - app_id="dbt", - ) # type: ignore +tracker = Tracker( + emitters=emitter, + namespace="cf", + app_id="dbt", +) class User: