Skip to content

fix: handle PodGroup CRD tombstone deletion - #1492

Open
0YHR0 wants to merge 1 commit into
volcano-sh:mainfrom
0YHR0:agent/handle-podgroup-crd-tombstone
Open

fix: handle PodGroup CRD tombstone deletion#1492
0YHR0 wants to merge 1 commit into
volcano-sh:mainfrom
0YHR0:agent/handle-podgroup-crd-tombstone

Conversation

@0YHR0

@0YHR0 0YHR0 commented Aug 4, 2026

Copy link
Copy Markdown
Contributor

What type of PR is this?

/kind bug

What this PR does / why we need it

The PodGroup CRD informer assumed every delete notification contained a direct CustomResourceDefinition object. Kubernetes informers can instead deliver cache.DeletedFinalStateUnknown tombstones when the object is no longer present in the local cache, causing the unchecked type assertion to panic.

This change moves delete handling into a dedicated helper that:

  • handles direct CRD delete events;
  • unwraps tombstone delete events before updating PodGroup support state;
  • logs and ignores unexpected object types instead of panicking.

Regression tests cover direct deletes, tombstone deletes, unexpected objects, and tombstones containing unexpected objects.

Which issue(s) this PR fixes

None.

Special notes for your reviewer

The change only affects the PodGroup CRD informer delete path. Add and update behavior is unchanged.

How was this change tested?

go test ./pkg/model-serving-controller/podgroupmanager -run 'TestHandlePodGroupCRD(Delete|Change)$' -count=1
go test ./pkg/model-serving-controller/podgroupmanager -count=1

Does this PR introduce a user-facing change?

NONE

Signed-off-by: 0YHR0 <97868579@qq.com>
@gemini-code-assist

Copy link
Copy Markdown
Contributor

Caution

The consumer version of Gemini Code Assist on GitHub has been sunset. All code review activity has officially ceased.

@volcano-sh-bot

Copy link
Copy Markdown
Contributor

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by:
Once this PR has been reviewed and has the lgtm label, please assign hzxuzhonghu for approval. For more information see the Kubernetes Code Review Process.

The full list of commands accepted by this bot can be found 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

@0YHR0

0YHR0 commented Aug 5, 2026

Copy link
Copy Markdown
Contributor Author

/retest

@volcano-sh-bot

Copy link
Copy Markdown
Contributor

@0YHR0: Cannot trigger testing until a trusted user reviews the PR and leaves an /ok-to-test message.

Details

In response to this:

/retest

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/test-infra repository.

@kube-gopher kube-gopher left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

/lgtm

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants