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.68k stars 1.61k forks source link

Fix retry docs generate by marking certain args as False by default. #10742

Open jordivandooren opened 1 week ago

jordivandooren commented 1 week ago

Resolves #10741

Problem

dbt retry raises NoSuchOption after dbt docs generate

Solution

Add static and empty_catalog to the list of flags that are nog saved to the run_results.json file when they are absent. A second strategy could have been to add the exceptions to retry.py top prevent these options (while present in the run results) to be translated into --no-.

Checklist

Type hints could be better; I could not find a clean way to express args should be "dictable" (should have __dict__).

github-actions[bot] commented 1 week ago

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.

codecov[bot] commented 1 week ago

Codecov Report

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

Project coverage is 88.95%. Comparing base (3308a43) to head (4e07487).

Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #10742 +/- ## ========================================== - Coverage 88.97% 88.95% -0.02% ========================================== Files 181 181 Lines 22971 22971 ========================================== - Hits 20438 20435 -3 - Misses 2533 2536 +3 ``` | [Flag](https://app.codecov.io/gh/dbt-labs/dbt-core/pull/10742/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/10742/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=dbt-labs) | `86.13% <100.00%> (-0.02%)` | :arrow_down: | | [unit](https://app.codecov.io/gh/dbt-labs/dbt-core/pull/10742/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=dbt-labs) | `62.39% <100.00%> (ø)` | | 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/10742/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/10742/components?src=pr&el=component&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=dbt-labs) | `62.39% <100.00%> (ø)` | | | [Integration Tests](https://app.codecov.io/gh/dbt-labs/dbt-core/pull/10742/components?src=pr&el=component&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=dbt-labs) | `86.13% <100.00%> (-0.02%)` | :arrow_down: |