From 6060ac8349489341f4468bf73ad9aaaadf4866a6 Mon Sep 17 00:00:00 2001 From: Anatoli Makarevich Date: Fri, 24 Oct 2025 19:50:31 +0200 Subject: [PATCH 1/5] fix: added missing execution_time param of CLI audit --- sqlmesh/core/context.py | 1 + 1 file changed, 1 insertion(+) diff --git a/sqlmesh/core/context.py b/sqlmesh/core/context.py index bfb8093434..cfe84fb700 100644 --- a/sqlmesh/core/context.py +++ b/sqlmesh/core/context.py @@ -2279,6 +2279,7 @@ def audit( snapshot=snapshot, start=start, end=end, + execution_time=execution_time, snapshots=self.snapshots, ): audit_id = f"{audit_result.audit.name}" From 3866b8ef694fa8ef8a0e08ffe345df61304a4e71 Mon Sep 17 00:00:00 2001 From: Anatoli Makarevich Date: Fri, 24 Oct 2025 20:14:14 +0200 Subject: [PATCH 2/5] fix: make execution_time a positional argument --- sqlmesh/core/context.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sqlmesh/core/context.py b/sqlmesh/core/context.py index cfe84fb700..f530c76c73 100644 --- a/sqlmesh/core/context.py +++ b/sqlmesh/core/context.py @@ -2247,17 +2247,17 @@ def audit( self, start: TimeLike, end: TimeLike, + execution_time: t.Optional[TimeLike] = None, *, models: t.Optional[t.Iterator[str]] = None, - execution_time: t.Optional[TimeLike] = None, ) -> bool: """Audit models. Args: start: The start of the interval to audit. end: The end of the interval to audit. - models: The models to audit. All models will be audited if not specified. execution_time: The date/time time reference to use for execution time. Defaults to now. + models: The models to audit. All models will be audited if not specified. Returns: False if any of the audits failed, True otherwise. From 97fb23c42643c437c0c8d90b71f1fd719e0b0328 Mon Sep 17 00:00:00 2001 From: Anatoli Makarevich Date: Tue, 28 Oct 2025 04:59:04 +0100 Subject: [PATCH 3/5] fix: only allow execution_time passed by keyword --- sqlmesh/core/context.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sqlmesh/core/context.py b/sqlmesh/core/context.py index f530c76c73..a5c00aa02c 100644 --- a/sqlmesh/core/context.py +++ b/sqlmesh/core/context.py @@ -2247,8 +2247,8 @@ def audit( self, start: TimeLike, end: TimeLike, - execution_time: t.Optional[TimeLike] = None, *, + execution_time: t.Optional[TimeLike] = None, models: t.Optional[t.Iterator[str]] = None, ) -> bool: """Audit models. From 919e76a5d051f3958db8f4d187684d161979943f Mon Sep 17 00:00:00 2001 From: Anatoli Makarevich Date: Tue, 28 Oct 2025 04:59:37 +0100 Subject: [PATCH 4/5] fix: restored original params order --- sqlmesh/core/context.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sqlmesh/core/context.py b/sqlmesh/core/context.py index a5c00aa02c..4559c9b2f1 100644 --- a/sqlmesh/core/context.py +++ b/sqlmesh/core/context.py @@ -2248,8 +2248,8 @@ def audit( start: TimeLike, end: TimeLike, *, - execution_time: t.Optional[TimeLike] = None, models: t.Optional[t.Iterator[str]] = None, + execution_time: t.Optional[TimeLike] = None, ) -> bool: """Audit models. From 4c9599a45cdb5de06092e0d3938d4fcd8a39c0ff Mon Sep 17 00:00:00 2001 From: Anatoli Makarevich Date: Tue, 28 Oct 2025 05:00:17 +0100 Subject: [PATCH 5/5] fix: restored original arg order --- sqlmesh/core/context.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sqlmesh/core/context.py b/sqlmesh/core/context.py index 4559c9b2f1..cfe84fb700 100644 --- a/sqlmesh/core/context.py +++ b/sqlmesh/core/context.py @@ -2256,8 +2256,8 @@ def audit( Args: start: The start of the interval to audit. end: The end of the interval to audit. - execution_time: The date/time time reference to use for execution time. Defaults to now. models: The models to audit. All models will be audited if not specified. + execution_time: The date/time time reference to use for execution time. Defaults to now. Returns: False if any of the audits failed, True otherwise.