sky-uk / kfp-operator

https://sky-uk.github.io/kfp-operator
BSD 3-Clause "New" or "Revised" License
15 stars 2 forks source link

Remove inlined Status within RunStatus for V1alpha6 #395

Open TobyPinfold opened 2 days ago

TobyPinfold commented 2 days ago

This is a suggestion based off some investigatory work when trying to convert v1alpha5 Runs into v1alpha6. When inlining JSON within a struct it can cause issues:

The latter is preventing us from removing the current implementation of ProviderId marshalling and replacing the marshalling rules within the Status struct instead (This would be much better than the current implementation as it is not possible to marshal and unmarshal a Status struct independently from a whole resource struct. eg Runs).

By applying this PR we can move away from embedding the Status struct in within the RunStatus which frees up the possibility of custom marshalling in v1alpha7 handling the ProviderId conversion to a string field in a cleaner way.

Downsides to this are the Status will be nested within the existing Status field for Runs.

Links to https://github.com/sky-uk/kfp-operator/issues/364 for v1alpha6 changes to api spec