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

add patch_microbatch_event_time #10712

Merged
merged 6 commits into from
Sep 14, 2024
Merged

add patch_microbatch_event_time #10712

merged 6 commits into from
Sep 14, 2024

Conversation

MichelleArk
Copy link
Contributor

@MichelleArk MichelleArk commented Sep 13, 2024

Resolves #10713

Problem

using freeze_time was not a very precise way to patch just the upper bound for microbatch end time calculation.

Solution

Introducing our own method for usage in dbt-core functional tests as well as dbt-test-adapters

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 or 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.

@MichelleArk MichelleArk requested a review from a team as a code owner September 13, 2024 21:10
@cla-bot cla-bot bot added the cla:yes label Sep 13, 2024
Copy link

codecov bot commented Sep 13, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 88.89%. Comparing base (139b9ac) to head (9416373).
Report is 1 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main   #10712   +/-   ##
=======================================
  Coverage   88.89%   88.89%           
=======================================
  Files         180      180           
  Lines       22842    22847    +5     
=======================================
+ Hits        20305    20310    +5     
  Misses       2537     2537           
Flag Coverage Δ
integration 86.09% <100.00%> (+<0.01%) ⬆️
unit 62.44% <60.00%> (-0.01%) ⬇️

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

Components Coverage Δ
Unit Tests 62.44% <60.00%> (-0.01%) ⬇️
Integration Tests 86.09% <100.00%> (+<0.01%) ⬆️

Copy link
Contributor

@QMalcolm QMalcolm left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM! 🚀 Was interesting that we needed to do this, glad you figured it out

Copy link
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.

@MichelleArk MichelleArk added the Skip Changelog Skips GHA to check for changelog file label Sep 13, 2024
@MichelleArk MichelleArk removed the Skip Changelog Skips GHA to check for changelog file label Sep 14, 2024
@MichelleArk
Copy link
Contributor Author

Confirmed this does the tricky for dbt-snowflake: dbt-labs/dbt-snowflake#1179

@MichelleArk MichelleArk merged commit 6c111f2 into main Sep 14, 2024
68 of 69 checks passed
@MichelleArk MichelleArk deleted the patch-microbatch-event-time branch September 14, 2024 02:01
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.

Add test utility to patch microbatch end time
2 participants