Skip to content

remove unused CtrIDs from PodInfo - #2071

Merged
hami-robot[bot] merged 1 commit into
Project-HAMi:masterfrom
DSFans2014:refactor/clean-CtrIDs
Jul 15, 2026
Merged

remove unused CtrIDs from PodInfo#2071
hami-robot[bot] merged 1 commit into
Project-HAMi:masterfrom
DSFans2014:refactor/clean-CtrIDs

Conversation

@DSFans2014

@DSFans2014 DSFans2014 commented Jul 15, 2026

Copy link
Copy Markdown
Member

What type of PR is this?

/kind cleanup

What this PR does / why we need it:

Remove the unused CtrIDs field from PodInfo

Which issue(s) this PR fixes:
Fixes #

Special notes for your reviewer:

Does this PR introduce a user-facing change?:

Summary by CodeRabbit

  • Bug Fixes

    • Improved consistency when copying pod information, ensuring node and device details remain isolated between copies.
  • Maintenance

    • Simplified pod metadata by removing the deprecated container ID field. Integrations that access this public field may need to update their handling accordingly.

Signed-off-by: james <open4pd@4paradigm.com>
@coderabbitai

coderabbitai Bot commented Jul 15, 2026

Copy link
Copy Markdown

Review Change Stack

📝 Walkthrough

Walkthrough

PodInfo no longer contains CtrIDs. Its deep-copy implementation and device/pod tests were updated to reflect the reduced data model and retain validation of remaining fields.

Changes

PodInfo contract update

Layer / File(s) Summary
PodInfo model and deep copy
pkg/device/pods.go
Removes the exported CtrIDs field and its slice-copy logic from PodInfo.DeepCopy().
PodInfo test alignment
pkg/device/pod_test.go, pkg/device/devices_test.go
Updates fixtures and assertions for pod operations and deep-copy behavior to omit CtrIDs while retaining remaining checks.

Estimated code review effort: 2 (Simple) | ~10 minutes

Possibly related PRs

Poem

I’m a bunny with fewer fields to carry,
No CtrIDs slowing down my hop.
Deep copies still keep nodes safe,
Tests now match the smaller shape.
Carrot cheers for every clean-up crop! 🐰

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately and concisely describes the main change: removing the unused CtrIDs field from PodInfo.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@github-actions github-actions Bot added kind/enhancement New feature or request and removed kind/cleanup labels Jul 15, 2026

@gemini-code-assist gemini-code-assist Bot 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.

Code Review

This pull request removes the unused CtrIDs field from the PodInfo struct in pkg/device/pods.go, along with its deep copy logic. It also cleans up all associated references, initializations, and assertions in the unit tests across pkg/device/devices_test.go and pkg/device/pod_test.go. I have no feedback to provide as there are no review comments.

Important

The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.

@DSFans2014 DSFans2014 changed the title refactor: remove unused CtrIDs from PodInfo remove unused CtrIDs from PodInfo Jul 15, 2026
@github-actions github-actions Bot removed the kind/enhancement New feature or request label Jul 15, 2026
@codecov

codecov Bot commented Jul 15, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

Flag Coverage Δ
unittests 59.75% <ø> (-0.01%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

Files with missing lines Coverage Δ
pkg/device/pods.go 73.04% <ø> (-0.19%) ⬇️
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@Shouren Shouren 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

@hami-robot hami-robot Bot added the lgtm label Jul 15, 2026
@hami-robot

hami-robot Bot commented Jul 15, 2026

Copy link
Copy Markdown
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: DSFans2014, Shouren

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

@hami-robot
hami-robot Bot merged commit 3166c1a into Project-HAMi:master Jul 15, 2026
32 of 35 checks passed
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.

2 participants