Skip to content

Validate deployment dependency graph before pipeline execution #495

@temma02

Description

@temma02

Description

DependencyGraph is fully implemented and tested in apps/backend/tests/deployment/dependency-graph.test.ts but is never consulted before a deployment pipeline starts. Circular dependencies or missing nodes can cause silent mid-pipeline failures.

Requirements and context

  • Must be secure, tested, and documented where applicable
  • Should stay reviewable and fit the current monorepo structure
  • Relevant files: apps/backend/tests/deployment/dependency-graph.test.ts, apps/backend/src/services/deployment-pipeline.service.ts

Suggested execution

  • Create branch: issue-021-validate-deployment-dependency-graph
  • Keep changes scoped to the issue and reference the task IDs in the PR

Implement changes

  • Build the dependency graph from the deployment's template and customization config at pipeline start
  • Call hasCycle() and reject with a descriptive error if a cycle is detected
  • Log the topologicalOrder to deployment_logs at info level for observability

Test and commit

  • Add pipeline tests for: valid graph proceeds, cyclic graph rejected, missing node rejected
  • Verify the deployment status is set to failed with a user-readable message on rejection
  • Edge case: single-node graph (no dependencies) must always pass validation

Example commit message

feat(pipeline): validate dependency graph before execution

Guidelines

  • Prefer small, reviewable PRs
  • Keep naming and data contracts consistent with the spec docs

Metadata

Metadata

Assignees

Labels

Stellar WaveIssues in the Stellar wave program

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions