HYPERFLEET-732 - fix: remove ksuid and related unused functions to avoid confusion with KSUID usage#88
Conversation
|
Skipping CI for Draft Pull Request. |
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: The full list of commands accepted by this bot can be found here. DetailsNeeds approval from an approver in each of these files:Approvers can indicate their approval by writing |
WalkthroughThe pull request removes the direct Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes 🚥 Pre-merge checks | ✅ 1 | ❌ 2❌ Failed checks (2 warnings)
✅ Passed checks (1 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In `@pkg/logger/operationid_middleware.go`:
- Line 33: Replace the panic-prone uuid.Must(uuid.NewV7()) call by calling
uuid.NewV7() and handling its error in the operation ID middleware: if NewV7
returns a uuid and nil error, use its String(); if it returns an error, do not
panic—log or record the error and fall back to a safe alternative (e.g.,
generate a uuid.NewV4() or compose a deterministic fallback using time+counter)
and assign that to opID; ensure the variable opID is still set and
returned/injected into the request context so downstream code uses a valid ID
even when NewV7 fails.
🪄 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
Run ID: 9e8aff44-d8f4-48fb-923d-0ec5931e2f69
⛔ Files ignored due to path filters (1)
go.sumis excluded by!**/*.sum
📒 Files selected for processing (2)
go.modpkg/logger/operationid_middleware.go
💤 Files with no reviewable changes (1)
- go.mod
…both Cluster and NodePool IDs
5bedf23 to
60aa28b
Compare
Summary
Remove ksuid and related unused functions to avoid confusion with KSUID usage
Test Plan
make test-allpassesmake lintpassesmake test-helm(if applicable)Summary by CodeRabbit