Skip to content

Commit 80865c4

Browse files
committed
Fix: The default start value in the CICD bot config (#2244)
1 parent 28b81ef commit 80865c4

File tree

3 files changed

+4
-11
lines changed

3 files changed

+4
-11
lines changed

sqlmesh/integrations/github/cicd/config.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ class GithubCICDBotConfig(BaseConfig):
2929
merge_method: t.Optional[MergeMethod] = None
3030
command_namespace: t.Optional[str] = None
3131
auto_categorize_changes: CategorizerConfig = CategorizerConfig.all_off()
32-
default_pr_start: t.Optional[TimeLike] = "1 day ago"
32+
default_pr_start: t.Optional[TimeLike] = None
3333
skip_pr_backfill: bool = True
3434
pr_include_unmodified: t.Optional[bool] = None
3535
run_on_deploy_to_prod: bool = True

tests/integrations/github/cicd/test_config.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ def test_load_yaml_config_default(tmp_path):
3434
assert config.cicd_bot.merge_method is None
3535
assert config.cicd_bot.command_namespace is None
3636
assert config.cicd_bot.auto_categorize_changes == CategorizerConfig.all_off()
37-
assert config.cicd_bot.default_pr_start == "1 day ago"
37+
assert config.cicd_bot.default_pr_start is None
3838
assert not config.cicd_bot.enable_deploy_command
3939
assert config.cicd_bot.skip_pr_backfill
4040
assert config.cicd_bot.pr_include_unmodified is None
@@ -106,7 +106,7 @@ def test_load_python_config_defaults(tmp_path):
106106
assert config.cicd_bot.merge_method is None
107107
assert config.cicd_bot.command_namespace is None
108108
assert config.cicd_bot.auto_categorize_changes == CategorizerConfig.all_off()
109-
assert config.cicd_bot.default_pr_start == "1 day ago"
109+
assert config.cicd_bot.default_pr_start is None
110110
assert not config.cicd_bot.enable_deploy_command
111111
assert config.cicd_bot.skip_pr_backfill
112112
assert config.cicd_bot.pr_include_unmodified is None

tests/integrations/github/cicd/test_integration.py

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1214,7 +1214,7 @@ def test_deploy_comment_pre_categorized(
12141214
assert pr_checks_runs[2]["output"]["title"] == "PR Virtual Data Environment: hello_world_2"
12151215
assert (
12161216
pr_checks_runs[2]["output"]["summary"]
1217-
== """<table><thead><tr><th colspan="3">PR Environment Summary</th></tr><tr><th>Model</th><th>Change Type</th><th>Dates Loaded</th></tr></thead><tbody><tr><td>sushi.waiter_revenue_by_day</td><td>Non-breaking</td><td>2022-12-31 - 2022-12-31</td></tr></tbody></table>"""
1217+
== """<table><thead><tr><th colspan="3">PR Environment Summary</th></tr><tr><th>Model</th><th>Change Type</th><th>Dates Loaded</th></tr></thead><tbody><tr><td>sushi.waiter_revenue_by_day</td><td>Non-breaking</td><td>2022-12-25 - 2022-12-31</td></tr></tbody></table>"""
12181218
)
12191219

12201220
assert "SQLMesh - Prod Plan Preview" in controller._check_run_mapping
@@ -1252,13 +1252,6 @@ def test_deploy_comment_pre_categorized(
12521252
12531253
```
12541254
1255-
**Models needing backfill (missing dates):**
1256-
1257-
1258-
* `sushi.waiter_revenue_by_day`: 2022-12-25 - 2022-12-30
1259-
1260-
1261-
12621255
"""
12631256
assert prod_plan_preview_checks_runs[2]["output"]["title"] == "Prod Plan Preview"
12641257
assert (

0 commit comments

Comments
 (0)