Skip to content

[Feature] Add pre-deployment validation (dry-run) for tasks #4

@yunqiqiliang

Description

@yunqiqiliang

Problem

Users can deploy tasks with incomplete or invalid configurations, leading to runtime failures:

  • Missing datasource mappings
  • Incompatible table schemas
  • Circular dependencies
  • Invalid cron expressions

Errors are only caught after deployment (TASK_ERROR), requiring rollback and reconfiguration.

Proposed Solution

Add cz-cli task validate <id> [--dry-run] command that checks:

  1. Connectivity: Source/target datasource reachability
  2. Schema Compatibility: Column type mapping, primary key existence
  3. Mapping Completeness: All required tables mapped, no orphan references
  4. Dependency Graph: No circular dependencies, valid execution order
  5. Schedule Validity: Cron expression syntax, timezone correctness

Output a structured risk report:

✅ Datasource connectivity: OK
⚠️  Type mismatch: resource.is_leaf (BIT -> BOOLEAN)
❌ Missing mapping: table 'auth_path' not configured

Expected Benefit

  • Shift error detection left (before deployment).
  • Improve first-time deployment success rate.
  • Provide actionable feedback for configuration fixes.

Priority

🔴 P0

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions