Skip to content

Conversation

liu-cong
Copy link
Contributor

@liu-cong liu-cong commented Jul 18, 2025

The code returns an internal podSet map which can be modified in a separate request goroutines. The fix is to return a deep copy of the map.

This regression was introduced in a recent refactor.

@k8s-ci-robot k8s-ci-robot added the cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. label Jul 18, 2025
@k8s-ci-robot k8s-ci-robot requested review from ahg-g and robscott July 18, 2025 02:06
@k8s-ci-robot k8s-ci-robot added the size/S Denotes a PR that changes 10-29 lines, ignoring generated files. label Jul 18, 2025
Copy link

netlify bot commented Jul 18, 2025

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

Name Link
🔨 Latest commit 1496497
🔍 Latest deploy log https://app.netlify.com/projects/gateway-api-inference-extension/deploys/6879ac043ae62c00088cdfe9
😎 Deploy Preview https://deploy-preview-1188--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.

@kfswain
Copy link
Collaborator

kfswain commented Jul 18, 2025

/lgtm
/approve

Totally unrelated to the fix I do wonder if we should make the podSets value a bool instead of a struct. I kinda poked around and it didnt look like we are using the struct for anything. I've always seen sets represented with a bool value. But not a big deal, I just saw the struct and it made me curious

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Jul 18, 2025
@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: kfswain, liu-cong

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 added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Jul 18, 2025
@k8s-ci-robot k8s-ci-robot merged commit 7182f8f into kubernetes-sigs:main Jul 18, 2025
9 checks passed
@nirrozenbaum
Copy link
Contributor

nirrozenbaum commented Jul 18, 2025

/lgtm /approve

Totally unrelated to the fix I do wonder if we should make the podSets value a bool instead of a struct. I kinda poked around and it didnt look like we are using the struct for anything. I've always seen sets represented with a bool value. But not a big deal, I just saw the struct and it made me curious

why not using k8s set which encapsulates the map behind it? definitely more readable. see example:

pluginNames := sets.New[string]() // set of plugin names, a name must be unique

if pluginNames.Has(pluginConfig.Name) {
return fmt.Errorf("plugin name '%s' used more than once", pluginConfig.Name)
}
pluginNames.Insert(pluginConfig.Name)

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