Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions docs/docs/reference/project-files/rill-yaml.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
2 changes: 2 additions & 0 deletions runtime/drivers/registry.go
Original file line number Diff line number Diff line change
Expand Up @@ -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 in Rill temporarily.
DisableModels bool `mapstructure:"rill.models.disable"`
}

// ResolveOLAPConnector resolves the OLAP connector to default to for the instance.
Expand Down
3 changes: 3 additions & 0 deletions runtime/parser/schema/rillyaml.schema.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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."
Expand Down
4 changes: 4 additions & 0 deletions runtime/reconcilers/model.go
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down
Loading