Skip to content

fix: swap inverted pod add and update log messages - #3013

Merged
kubernetes-prow[bot] merged 2 commits into
kubernetes-sigs:mainfrom
UgaTheDev:fix-pod-reconciler-log
Aug 10, 2026
Merged

kubernetes-prow[bot] merged 2 commits into
kubernetes-sigs:mainfrom
UgaTheDev:fix-pod-reconciler-log

Conversation

@UgaTheDev

Copy link
Copy Markdown
Contributor

updateDatastore logs the result of PodUpdateOrAddIfNotExist backwards.

The datastore sets its return value to false when an endpoint was not already present, and leaves it true when every endpoint already existed:

result := true
for _, endpointMetadata := range pods {
    _, ok := ds.pods.Load(endpointMetadata.NamespacedName)
    if !ok {
        result = false
    }
    ds.pods.Store(endpointMetadata.NamespacedName, endpointMetadata)
}
return result

The current branches therefore log "Pod added" for an update and "Pod already exists" for a genuine add.

This swaps the two messages. Log text only, no behaviour change. pkg/lwepp/controller/pod_reconciler.go is the only consumer of the return value.

PodUpdateOrAddIfNotExist returns false when an endpoint was not already
present and true when every endpoint already existed. updateDatastore
logs these the wrong way round, reporting "Pod added" for an update and
"Pod already exists" for a genuine add.

Log text only, no behaviour change.

Signed-off-by: Kush Zingade <[email protected]>
@netlify

netlify Bot commented Aug 10, 2026 •

Copy link
Copy Markdown

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

Name Link
🔨 Latest commit 8130df9
🔍 Latest deploy log https://app.netlify.com/projects/gateway-api-inference-extension/deploys/6a7a0c230fbd4c00086faaaa
😎 Deploy Preview https://deploy-preview-3013--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.

@kubernetes-prow kubernetes-prow Bot added the cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. label Aug 10, 2026
@kubernetes-prow

Copy link
Copy Markdown

Hi @UgaTheDev. Thanks for your PR.

I'm waiting for a kubernetes-sigs member to verify that this patch is reasonable to test. If it is, they should reply with /ok-to-test on its own line. Until that is done, I will not automatically test new commits in this PR, but the usual testing commands by org members will still work.

Regular contributors should join the org to skip this step.

Once the patch is verified, the new status will be reflected by the ok-to-test label.

I understand the commands that are listed here.

Details

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-sigs/prow repository.

@kubernetes-prow kubernetes-prow Bot added the needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. label Aug 10, 2026
@kubernetes-prow
kubernetes-prow Bot requested review from elevran and shmuelk August 10, 2026 11:17
@kubernetes-prow kubernetes-prow Bot added the size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. label Aug 10, 2026
@ahg-g

ahg-g commented Aug 10, 2026

Copy link
Copy Markdown
Contributor

/lgtm
/approve
/ok-to-test

@kubernetes-prow kubernetes-prow Bot added ok-to-test Indicates a non-member PR verified by an org member that is safe to test. and removed needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. labels Aug 10, 2026
@kubernetes-prow kubernetes-prow Bot added lgtm "Looks good to me", indicates that a PR is ready to be merged. approved Indicates a PR has been approved by an approver from all required OWNERS files. labels Aug 10, 2026
@ahg-g

ahg-g commented Aug 10, 2026

Copy link
Copy Markdown
Contributor

/lgtm
/approve

@kubernetes-prow

Copy link
Copy Markdown

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: ahg-g, UgaTheDev

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

The pull request process is described here

Details 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

@ahg-g

ahg-g commented Aug 10, 2026

Copy link
Copy Markdown
Contributor

/rebase

@UgaTheDev

Copy link
Copy Markdown
Contributor Author

/retest

@ahg-g

ahg-g commented Aug 10, 2026

Copy link
Copy Markdown
Contributor

Trivy flags golang.org/x/text v0.37.0 for CVE-2026-56852, a HIGH
severity denial of service, fixed in 0.39.0.

The sibling golang.org/x modules move with it because v0.39.0 requires
newer versions of them, so minimal version selection resolves crypto,
mod, net, sys, term and tools up as well.

Signed-off-by: Kush Zingade <[email protected]>
@kubernetes-prow kubernetes-prow Bot added size/M Denotes a PR that changes 30-99 lines, ignoring generated files. and removed lgtm "Looks good to me", indicates that a PR is ready to be merged. size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. labels Aug 10, 2026
@UgaTheDev

Copy link
Copy Markdown
Contributor Author

Done, pushed. Trivy was flagging CVE-2026-56852 in golang.org/x/text v0.37.0, a HIGH severity denial of service, fixed in 0.39.0.

One thing worth a look before merging: bumping it also moves the sibling golang.org/x modules, because v0.39.0 requires newer versions of them and minimal version selection resolves them up. crypto 0.51.0 to 0.53.0, mod 0.36.0 to 0.37.0, net 0.55.0 to 0.56.0, sys 0.45.0 to 0.46.0, term 0.43.0 to 0.44.0 and tools 0.45.0 to 0.47.0. I tried pinning x/text on its own with go mod edit plus go mod tidy and got the same set, so it does not look avoidable.

go build ./... passes and go test ./pkg/lwepp/... is green. Happy to split the bump into its own PR if you would rather keep this one to the log fix.

@ahg-g

ahg-g commented Aug 10, 2026

Copy link
Copy Markdown
Contributor

/lgtm

@kubernetes-prow kubernetes-prow Bot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Aug 10, 2026
@kubernetes-prow
kubernetes-prow Bot merged commit ae2846e into kubernetes-sigs:main Aug 10, 2026
12 checks passed
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. ok-to-test Indicates a non-member PR verified by an org member that is safe to test. size/M Denotes a PR that changes 30-99 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants