Skip to main content
Version: Next

Validate Your Flow Configurations

The Validate Your Flow Configurations feature in Lunar.dev allows users to verify their flow settings before deploying them into production. This validation step is crucial for catching any configuration errors, such as missing parameters, improper connections, or unsupported fields, ensuring that your flows will run smoothly when live.

What the Validation Does​

  • Loads and Parses Configurations: Reads all YAML files in your specified flow, quota, and path directories.
  • Checks Syntax and Structure: Ensures that YAML syntax is correct, with no missing or invalid keys.
  • Validates Connections and Parameters: Confirms that all required parameters, such as filters and processors, are defined.
  • Reports Errors or Success: Provides feedback for any detected issues or, if all is well, confirms that flows are validated successfully.

Key Benefits​

  • Avoid Production Issues: Catch and resolve configuration errors before they affect live traffic.
  • Troubleshoot Quickly: Receive detailed feedback on configuration issues, saving time in debugging.
  • Ensure Compliance: Confirm that flows adhere to Lunar.dev’s structure, avoiding unsupported setups or risky configurations.

Example Use Cases and Responses​

Example 1: Missing Required Fields

If a flow configuration file lacks a required field, the validate_flows command will return an error message like this:

πŸ’” Failed to validate flows: connection from is required in file path: /flows/my_flow.yaml
This message helps you locate the file and missing field, allowing you to add the required field and re-run validation.
Example 2: Invalid YAML Syntax

In cases where the YAML syntax is incorrect (e.g., indentation issues or missing colons), you might see:

πŸ’” Failed to validate flows: YAML syntax error in file /flows/rate_limit.yaml at line 10: unexpected indentation

After fixing the YAML syntax, re-run the validation command.

Example 3: Unsupported Parameters in Flow

If your flow configuration includes unsupported parameters or incorrect types, the validation will fail with an error message like:

πŸ’” Failed to validate flows: unsupported parameter "rate_limit_type" found in /flows/rate_limit.yaml

This error indicates that rate_limit_type is not recognized. Adjust the parameter according to the Lunar.dev documentation, and re-run validation.

Example 4: Successful Validation

When all configurations pass validation, you’ll see a success message:

βœ… Successfully validated flows

This confirmation means your configurations are ready for deployment, and you can confidently load them into production.