Skip to content

minor updates to typed-name #1113

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

Merged
merged 1 commit into from
Jul 8, 2025

Conversation

nirrozenbaum
Copy link
Contributor

Signed-off-by: Nir Rozenbaum <[email protected]>
Copy link

netlify bot commented Jul 4, 2025

Deploy Preview for gateway-api-inference-extension ready!

Name Link
🔨 Latest commit 13004b1
🔍 Latest deploy log https://app.netlify.com/projects/gateway-api-inference-extension/deploys/68676cc075692f0008497e82
😎 Deploy Preview https://deploy-preview-1113--gateway-api-inference-extension.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@k8s-ci-robot k8s-ci-robot added the cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. label Jul 4, 2025
@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: nirrozenbaum

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@k8s-ci-robot k8s-ci-robot requested review from kfswain and robscott July 4, 2025 05:55
@k8s-ci-robot k8s-ci-robot added approved Indicates a PR has been approved by an approver from all required OWNERS files. size/S Denotes a PR that changes 10-29 lines, ignoring generated files. labels Jul 4, 2025
func (tn *TypedName) String() string {
return tn.Type + Separator + tn.Name
return tn.Name + separator + tn.Type
Copy link
Member

Choose a reason for hiding this comment

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

Would this be a breaking change to existing usage though?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

TLDR:
nope. this field is mainly used for logging.

more details if you're interested:
TypedName was introduced recently with the understanding that we could potentially have multiple instances of the same plugin type, and then we may distinguish them by name (name is optional, type is mandatory).
the idea behind this change is to keep similar behavior as NamespacedName - so if both fields exist we get name/type, if no name was defined we get /type (instead of current implementation that returns type/).

this is similar to NamespacedName, where Name is mandatory and Ns is optional (for cluster-scoped resources), so we either get back ns/name or /name for cluster-scoped resources.

Copy link
Member

Choose a reason for hiding this comment

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

Sounds good

@kfswain
Copy link
Collaborator

kfswain commented Jul 8, 2025

/lgtm

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Jul 8, 2025
@k8s-ci-robot k8s-ci-robot merged commit c204c89 into kubernetes-sigs:main Jul 8, 2025
9 checks passed
@nirrozenbaum nirrozenbaum deleted the typed-name branch July 9, 2025 09:54
EyalPazz pushed a commit to EyalPazz/gateway-api-inference-extension that referenced this pull request Jul 9, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. lgtm "Looks good to me", indicates that a PR is ready to be merged. size/S Denotes a PR that changes 10-29 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants