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

move events only used by core to dbt/events #9326

Merged
merged 8 commits into from
Jan 4, 2024

Conversation

MichelleArk
Copy link
Contributor

@MichelleArk MichelleArk commented Jan 3, 2024

resolves #9152

Problem

The common subdirectly is being moved to a separate repo (dbt-common) shortly. Currently most events are defined in common, regardless of their usage. A large chunk of these only have usage in core, and should be moved out of common to avoid increasing development overhead (coordinating across multiple repos) when making changes to events only used in core.

Solution

Audit which events defined in common are only used in core (and not by common or adapters), and move those definitions to core.

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
  • This PR includes type annotations for new and modified functions

Ensuring we haven't regressed on cyclical dependencies:

❯ python3 scripts/migrate-adapters.py core/dbt/adapters

migration progress: 100.0% of dbt imports are valid (from adapters or common)
remaining core imports: 0

(also was keeping an eye out as I was changing import paths)

@cla-bot cla-bot bot added the cla:yes label Jan 3, 2024
Copy link
Contributor

github-actions bot commented Jan 3, 2024

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.

Copy link

codecov bot commented Jan 3, 2024

Codecov Report

Attention: 57 lines in your changes are missing coverage. Please review.

Comparison is base (7763212) 86.66% compared to head (30115e4) 86.64%.

Files Patch % Lines
core/dbt/common/events/types_pb2.py 2.32% 42 Missing ⚠️
core/dbt/events/types.py 98.47% 14 Missing ⚠️
core/dbt/task/sql.py 0.00% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #9326      +/-   ##
==========================================
- Coverage   86.66%   86.64%   -0.03%     
==========================================
  Files         221      221              
  Lines       26957    26969      +12     
==========================================
+ Hits        23363    23368       +5     
- Misses       3594     3601       +7     
Flag Coverage Δ
integration 83.58% <83.46%> (-0.03%) ⬇️
unit 65.30% <91.05%> (+0.01%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@MichelleArk MichelleArk changed the title move pre-project loading events (A) to core move events only used by core to dbt/events Jan 3, 2024
@MichelleArk MichelleArk marked this pull request as ready for review January 3, 2024 20:58
@MichelleArk MichelleArk requested a review from a team as a code owner January 3, 2024 20:58
@MichelleArk MichelleArk merged commit 48d9a67 into main Jan 4, 2024
51 checks passed
@MichelleArk MichelleArk deleted the move-core-events-from-common branch January 4, 2024 13:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[CT-3425] Move common events only used in core to core
2 participants