Skip to content

fix: update hami commit - #109

Merged
hami-robot[bot] merged 5 commits into
Project-HAMi:mainfrom
DSFans2014:fix/nodelock-commit
Jul 16, 2026
Merged

fix: update hami commit#109
hami-robot[bot] merged 5 commits into
Project-HAMi:mainfrom
DSFans2014:fix/nodelock-commit

Conversation

@DSFans2014

@DSFans2014 DSFans2014 commented Jul 13, 2026

Copy link
Copy Markdown
Member

When using HAMi vNPU with Volcano and enabling node lock, the node lock value stored in Volcano is a timestamp. However, the ReleaseNodeLock function called in ascend-device-plugin expects the lock value to contain the pod's namespace and name. Since the timestamp format does not match the lock is never released.
this problem has been fixed in Project-HAMi/HAMi#2054
the main changes as below:

  • update HAMi commit in go.mod
  • upgrade go version to 1.26.2
  • fix Error return value of xxx is not checked lint error
  • use json.Marshal to encode the device directly as the implement of MarshalNodeDevices is changed
  • upgrade golangci-lint and change the related conf

Summary by CodeRabbit

Summary by CodeRabbit

  • Chores

    • Updated CI Go toolchain to 1.26.2 and refreshed linting tooling (including golangci-lint and the workflow/action versions).
    • Updated lint configuration/formatting rules to the newer scheme.
  • Bug Fixes

    • Improved cleanup/close handling across monitoring and file operations to avoid propagating close errors.
    • Fixed device registration payload handling and aligned request field validation; updated related tests accordingly.

@hami-robot
hami-robot Bot requested a review from archlitchi July 13, 2026 07:11
@coderabbitai

coderabbitai Bot commented Jul 13, 2026

Copy link
Copy Markdown

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: 82ecc70c-8ea0-4b3d-9c96-8ee429ff276c

📥 Commits

Reviewing files that changed from the base of the PR and between d1fb395 and 7f8ac79.

