Fix TimingInfoCollected event (Z010) never fired in compile_and_execute#12581
Open
kalluripradeep wants to merge 6 commits intodbt-labs:mainfrom
Open
Fix TimingInfoCollected event (Z010) never fired in compile_and_execute#12581kalluripradeep wants to merge 6 commits intodbt-labs:mainfrom
kalluripradeep wants to merge 6 commits intodbt-labs:mainfrom
Conversation
… when using --warn-error-options
>> >> Event Z010 was defined but never emitted anywhere, meaning --debug >> mode did not surface compile/execute phase timing as expected. >> >> Fire TimingInfoCollected after each timing block in compile_and_execute >> so users can see per-phase timing in --debug output and dbt.log. >> >> Also fixes test that had a silent conditional check masking the bug.
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 contributing guide. |
3 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Fixes a bug where the
TimingInfoCollectedevent (Z010) was defined incore/dbt/events/types.pybut never fired anywhere in the codebase.This meant that even with
--debugmode, users could not see compile/execute phase timing for individual models in standard log output — contrary to the expected behavior described in #12189.Changes
core/dbt/task/base.py: FireTimingInfoCollectedafter eachcollect_timing_infoblock incompile_and_execute— once for the compile phase and once for the execute phasetests/functional/logging/test_logging.py: Strengthened existing test to assertTimingInfoCollectedactually fires, rather than a silent conditional check that would never fail even if the event was missingTesting
The existing
test_basicfunctional test now asserts the event fires. No new test infrastructure needed.Notes
This is a
DebugLevelevent so it only appears in:dbt.log(always, since log file defaults to debug level)--debugNo INFO-level log changes, so no behavior change flag needed per @graciegoheen's guidance.