Skip to content

cli: match job events by object UID - #6174

Open
diiviikk5 wants to merge 1 commit into
volcano-sh:masterfrom
diiviikk5:fix-cli-job-event-identity
Open

diiviikk5 wants to merge 1 commit into
volcano-sh:masterfrom
diiviikk5:fix-cli-job-event-identity

Conversation

@diiviikk5

Copy link
Copy Markdown

What type of PR is this?

/kind bug

What this PR does / why we need it:

vcctl job view and vjobs filter events using the Job name prefix. This can display events from a previous Job or a Pod with the same name, while excluding matching events without that prefix.

Both commands now use the fetched Job's namespace and match involvedObject.uid against the Job UID.

Reproduced on 90125f9f6 using actual CLI binaries against kind Kubernetes 1.36.4. Events were created for a deleted Job, its replacement, and a Pod with the same name. The original commands displayed all three; the fixed commands displayed only the replacement Job's events.

Existing event filtering.

Which issue(s) this PR fixes:

No issue has been opened. Reproduction and evidence are included above.

Special notes for your reviewer:

TestGetEventsUsesJobIdentity covers both commands, namespace selection, unrelated UIDs, and matching events without the name prefix.

Package tests and vet passed after rebasing onto 40b9dca15 on October 26. Live checks ran on October 20 and were not repeated after rebasing.

AI assistance was used while preparing this contribution.

Does this PR introduce a user-facing change?

vcctl and vjobs now show only events belonging to the current Job, excluding events from previous Jobs and other objects with the same name.

Copilot AI balanced review requested due to automatic review settings October 27, 2026 20:52
@volcano-sh-bot volcano-sh-bot added the kind/bug Categorizes issue or PR as related to a bug. label Oct 27, 2026
@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

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Copilot was unable to review this pull request because the user who requested the review has insufficient remaining quota.

@volcano-sh-bot volcano-sh-bot added the size/M Denotes a PR that changes 30-99 lines, ignoring generated files. label Oct 27, 2026
Event names can match a Pod or an older Job with the same name. Use
the involved object UID and the fetched Job namespace for both commands.
@diiviikk5
diiviikk5 force-pushed the fix-cli-job-event-identity branch from c48f004 to 86e1fdd Compare October 27, 2026 20:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

kind/bug Categorizes issue or PR as related to a bug. 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.

3 participants