Open wlynch opened 1 year ago
Yes. We need to remove filter for chains. We removed for results also. If chains required some annotation, then it should either write k8s CEL admission policy or webhook.
@wlynch question, should it be on Pipeline
or on PipelineRun
?
I believe either? My expectation would be the annotations trickle down PipelineRun > Pipeline > TaskRun > Task.
Kind of, but ideally, Pipeline
annotations shouldn't affect PipelineRun
, only lower (TaskRun
), … which is not the case today. As today, if you set chains.tekton.dev/transparency-upload=true
on a Pipeline
, the PipelineRun
would inherit it (and in the future, it might not anymore https://github.com/tektoncd/pipeline/pull/6127)
I wanted to raise this discussion again since at this point, Chains e2e tests only run with very old versions of Tekton Pipelines. It is challenging to test against newer features like StepActions etc. I don't have a lot of context so I wanted to ask what should the solution be?
cc @vdemeester @wlynch @khrm
@chitrangpatel do you agree with the above sentence:
ideally,
Pipeline
annotations shouldn't affectPipelineRun
, only lower (TaskRun
), … which is not the case today.
Today, this is messed up, https://github.com/tektoncd/pipeline/pull/6127 is trying to remove this behavior, but it might be a very breaking change (and I didn't really got time or will to keep rebasing at some point). We could make this behavior optional (or behind a feature flag) and switch it later on (giving users relying on it time to adapt).
Yes, I agree with that sentence. So the idea is that we don't want pipelineRun
to inherit anything. It should be explicitly declared there and passed on to the layers below.
i.e. we want annotations to trickle down, not up.
Today, if you look at https://github.com/tektoncd/chains/issues/1117, I think that the issue is that even within a standalone TaskRun, we zap the annotation completely. Isn't that wrong?
I think the issue is that Pipelines is removing the chains annotations completely regardless of whether it is being propagated or not. Please keep me honest here @renzodavid9, @wlynch . I think that's wrong 🤔?
Expected Behavior
If I set
chains.tekton.dev/transparency-upload=true
on a Pipeline, this should propagate down to child Tasks during a run.Actual Behavior
Pipelines controller filters out all
chains.tekton.dev
annotations. This breaks the behavior of thetransparency-enabled: manual
in Chains.See https://tektoncd.slack.com/archives/CJ4ERJWAU/p1697627188085879, https://github.com/tektoncd/pipeline/pull/6441
Steps to Reproduce the Problem
chains.tekton.dev/transparency-upload=true
annotation (e.g. https://github.com/tektoncd/chains/blob/3fe5c46e9a259f3a562f85c115418cb4a1106e00/release/publish.yaml#L21)Additional Info
/cc @vdemeester @khrm