Open MartinWeindel opened 1 week ago
This issue is currently awaiting triage.
If a SIG or subproject determines this is a relevant issue, they will accept it by applying the triage/accepted
label and provide further guidance.
The triage/accepted
label can be added by org members by writing /triage accepted
in a comment.
/sig api-machinery
The
conversion-gen
tool produces wrong conversion code for a pointer to a struct, if source and destination struct have multiple members of the same type, but the member ordering is different.Here is an example to show the issue for an extended struct from k8s.io/code-generator/examples/apiserver/apis/example:
Type
example/v1
:and the internal type:
Note, that the ordering of the members
Start
andEnd
have been changed.Converting
example/v1
tov1
shows that the values have been swapped:The complete example code can be found here