Skip to content

feat: Add configuration validation command #19

Description

@db-tycoon-stephen

Summary

Add uv run validate-config command to validate SnowDDL YAML configurations before deployment.

Motivation

From roadmap Priority 2 (Short-term Improvements):

  • Create shared configuration schema
  • Implement config validation across configs
  • Catch errors before deployment

Proposed Features

  1. Schema validation: Verify YAML structure matches expected format
  2. Reference validation: Check that referenced roles, warehouses, databases exist
  3. Permission validation: Verify grant chains are valid
  4. Duplicate detection: Find duplicate user/role definitions
  5. Warning mode: Non-blocking issues vs blocking errors

Implementation

uv run validate-config              # Validate all configs
uv run validate-config --strict     # Fail on warnings too
uv run validate-config snowddl/user.yaml  # Validate specific file

Acceptance Criteria

  • Command registered in pyproject.toml
  • Validates user.yaml, tech_role.yaml, business_role.yaml
  • Reports errors with file:line references
  • Exit code 0 on success, 1 on errors
  • Unit tests for validation logic

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions