note that conversion doesn't guarantee a deepcopy
The conversion interface currently doesn't say anything about deepcopy vs no deepcopy. We should take a position on this.
cc @droot
/kind documentation
The Convertible interface requires it to be a runtime.Object which implies it implements DeepCopyObject() Object. Did I miss anything?
type Convertible interface {
runtime.Object
ConvertTo(dst Hub) error
ConvertFrom(src Hub) error
}
@DirectXMan12 can you elaborate more on deepcopy vs no deepcopy ?
Right, but we don't specify if ConvertTo and ConvertFrom need to call DeepCopy themselves. Can ConvertTo and ConvertFrom safely re-use pointers to data from the source object? Is it expected that anyone who calls deepcopy doesn't care what becomes of source (this is true for conversion webhooks, but we should add a note).
TL;DR: in Rust terminology, does ConvertTo take an immutable reference to self, or does it consume self?
Issues go stale after 90d of inactivity.
Mark the issue as fresh with /remove-lifecycle stale.
Stale issues rot after an additional 30d of inactivity and eventually close.
If this issue is safe to close now please do so with /close.
Send feedback to sig-testing, kubernetes/test-infra and/or fejta. /lifecycle stale
/remove-lifecycle stale /good-first-issue
@DirectXMan12: This request has been marked as suitable for new contributors.
Please ensure the request meets the requirements listed here.
If this request no longer meets these requirements, the label can be removed
by commenting with the /remove-good-first-issue command.
In response to this:
/remove-lifecycle stale /good-first-issue
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.
/help
Need to mostly add documentation.
Issues go stale after 90d of inactivity.
Mark the issue as fresh with /remove-lifecycle stale.
Stale issues rot after an additional 30d of inactivity and eventually close.
If this issue is safe to close now please do so with /close.
Send feedback to sig-testing, kubernetes/test-infra and/or fejta. /lifecycle stale
/lifecycle frozen