⛔ Files ignored due to path filters (1)
  • go.sum is excluded by !**/*.sum
📒 Files selected for processing (12)
  • .github/workflows/ci.yml
  • .golangci.yml
  • Makefile
  • go.mod
  • internal/monitor/container.go
  • internal/monitor/registry.go
  • internal/server/allocate.go
  • internal/server/register.go
  • internal/server/server.go
  • internal/server/server_test.go
  • internal/server/util.go
  • internal/wachers.go
🚧 Files skipped from review as they are similar to previous changes (10)
  • internal/wachers.go
  • internal/monitor/registry.go
  • internal/monitor/container.go
  • .golangci.yml
  • internal/server/util.go
  • .github/workflows/ci.yml
  • internal/server/server.go
  • internal/server/server_test.go
  • internal/server/register.go
  • go.mod

📝 Walkthrough

Walkthrough

The PR updates Go and golangci-lint tooling, refreshes module versions, changes device registration and allocation handling, and makes cleanup error discards explicit across monitoring and server utilities.

Changes

Tooling and module updates

Layer / File(s) Summary
CI and lint configuration
.github/workflows/ci.yml, .golangci.yml, Makefile
CI uses Go 1.26.2 and golangci-lint v7/v2.1.0; lint configuration adopts schema version 2, revised linters, formatters, exclusions, and the v2 installation path.
Go module updates
go.mod
The Go directive, direct and indirect dependencies, and HAMi replacement target are updated.

Server and cleanup updates

Layer / File(s) Summary
Server registration and allocation
internal/server/register.go, internal/server/server.go, internal/server/server_test.go
Registration marshals devices with JSON and records Ascend910 network IDs; the plugin server embeds the generated unimplemented service and uses DevicesIds in allocation validation and tests.
Resource cleanup handling
internal/monitor/*, internal/server/allocate.go, internal/server/util.go, internal/wachers.go
Close and removal results are explicitly discarded across shared-memory, file, watcher, gRPC, and container-directory cleanup paths.

Estimated code review effort: 3 (Moderate) | ~25 minutes

Sequence Diagram(s)

sequenceDiagram
  participant PluginServer
  participant DeviceManager
  participant HAMiAPI
  PluginServer->>DeviceManager: Get Ascend910 network ID
  DeviceManager-->>PluginServer: Return NetworkID
  PluginServer->>HAMiAPI: Send JSON-marshaled device payload
Loading

Suggested reviewers: archlitchi

Poem

A rabbit checks the Go toolchain bright,
And tidies errors out of sight.
Devices hop with networks named,
While lint and modules are neatly framed.
“Sniff!” says the bunny, “the build is tamed.”

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 50.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title matches the main change by noting the HAMi commit update, which is the core fix in this PR.
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.
✨ 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.

@hami-robot hami-robot Bot added the size/XS label Jul 13, 2026
@DSFans2014
DSFans2014 force-pushed the fix/nodelock-commit branch 4 times, most recently from 5d8b92f to 4fbc07b Compare July 13, 2026 07:38

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In @.github/workflows/ci.yml:
- Line 47: Update the golangci-lint configuration to the v2 schema before
retaining the v2.0.2 CI version, migrating exclusion settings under
linters.exclusions.* and formatter configuration to formatters.enable so
golangci-lint config verify succeeds.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: 99924dd4-50c9-4a1c-8c49-44a72b48da51

📥 Commits

Reviewing files that changed from the base of the PR and between fce6ed6 and 5d8b92f.

📒 Files selected for processing (2)
  • .github/workflows/ci.yml
  • go.mod

Comment thread .github/workflows/ci.yml Outdated
@DSFans2014
DSFans2014 force-pushed the fix/nodelock-commit branch 2 times, most recently from 1469544 to 974a9d2 Compare July 13, 2026 07:47
@hami-robot hami-robot Bot added size/S and removed size/XS labels Jul 13, 2026
@DSFans2014
DSFans2014 force-pushed the fix/nodelock-commit branch 5 times, most recently from 36eafff to f08c1b3 Compare July 13, 2026 08:10
@hami-robot hami-robot Bot added size/M and removed size/S labels Jul 13, 2026
@DSFans2014
DSFans2014 force-pushed the fix/nodelock-commit branch 2 times, most recently from 5fd7b8f to 14e2395 Compare July 13, 2026 08:24
@DSFans2014
DSFans2014 marked this pull request as draft July 13, 2026 08:24
@DSFans2014
DSFans2014 force-pushed the fix/nodelock-commit branch 2 times, most recently from 1873624 to 0937342 Compare July 13, 2026 08:41
@hami-robot hami-robot Bot added size/L and removed size/M labels Jul 13, 2026
@DSFans2014

Copy link
Copy Markdown
Member Author

@coderabbitai review

@coderabbitai

coderabbitai Bot commented Jul 13, 2026

Copy link
Copy Markdown
✅ Action performed

Review finished.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In @.golangci.yml:
- Around line 1-21: Update the Makefile’s golangci-lint installation pin from
v1.61.0 to a compatible v2.x release, so make lint can parse the version 2
configuration in .golangci.yml and remains aligned with CI.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: ba4319fc-6725-492a-a34d-e89ae1ffaa42

📥 Commits

Reviewing files that changed from the base of the PR and between 5d8b92f and d1fb395.

⛔ Files ignored due to path filters (1)
  • go.sum is excluded by !**/*.sum
📒 Files selected for processing (11)
  • .github/workflows/ci.yml
  • .golangci.yml
  • go.mod
  • internal/monitor/container.go
  • internal/monitor/registry.go
  • internal/server/allocate.go
  • internal/server/register.go
  • internal/server/server.go
  • internal/server/server_test.go
  • internal/server/util.go
  • internal/wachers.go
🚧 Files skipped from review as they are similar to previous changes (1)
  • .github/workflows/ci.yml

Comment thread .golangci.yml
@DSFans2014
DSFans2014 force-pushed the fix/nodelock-commit branch from d1fb395 to c8f8a88 Compare July 13, 2026 10:57
Signed-off-by: james <open4pd@4paradigm.com>
Signed-off-by: james <open4pd@4paradigm.com>
Signed-off-by: james <open4pd@4paradigm.com>
Signed-off-by: james <open4pd@4paradigm.com>
Signed-off-by: james <open4pd@4paradigm.com>
@DSFans2014
DSFans2014 force-pushed the fix/nodelock-commit branch from c8f8a88 to 7f8ac79 Compare July 15, 2026 08:18
@DSFans2014
DSFans2014 marked this pull request as ready for review July 15, 2026 08:30

@archlitchi archlitchi 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 commented Jul 16, 2026

Copy link
Copy Markdown
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

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

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 added the approved label Jul 16, 2026
@hami-robot
hami-robot Bot merged commit 958d508 into Project-HAMi:main Jul 16, 2026
11 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