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

Allow Meta lookup to work across ObjectType and ListMeta #1969

Merged
merged 5 commits into from
Oct 23, 2014

Conversation

smarterclayton
Copy link
Contributor

Extracted from #1600

  • Unify meta methods for the API patterns in API
  • Prepare for removing runtime.TypeMeta accessors
  • Add UID to meta.Accessor

Prepares for the meta object to front multiple underlying types
when TypeMeta and ObjectMeta is split in internal and v1beta3, but
combined in v1beta1 and v1beta2
@thockin
Copy link
Member

thockin commented Oct 23, 2014

Can you explain for dummies like me why this is better than just finding and returning a *TypeMeta?

@smarterclayton
Copy link
Contributor Author

Different api objects have different metas, so you can't cast them in memory (v1beta1 vs 2). I think eventually we can split support into internal vs non internal and have internal return *ObjectMeta and *TypeMeta for the fast path.

For now though I wanted to do the mechanical transformations.

On Oct 23, 2014, at 12:06 AM, Tim Hockin notifications@github.com wrote:

Can you explain for dummies like me why this is better than just finding and returning a *TypeMeta?


Reply to this email directly or view it on GitHub.

@thockin
Copy link
Member

thockin commented Oct 23, 2014

Ahh, right. This is not just different internal type, but internal AND
external

On Wed, Oct 22, 2014 at 9:43 PM, Clayton Coleman notifications@github.com
wrote:

Different api objects have different metas, so you can't cast them in
memory (v1beta1 vs 2). I think eventually we can split support into
internal vs non internal and have internal return *ObjectMeta and *TypeMeta
for the fast path.

For now though I wanted to do the mechanical transformations.

On Oct 23, 2014, at 12:06 AM, Tim Hockin notifications@github.com
wrote:

Can you explain for dummies like me why this is better than just finding
and returning a *TypeMeta?

Reply to this email directly or view it on GitHub.

Reply to this email directly or view it on GitHub
#1969 (comment)
.

@lavalamp
Copy link
Member

This is in my queue as soon as I fix e2e

return a, nil
}

// NewResourceVersioner returns a ResourceVersioner that can set or
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What do you think about killing ResourceVersioner & SelfLinker and making everyone use Accessor?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe in a different change.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I like it - I'll queue up an issue for it. Once we need to access annotations generically that becomes important as well.

@lavalamp
Copy link
Member

LGTM, comments more or less optional

@smarterclayton
Copy link
Contributor Author

Added review comments about renaming and the nits. Will remove SelfLinker and ResourceVersioner indirection and duplication in latest and apis in a follow on issue.

@lavalamp
Copy link
Member

LGTM

lavalamp added a commit that referenced this pull request Oct 23, 2014
Allow Meta lookup to work across ObjectType and ListMeta
@lavalamp lavalamp merged commit e46af6e into kubernetes:master Oct 23, 2014
@smarterclayton smarterclayton deleted the new_typemeta branch February 11, 2015 02:21
bertinatto pushed a commit to bertinatto/kubernetes that referenced this pull request Jun 18, 2024
OCPBUGS-33711: Bump to Kubernetes v1.28.10
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.

3 participants