Skip to content
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

Acknowledge send_anonymous_usage_stats setting for python models #933

Merged
merged 9 commits into from
Mar 21, 2024

Conversation

mikealfare
Copy link
Contributor

@mikealfare mikealfare commented Mar 19, 2024

resolves #830

Problem

We're not acknowledging the send_anonymous_usage_stats setting for python models.

Solution

Checklist

  • I have read the contributing guide and understand what's expected of me
  • I have run this code in development and it appears to resolve the stated issue
  • This PR includes tests, or tests are not required/relevant for this PR
  • This PR has no interface changes (e.g. macros, cli, logs, json artifacts, config files, adapter interface, etc) or this PR has already received feedback and approval from Product or DX

@mikealfare mikealfare self-assigned this Mar 19, 2024
@cla-bot cla-bot bot added the cla:yes label Mar 19, 2024
Copy link
Contributor

Thank you for your pull request! We could not find a changelog entry for this change. For details on how to document a change, see the dbt-snowflake contributing guide.

@mikealfare mikealfare changed the title add draft integration test demonstrating the issue Acknowledge send_anonymous_usage_stats setting for python models Mar 19, 2024
@mikealfare mikealfare requested a review from a team March 19, 2024 17:27
@mikealfare mikealfare added the backport 1.7.latest Tag for PR to be backported to the 1.7.latest branch label Mar 20, 2024
Copy link
Contributor

@VersusFacit VersusFacit left a comment

Choose a reason for hiding this comment

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

Looks good but I'm not even sure what we're sending? A little string with the type of model?

snowpark_telemetry_snippet = f"""
if self.config.args.SEND_ANONYMOUS_USAGE_STATS:
snowpark_telemetry_string = "dbtLabs_dbtPython"
snowpark_telemetry_snippet = f"""
import sys
sys._xoptions['snowflake_partner_attribution'].append("{snowpark_telemetry_string}")"""
Copy link
Contributor

Choose a reason for hiding this comment

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

Why's the indenting all weird?

@mikealfare mikealfare merged commit ad7ea4d into main Mar 21, 2024
25 checks passed
@mikealfare mikealfare deleted the bug/python-models/anonymous-usage branch March 21, 2024 19:40
@mikealfare mikealfare added backport 1.7.latest Tag for PR to be backported to the 1.7.latest branch and removed backport 1.7.latest Tag for PR to be backported to the 1.7.latest branch labels Mar 21, 2024
github-actions bot pushed a commit that referenced this pull request Mar 21, 2024
)

* add draft integration test demonstrating the issue
* changie
* condition on the send_anonymous_usage_stats setting when building a python model

(cherry picked from commit ad7ea4d)
mikealfare added a commit that referenced this pull request Mar 21, 2024
…g for python models (#948)

* Acknowledge `send_anonymous_usage_stats` setting for python models (#933)

* add draft integration test demonstrating the issue
* changie
* condition on the send_anonymous_usage_stats setting when building a python model

(cherry picked from commit ad7ea4d)

* update how to turn send_anonymous_usage_stats on and off for 1.7 in the test fixtures

---------

Co-authored-by: Mike Alfare <[email protected]>
Co-authored-by: Mike Alfare <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport 1.7.latest Tag for PR to be backported to the 1.7.latest branch cla:yes
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[ADAP-1031] [Bug] send_anonymous_usage_stats ignored for python models
2 participants