From 53dd506bc9c33bd7c67b43a02837020f18616902 Mon Sep 17 00:00:00 2001 From: Anshul Khandelwal <12948312+k-anshul@users.noreply.github.com> Date: Fri, 26 Jun 2026 16:35:44 +0530 Subject: [PATCH 1/2] Add a env to disable execution of models --- runtime/drivers/registry.go | 2 ++ runtime/reconcilers/model.go | 4 ++++ 2 files changed, 6 insertions(+) diff --git a/runtime/drivers/registry.go b/runtime/drivers/registry.go index 6ffd7c27b3c..b4b9e315408 100644 --- a/runtime/drivers/registry.go +++ b/runtime/drivers/registry.go @@ -143,6 +143,8 @@ type InstanceConfig struct { ModelPartitionsWarnOnFailure bool `mapstructure:"rill.model.partitions_warn_on_failure"` // ModelTestsWarnOnFailure: when true, model test failures are surfaced as non-blocking warnings instead of errors. ModelTestsWarnOnFailure bool `mapstructure:"rill.model.tests_warn_on_failure"` + // DisableModels: when true, model execution is disabled. Useful for stopping any ingestion from Rill temporarily. + DisableModels bool `mapstructure:"rill.model.disable"` } // ResolveOLAPConnector resolves the OLAP connector to default to for the instance. diff --git a/runtime/reconcilers/model.go b/runtime/reconcilers/model.go index fc09a0bee9c..d90d6bea8a0 100644 --- a/runtime/reconcilers/model.go +++ b/runtime/reconcilers/model.go @@ -152,6 +152,10 @@ func (r *ModelReconciler) Reconcile(ctx context.Context, n *runtimev1.ResourceNa defer cancel() } + if cfg.DisableModels { // Global disable + return runtime.ReconcileResult{Err: errors.New("model execution is paused")} + } + // Handle deletion if self.Meta.DeletedOn != nil { if prevManager != nil { From 49ccba599bcff33c44eebd55dcbf6aff772d72e8 Mon Sep 17 00:00:00 2001 From: Anshul Khandelwal <12948312+k-anshul@users.noreply.github.com> Date: Fri, 26 Jun 2026 18:16:20 +0530 Subject: [PATCH 2/2] property change --- docs/docs/reference/project-files/rill-yaml.md | 2 ++ runtime/drivers/registry.go | 4 ++-- runtime/parser/schema/rillyaml.schema.yaml | 3 +++ 3 files changed, 7 insertions(+), 2 deletions(-) diff --git a/docs/docs/reference/project-files/rill-yaml.md b/docs/docs/reference/project-files/rill-yaml.md index 87758c0c139..8208bf78a6c 100644 --- a/docs/docs/reference/project-files/rill-yaml.md +++ b/docs/docs/reference/project-files/rill-yaml.md @@ -146,6 +146,8 @@ _[object]_ - A map of key-value pairs for setting variables on your project. It - **`rill.model.tests_warn_on_failure`** - _[boolean]_ - When true, model test failures are surfaced as non-blocking warnings instead of errors. Default: true in `prod`, false otherwise. + - **`rill.models.disable`** - _[boolean]_ - When true, model execution is disabled. Useful for stopping any ingestion in Rill temporarily. Default: false. + - **`rill.metrics.approximate_comparisons`** - _[boolean]_ - Rewrite metrics comparison queries to use an approximate, faster form. Approximate comparisons may not return data points for all values. Default: true. - **`rill.metrics.approximate_comparisons_cte`** - _[boolean]_ - Rewrite metrics comparison queries to use a CTE for the base query. Default: false. diff --git a/runtime/drivers/registry.go b/runtime/drivers/registry.go index b4b9e315408..993ee9f023f 100644 --- a/runtime/drivers/registry.go +++ b/runtime/drivers/registry.go @@ -143,8 +143,8 @@ type InstanceConfig struct { ModelPartitionsWarnOnFailure bool `mapstructure:"rill.model.partitions_warn_on_failure"` // ModelTestsWarnOnFailure: when true, model test failures are surfaced as non-blocking warnings instead of errors. ModelTestsWarnOnFailure bool `mapstructure:"rill.model.tests_warn_on_failure"` - // DisableModels: when true, model execution is disabled. Useful for stopping any ingestion from Rill temporarily. - DisableModels bool `mapstructure:"rill.model.disable"` + // DisableModels: when true, model execution is disabled. Useful for stopping any ingestion in Rill temporarily. + DisableModels bool `mapstructure:"rill.models.disable"` } // ResolveOLAPConnector resolves the OLAP connector to default to for the instance. diff --git a/runtime/parser/schema/rillyaml.schema.yaml b/runtime/parser/schema/rillyaml.schema.yaml index 73c99642f3f..29d67f3fab8 100644 --- a/runtime/parser/schema/rillyaml.schema.yaml +++ b/runtime/parser/schema/rillyaml.schema.yaml @@ -142,6 +142,9 @@ allOf: rill.model.tests_warn_on_failure: type: boolean description: "When true, model test failures are surfaced as non-blocking warnings instead of errors. Default: true in `prod`, false otherwise." + rill.models.disable: + type: boolean + description: "When true, model execution is disabled. Useful for stopping any ingestion in Rill temporarily. Default: false." rill.metrics.approximate_comparisons: type: boolean description: "Rewrite metrics comparison queries to use an approximate, faster form. Approximate comparisons may not return data points for all values. Default: true."