rehanvdm / cdk-express-pipeline

CDK Express Pipelines is a library built on the AWS CDK, allowing you to define pipelines in a CDK-native method. It leverages the CDK CLI to compute and deploy the correct dependency graph between Waves, Stages, and Stacks using the .addDependency method, making it build-system agnostic and an alternative to AWS CDK Pipelines.
Apache License 2.0
26 stars 1 forks source link

Feature Request: graph visualization from dry run #8

Open garysassano opened 1 week ago

garysassano commented 1 week ago

It would be helpful to have a way to visualize all waves, stages, and stacks that would be deployed if you were to run cdk deploy.

A visual representation similar to the example image below could provide a clear overview of the deployment process:

image

Feature Details:

This feature would enhance the user experience by offering better insight into the deployment sequence before execution.

rehanvdm commented 1 week ago

At the moment it will give you the order whenever you do a cdk command like synth/diff/deploy. The order will be printed out in the CLI. It does not show the dependency each stack has with the previous wave as in this image, it will just show a dependency between stacks in a stage with an ↳.

https://github.com/rehanvdm/cdk-express-pipeline-demo-ts?tab=readme-ov-file#diffyml image

ORDER OF DEPLOYMENT
🌊 Waves  - Deployed sequentially
🔲 Stages - Deployed in parallel, all stages within a wave are deployed at the same time
📄 Stack  - Dependency driven, will be deployed after all its dependent stacks, denoted by ↳ below it, is deployed

🌊 Wave1
  🔲 Stage1
    📄 StackA (Wave1_Stage1_StackA)
    📄 StackB (Wave1_Stage1_StackB)
        ↳ StackA
🌊 Wave2
  🔲 Stage1
    📄 StackC (Wave2_Stage1_StackC)

In https://github.com/rehanvdm/cdk-express-pipeline/issues/5 I'm making an improvement by adding a | next to the lines above that will be deployed to show what is selected.

BUT there are no dry runs/visualizations like the one you described above. Would a mermaid diagram be something that you are looking for?

garysassano commented 1 week ago

A Mermaid diagram could work for visualizing the order and dependencies. The idea is to generate an artifact during a dry run in a pipeline, showing exactly what will be applied and in what order.