Skip to content

Conversation

@luiseterc
Copy link
Collaborator

@luiseterc luiseterc commented Nov 10, 2025

Note

Moves the empty name check in GetObjectMetadata to occur before cache lookup and API processing.

  • kube (pkg/kube/objects.go):
    • GetObjectMetadata: Short-circuit return when reference.Name == "" before building cache key/reading cache; removes the later duplicate check.

Written by Cursor Bugbot for commit 7fd3704. This will update automatically on new commits. Configure here.

Copy link

@cursor cursor bot left a comment

Choose a reason for hiding this comment

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

This is the final PR Bugbot will review for you during this billing cycle

Your free Bugbot reviews will reset on December 2

Details

Your team is on the Bugbot Free tier. On this plan, Bugbot will review limited PRs each billing cycle for each member of your team.

To receive Bugbot reviews on all of your PRs, visit the Cursor dashboard to activate Pro and start your 14-day free trial.

// If name is empty, we cannot fetch metadata from API
if reference.Name == "" {
return ObjectMetadata{}, nil
}
Copy link

Choose a reason for hiding this comment

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

Bug: Cache: Empty Name Prevents Unique Object Retrieval

Moving the empty name check before the cache lookup prevents returning valid cached metadata when reference.Name is empty but reference.UID and reference.ResourceVersion are present. The cache key is based on UID and ResourceVersion, so cached data for that object should still be returned even if the name is missing from the current reference, as the UID/ResourceVersion pair uniquely identifies the object.

Fix in Cursor Fix in Web

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