Skip to content

Fix TimingInfoCollected event (Z010) never fired in compile_and_execute#12581

Open
kalluripradeep wants to merge 6 commits intodbt-labs:mainfrom
kalluripradeep:fix/timing-info-collected-never-fired
Open

Fix TimingInfoCollected event (Z010) never fired in compile_and_execute#12581
kalluripradeep wants to merge 6 commits intodbt-labs:mainfrom
kalluripradeep:fix/timing-info-collected-never-fired

Conversation

@kalluripradeep
Copy link
Contributor

Summary

Fixes a bug where the TimingInfoCollected event (Z010) was defined in core/dbt/events/types.py but never fired anywhere in the codebase.

This meant that even with --debug mode, 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: Fire TimingInfoCollected after each collect_timing_info block in compile_and_execute — once for the compile phase and once for the execute phase
  • tests/functional/logging/test_logging.py: Strengthened existing test to assert TimingInfoCollected actually fires, rather than a silent conditional check that would never fail even if the event was missing

Testing

The existing test_basic functional test now asserts the event fires. No new test infrastructure needed.

Notes

This is a DebugLevel event so it only appears in:

  • dbt.log (always, since log file defaults to debug level)
  • Console output when running with --debug

No INFO-level log changes, so no behavior change flag needed per @graciegoheen's guidance.

>>
>> 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.
@kalluripradeep kalluripradeep requested a review from a team as a code owner March 3, 2026 10:00
@cla-bot cla-bot bot added the cla:yes label Mar 3, 2026
@github-actions github-actions bot added the community This PR is from a community member label Mar 3, 2026
@github-actions
Copy link
Contributor

github-actions bot commented Mar 3, 2026

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

cla:yes community This PR is from a community member

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant