Schedule icon
Log icon
Commands icon
Docker icon
If icon
SlackIncomingWebhook icon

Kestra Flow Correctness Linter and Pebble Validator

Static linter and correctness validator for Kestra workflows auditing Pebble expressions, task output bindings, and duplicate IDs.

Categories
Core

Orchestrate an automated static correctness linter for Kestra workflows that inspects YAML topologies, cross-references Pebble template bindings ({{ outputs.task_id.* }}) against declared task trees, validates inputs, and detects duplicate task IDs before execution.

In production Kestra environments, the most common source of workflow failures is subtle typos in Pebble expressions (e.g., referencing a renamed task ID or missing output property). This blueprint provides an automated, lightweight correctness gate:

  1. Topology Schema Audit: Verifies required top-level keys (id, namespace, tasks) and ensures all declared task IDs are unique.
  2. Pebble Expression Cross-Referencing: Scans all {{ outputs.<task_id>.* }} references and confirms the upstream task actually exists in the execution topology.
  3. Input Binding Verification: Validates that all {{ inputs.<variable> }} references match declared input definitions.
  4. Automated Status Notifications: Sends execution summaries and broken reference warnings directly to team Slack channels.

How it works

  1. Trigger & Scope: Runs on demand or on a scheduled cron (0 * * * *) to audit workflows across a designated namespace hierarchy.
  2. Containerized Static Linter (validate_flow_correctness): Dispatches a lightweight Python container (python:3.11-slim) to parse YAML trees, extract Pebble expression tokens, and validate dependency lineage.
  3. Decision & Alerting (evaluate_audit_results): Uses native Kestra conditional branching to notify developer channels of successful verification or broken bindings.

What you get

  • Zero-dependency static linting for declarative Kestra workflows.
  • Automatic detection of broken Pebble output bindings and undefined input variables.
  • Safeguard against duplicate task IDs that cause execution serialization collisions.
  • Automated Slack alerts on syntax and reference regressions.

Who it's for

  • Platform Engineers and Kestra Administrators managing multi-tenant namespaces.
  • Data Engineers and Workflow Authors wanting pre-commit or CI/CD workflow validation.
  • DevOps Teams integrating automated flow linting into GitOps pipelines.

Prerequisites

  • Docker daemon accessible to Kestra for containerized execution.
  • Slack Incoming Webhook URL configured in Kestra secrets (if Slack alerts are enabled).

Secrets

  • SLACK_WEBHOOK_URL: Slack Incoming Webhook endpoint for team alerts.

Inputs

Name Type Default Description
target_namespace STRING company Namespace hierarchy to audit.
audit_mode SELECT Strict Linter evaluation mode (Strict, Permissive).
fail_on_errors BOOL true Fail flow execution if syntax or reference errors are found.

Quick start runbook

  1. Configure secret SLACK_WEBHOOK_URL in your Kestra namespace.
  2. Trigger the flow manually from the Kestra UI to audit workflow topologies.
  3. Inspect the execution logs and outputs to review validated task counts and reference integrity.

Links

See How

New to Kestra?

Use blueprints to kickstart your first workflows.