Large deployment pipelines with multiple children results in huge pipeline body
Issue Summary:
For large k8s deployment pipelines with multiple parent levels the pipeline body grows exponentially causing high load on the DB.
Description:
Usecase
Some of our teams have large deployments of tightly coupled components on multiple services, clusters, regions and environments. The way the deployment is structured: Level 1: Generic deployment pipeline for one service Level 2: Deployment pipeline for multiple coupled services Level 3: Deployment for one region Level 4: Deploy full env Level 5: Full deploy: dev->stage->prod
Each child pipeline Level 1 pipeline has its own bake + deploy stages so it can be executed independent
This flow helps us create wave deployments.
The full deployment evolves to a tree like:

Steps to Reproduce:
Problem 1:
Each leaf of the tree (Level 1 pipelines) produces k8s manifests after deployments and appends to output. I can see in the pipeline outputs, the manifests multiplied under different keys: outputs.createdArtifacts, optionalArtifacts etc.
Problem 2:
Each child pipeline receives as trigger the entire parent pipeline payload. For the leaf pipeline it results into 5 levels of nested trigger -> parentPipeline
Each problem by its own does not cause any issue, but hitting both the pipelines become unmanageable.
Additional Details:
Both issues are currently in progress:
https://github.com/spinnaker/spinnaker/issues/5909
https://github.com/spinnaker/orca/pull/3986
Alternative
Introduce a flag in PipelineStage context e.g. skipDownstreamOutput which can be introduced at the desired parent level that clears the output from pipeline. This ends up in splitting the tree into smaller sub-trees and manageable pipelines without loosing the ability to have large orchestrations and modular pipelines.
Source: spinnaker/spinnaker