vmware-tanzu / cartographer

Cartographer is a Supply Chain Choreographer.
https://cartographer.sh
Apache License 2.0
446 stars 65 forks source link

Report on outputs of objects even if Pipeline changes referenced runTemplate #143

Open waciumawanjohi opened 2 years ago

waciumawanjohi commented 2 years ago

As an operator, I want to get the output of the most recent successful object, even if the runTemplate has changed.

Problem

The reporting of outputs should get all historical objects that have been stamped out by the pipeline. Currently, it gets a subset: the subset of objects that were stamped out with the current runTemplate. E.g. if the pipeline currently pairs with runTemplate A to submit a Tekton PipelineRun, past Tekton PipelineRuns will be considered when reporting outputs. But what if a user changes the Pipeline to refer to a new runTemplate? Will the user expect their Pipeline to continue reporting the output of the old objects until the new object is ready?

Given a runTemplate and Pipeline which are successfully stamping objects and reporting outputs
When the pipeline refers to a new runTemplate and the object created has not finished reconciling
Then the Pipeline can still report the output of the most recently successful object

Pseudo-Example

apiVersion: carto.run/v1alpha1
kind: Pipeline
metadata:
  name: my-pipeline
spec:
  runTemplateRef:
    name: my-run-template.  # <=== when this field changes
waciumawanjohi commented 2 years ago

This issue is similar but distinct from this issue: #142

waciumawanjohi commented 2 years ago

Comments welcome. Would implementing this issue lead to the least surprising behavior? There's a strong argument that when a pipeline refers to a new runTemplate run, any outputs from the previous runTemplate should be ignored.