Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Metadata trait should return guaranteed Metadata #47

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

clux
Copy link
Member

@clux clux commented Oct 13, 2024

we know if it's there or not.
oversight from last release. upstream also does not do this.

That said, it is possible that we need to do a default deserialize if it ever is missing though.. we kind of do that some places in kube, but only for ListMeta: https://github.com/kube-rs/kube/blob/a6060c47e28dc82355efafa7f00e547fad4038a0/kube-core/src/object.rs#L25-L26

It'd be a bit annoying to not know if .medata exists, but it's technically +optional in the schemas: Pod or newer Eviction...

Going to try to NOT do this first.

we know if it's there or not.

Signed-off-by: clux <[email protected]>
@Danil-Grigorev
Copy link
Member

My feeling is that this +optional is very much not (2015 is very early), and it is best to default the ObjectMeta to an empty content, then to introduce a breaking change in traits of kube-rs. Unrelated discussion, taken out of context upstream revolve around that “metadata is not enough” (meaning they need a superset of it, not something else).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants