File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -2614,7 +2614,7 @@ def _context_diff(
26142614 return ContextDiff .create_no_diff (environment , self .state_reader )
26152615
26162616 return ContextDiff .create (
2617- environment = environment ,
2617+ environment = environment or c . PROD ,
26182618 snapshots = snapshots or self .snapshots ,
26192619 create_from = create_from or c .PROD ,
26202620 state_reader = self .state_reader ,
Original file line number Diff line number Diff line change 1414
1515import sys
1616import typing as t
17- import logging
1817
1918from difflib import ndiff , unified_diff
2019from functools import cached_property
4039
4140IGNORED_PACKAGES = {"sqlmesh" , "sqlglot" }
4241
43- logger = logging .getLogger (__name__ )
44-
4542
4643class ContextDiff (PydanticModel ):
4744 """ContextDiff is an object representing the difference between two environments.
@@ -135,7 +132,8 @@ def create(
135132 Returns:
136133 The ContextDiff object.
137134 """
138- initial_environment = environment
135+ initial_environment = environment .lower ()
136+
139137 environment = _get_target_environment (
140138 environment , state_reader , always_compare_against_prod
141139 )
@@ -507,13 +505,7 @@ def _get_target_environment(
507505 if always_compare_against_prod :
508506 prod = state_reader .get_environment (c .PROD )
509507 if prod :
510- logger .warning (
511- f"Comparing against production environment instead of { environment } . Note that this may lead to "
512- "additional backfills as accumulated changes are still pushed to the target environment."
513- )
514508 environment = c .PROD
515- else :
516- environment = environment or c .PROD
517509
518510 return environment .lower ()
519511
You can’t perform that action at this time.
0 commit comments