dbt-labs / dbt-core

dbt enables data analysts and engineers to transform their data using the same practices that software engineers use to build applications.
https://getdbt.com
Apache License 2.0
9.96k stars 1.63k forks source link

Validate `--event-time-start` is before `--event-time-end` #10820

Closed QMalcolm closed 1 month ago

QMalcolm commented 1 month ago

Resolves #10786

Problem

A person could specify an --event-time-start that was after --event-time-end or the current time. This would cause bad things to happen ™️

Solution

Validate the cli options such that

Checklist

codecov[bot] commented 1 month ago

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Project coverage is 89.19%. Comparing base (6b9c1da) to head (cad0006). Report is 3 commits behind head on main.

Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #10820 +/- ## ========================================== - Coverage 89.20% 89.19% -0.01% ========================================== Files 183 183 Lines 23402 23416 +14 ========================================== + Hits 20875 20887 +12 - Misses 2527 2529 +2 ``` | [Flag](https://app.codecov.io/gh/dbt-labs/dbt-core/pull/10820/flags?src=pr&el=flags&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=dbt-labs) | Coverage Δ | | |---|---|---| | [integration](https://app.codecov.io/gh/dbt-labs/dbt-core/pull/10820/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=dbt-labs) | `86.49% <100.00%> (-0.01%)` | :arrow_down: | | [unit](https://app.codecov.io/gh/dbt-labs/dbt-core/pull/10820/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=dbt-labs) | `62.11% <57.14%> (-0.01%)` | :arrow_down: | Flags with carried forward coverage won't be shown. [Click here](https://docs.codecov.io/docs/carryforward-flags?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=dbt-labs#carryforward-flags-in-the-pull-request-comment) to find out more. | [Components](https://app.codecov.io/gh/dbt-labs/dbt-core/pull/10820/components?src=pr&el=components&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=dbt-labs) | Coverage Δ | | |---|---|---| | [Unit Tests](https://app.codecov.io/gh/dbt-labs/dbt-core/pull/10820/components?src=pr&el=component&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=dbt-labs) | `62.11% <57.14%> (-0.01%)` | :arrow_down: | | [Integration Tests](https://app.codecov.io/gh/dbt-labs/dbt-core/pull/10820/components?src=pr&el=component&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=dbt-labs) | `86.49% <100.00%> (-0.01%)` | :arrow_down: |