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

ignore exceptions that happen during anonymous tracking #1180

Closed
drewbanin opened this issue Dec 11, 2018 · 0 comments
Closed

ignore exceptions that happen during anonymous tracking #1180

drewbanin opened this issue Dec 11, 2018 · 0 comments
Labels
bug Something isn't working
Milestone

Comments

@drewbanin
Copy link
Contributor

Issue

Issue description

Anonymous event tracking should never impact deployments of dbt. If exceptions occur during the tracking of anonymous events, dbt should log them to the debug logs and carry on with tracking disabled for the rest of the run.

Example traceback:

[Errno 13] Permission denied: '/.dbt'
Traceback (most recent call last):
  File "/usr/local/lib/python3.7/site-packages/dbt/main.py", line 76, in main
    results, succeeded = handle_and_check(args)
  File "/usr/local/lib/python3.7/site-packages/dbt/main.py", line 120, in handle_and_check
    dbt.tracking.initialize_tracking()
  File "/usr/local/lib/python3.7/site-packages/dbt/tracking.py", line 275, in initialize_tracking
    active_user.initialize()
  File "/usr/local/lib/python3.7/site-packages/dbt/tracking.py", line 51, in initialize
    cookie = self.get_cookie()
  File "/usr/local/lib/python3.7/site-packages/dbt/tracking.py", line 71, in get_cookie
    user = self.set_cookie()
  File "/usr/local/lib/python3.7/site-packages/dbt/tracking.py", line 62, in set_cookie
    dbt.clients.system.make_directory(cookie_dir)
  File "/usr/local/lib/python3.7/site-packages/dbt/clients/system.py", line 85, in make_directory
    raise e
  File "/usr/local/lib/python3.7/site-packages/dbt/clients/system.py", line 79, in make_directory
    os.makedirs(path)
  File "/usr/local/lib/python3.7/os.py", line 221, in makedirs
    mkdir(name, mode)
PermissionError: [Errno 13] Permission denied: '/.dbt'

System information

The output of dbt --version:

0.12.1

The operating system you're running on:
Linux

The python version you're using (probably the output of python --version)
3.7

@drewbanin drewbanin added the bug Something isn't working label Dec 11, 2018
@drewbanin drewbanin added this to the Stephen Girard milestone Dec 11, 2018
@cmcarthur cmcarthur modified the milestones: Stephen Girard, Grace Kelly Dec 12, 2018
beckjake added a commit that referenced this issue Dec 14, 2018
make tracking use the profile directory, and suppress errors (#1180)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants