You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Remove usage of dbt.tracking and dbt.flags from dbt/artifacts/schemas/manifest.py. If they were to be left in, these would represent a dependency on dbt internals from an upstream component, and it could not be packaged separately.
github-actionsbot
changed the title
Remove usage of flags and tracking in WritableManifest
[CT-3560] Remove usage of flags and tracking in WritableManifest
Jan 16, 2024
Housekeeping
Short description
Remove usage of dbt.tracking and dbt.flags from dbt/artifacts/schemas/manifest.py. If they were to be left in, these would represent a dependency on dbt internals from an upstream component, and it could not be packaged separately.
Current usage: https://github.com/dbt-labs/dbt-core/pull/9377/files#diff-a0f1c7a8ab56c28a02547801a741a8139854ac72e0e2e8b556f9ebb7d5b9f7ffR15-R16
Acceptance criteria
dbt/artifacts does not contain imports or usage of dbt.tracking or dbt.flags.
Impact to Other Teams
N/A - should be a refactor.
Will backports be required?
nope
Context
The usage of flags here is quite minimal. get_flags().SEND_ANONYMOUS_USAGE_STATS is used as a reference to a global. It could instead be obtained by:
tracking usage is similar: tracking.active_user.id is referenced as a global when it could be set when the caller provides
user_id
only one callsite for WritableManifest instantiation: https://github.com/dbt-labs/dbt-core/blob/main/core/dbt/contracts/graph/manifest.py#L1031
Testing: ensure tests exist for setting of user_id and anonymous_usage_stats on manifest.json artifact
The text was updated successfully, but these errors were encountered: