pipeline icon indicating copy to clipboard operation
pipeline copied to clipboard

Removal of CustomTaskVersion breaks backwards compatibility

Open stuartwdouglas opened this issue 1 year ago • 1 comments

Expected Behavior

The v1 API should not remove any fields

Actual Behavior

FeatureFlags is referenced through Provenance which is part of the PipelineRun status. Removing a field from FeatureFlags means that the kube object model changes in a non backwards compatible way.

In my case it meant that older client versions can no longer be reliably used, as FeatureFlags does not have 'omitempty' when it is serialized the older client will attempt to send CustomTaskVersion: "" which is rejected by the webhook.

Note that FeatureFlags is also missing all JSON serialization info, so its serialized form is different to other objects in terms of capitalization.

To some extent I can work around this by using Patch instead of Update, but I still thought it was worth raising this so you guys are aware of it.

stuartwdouglas avatar Dec 15 '23 20:12 stuartwdouglas

Yeah I think this is a problem.

@stuartwdouglas just out of curiosity, do you use Provenance in your case? I'm just wondering if the provenance in status makes sense for most use cases.

Yongxuanzhang avatar Dec 19 '23 18:12 Yongxuanzhang