-
Notifications
You must be signed in to change notification settings - Fork 1.7k
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
Reset invocation_id Between Commands #7317
Conversation
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 contributing guide. |
initialize_from_flags(flags.SEND_ANONYMOUS_USAGE_STATS, flags.PROFILES_DIR) | ||
ctx.with_resource(track_run(run_command=flags.WHICH)) | ||
|
||
# Logging |
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.
I had to move logging initialization above tracking because tracking fires events. Those events won't be sent to the right callbacks unless logging is already initialized.
core/dbt/cli/requires.py
Outdated
@@ -41,14 +41,15 @@ def wrapper(*args, **kwargs): | |||
ctx.obj["flags"] = flags | |||
set_flags(flags) | |||
|
|||
# Tracking | |||
initialize_from_flags(flags.SEND_ANONYMOUS_USAGE_STATS, flags.PROFILES_DIR) |
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.
does this (sets up active_user) need to happen logger initialization, or just before tracking? If it's only necessary for tracking, let's move it down where tracking is initialized for readability
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.
Sounds good.
…on_id being stable between runs
resolves #7197
Description
Reset invocation_id between command invocations.
Checklist
changie new
to create a changelog entry