Skip to content

Commit 5b8c682

Browse files
committed
PR Feedback 2
1 parent 0d6def1 commit 5b8c682

File tree

4 files changed

+8
-6
lines changed

4 files changed

+8
-6
lines changed

sqlmesh/core/context.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -451,7 +451,7 @@ def snapshot_evaluator(self, job_id: t.Optional[CorrelationId] = None) -> Snapsh
451451
if job_id not in self._snapshot_evaluators:
452452
self._snapshot_evaluators[job_id] = SnapshotEvaluator(
453453
{
454-
gateway: adapter.with_settings(level=logging.INFO, job_id=job_id)
454+
gateway: adapter.with_settings(log_level=logging.INFO, job_id=job_id)
455455
for gateway, adapter in self.engine_adapters.items()
456456
},
457457
ddl_concurrent_tasks=self.concurrent_tasks,

sqlmesh/core/engine_adapter/base.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -147,13 +147,13 @@ def __init__(
147147
self._multithreaded = multithreaded
148148
self._job_id = job_id
149149

150-
def with_settings(self, level: int, **kwargs: t.Any) -> EngineAdapter:
150+
def with_settings(self, log_level: int, **kwargs: t.Any) -> EngineAdapter:
151151
adapter = self.__class__(
152152
self._connection_pool,
153153
dialect=self.dialect,
154154
sql_gen_kwargs=self._sql_gen_kwargs,
155155
default_catalog=self._default_catalog,
156-
execute_log_level=level,
156+
execute_log_level=log_level,
157157
register_comments=self._register_comments,
158158
null_connection=True,
159159
multithreaded=self._multithreaded,

sqlmesh/utils/__init__.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -389,8 +389,10 @@ def to_snake_case(name: str) -> str:
389389

390390

391391
class JobType(Enum):
392-
PLAN = "PLAN"
393-
RUN = "RUN"
392+
PLAN = "SQLMESH_PLAN"
393+
394+
395+
RUN = "SQLMESH_RUN"
394396

395397

396398
@dataclass(frozen=True)

tests/core/test_integration.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6485,7 +6485,7 @@ def _correlation_id_in_sqls(correlation_id: CorrelationId, mock_logger):
64856485
plan = ctx.plan(auto_apply=True, no_prompts=True)
64866486

64876487
correlation_id = CorrelationId.from_plan(plan)
6488-
assert str(correlation_id) == f"PLAN: {plan.plan_id}"
6488+
assert str(correlation_id) == f"SQLMESH_PLAN: {plan.plan_id}"
64896489

64906490
assert _correlation_id_in_sqls(correlation_id, mock_logger)
64916491

0 commit comments

Comments
 (0)