Bump github.com/kubeservice-stack/common from 1.9.1 to 1.10.0#86
Bump github.com/kubeservice-stack/common from 1.9.1 to 1.10.0#86dependabot[bot] wants to merge 1 commit into
Conversation
|
|
Bumps [github.com/kubeservice-stack/common](https://github.com/kubeservice-stack/common) from 1.9.1 to 1.10.0. - [Release notes](https://github.com/kubeservice-stack/common/releases) - [Changelog](https://github.com/kubeservice-stack/common/blob/main/CHANGELOG.md) - [Commits](kubeservice-stack/common@v1.9.1...v1.10.0) --- updated-dependencies: - dependency-name: github.com/kubeservice-stack/common dependency-version: 1.10.0 dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <support@github.com>
ba1ed7c to
83812bb
Compare
📝 WalkthroughWalkthroughThis PR upgrades the vendored Changeskubeservice-stack/common Dependency Upgrade
Estimated Code Review Effort🎯 2 (Simple) | ⏱️ ~12 minutes Poem
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches📝 Generate docstrings
🧪 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 current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@vendor/github.com/kubeservice-stack/common/pkg/schedule/scheduler.go`:
- Around line 196-197: The Start() signature now returns two values (stopped
chan bool, done <-chan struct{}), so update the callers that currently do
single-value receives: in the goroutines using nodeMemorySecondsSchedule and
nodeCPUSecondsSchedule, call both return values (e.g. stopped, done :=
nodeMemorySecondsSchedule.Start()) and either: a) remove the unnecessary wrapper
goroutine and simply call nodeMemorySecondsSchedule.Start() if you only need it
to run, b) if you must run in a goroutine, capture both returns and use or
forward stopped/done into your shutdown logic, or c) ignore an unused value with
the blank identifier (e.g. _, done := ...) and use done in the receive. Ensure
you reference the Start() returns and wire stopped/done into shutdown handling
or explicitly discard the unused value.
🪄 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: defaults
Review profile: CHILL
Plan: Pro Plus
Run ID: 9b552b0e-c58e-4d03-98de-e5628e1c4dfd
⛔ Files ignored due to path filters (1)
go.sumis excluded by!**/*.sum
📒 Files selected for processing (6)
go.modvendor/github.com/kubeservice-stack/common/pkg/schedule/scheduler.govendor/github.com/kubeservice-stack/common/pkg/utils/map.govendor/github.com/kubeservice-stack/common/pkg/utils/slice.govendor/github.com/kubeservice-stack/common/pkg/utils/strings.govendor/modules.txt
| func (s *Scheduler) Start() (stopped chan bool, done <-chan struct{}) { | ||
| stopped = make(chan bool, 1) |
There was a problem hiding this comment.
🧩 Analysis chain
🏁 Script executed:
#!/bin/bash
set -euo pipefail
# Verify remaining single-value receives against Start() in scheduler callers.
# Expected after fix: no matches.
rg -nP --type=go -C2 '<-\s*[[:alnum:]_\.]+\s*\.Start\(\s*\)' pkg/scheduleRepository: kubeservice-stack/node-metrics
Length of output: 442
🏁 Script executed:
#!/bin/bash
set -euo pipefail
# 1) Confirm exact Start() signatures + lifecycle behavior in vendor scheduler.go
sed -n '175,240p' vendor/github.com/kubeservice-stack/common/pkg/schedule/scheduler.go
echo "----"
sed -n '240,310p' vendor/github.com/kubeservice-stack/common/pkg/schedule/scheduler.go
# 2) Find all downstream single-value receive patterns that would break with a 2-return Start()
rg -nP --type=go -C2 '<-\s*[^)\n]+\.Start\(\s*\)' .
# 3) Find any obvious single-value assignment/use of Start() (still often compile-breaking)
rg -nP --type=go -C2 '\b\w+\s*(:=|=)\s*[^;\n]*\.Start\(\s*\)' .
# 4) Narrow to schedule package only (requested evidence from original comment)
rg -nP --type=go -C2 '<-\s*[[:alnum:]_\.]+\s*\.Start\(\s*\)' pkg/scheduleRepository: kubeservice-stack/node-metrics
Length of output: 2922
🏁 Script executed:
#!/bin/bash
set -euo pipefail
# Re-run searches but don't stop on rg "no matches" / "matches" exit codes.
set +e
echo "## single-value receive from Start() (breaks if Start now returns 2 values)"
rg -nP --type=go -C2 '<-\s*[^)\n]+\.Start\(\s*\)' . || true
echo "## single-value assignment from Start()"
rg -nP --type=go -C2 '\b\w+\s*(:=|=)\s*[^;\n]*\.Start\(\s*\)' . || true
echo "## single-value use inside go func / wrapper (common patterns)"
rg -nP --type=go -C2 'go\s+func\(\s*\)\s*\{\s*(<-\s*[^)\n]+\.Start\(\s*\)|[^;\n]*\.Start\(\s*\))' . || trueRepository: kubeservice-stack/node-metrics
Length of output: 641
🏁 Script executed:
#!/bin/bash
set -euo pipefail
sed -n '70,130p' pkg/schedule/memory.go
echo "----"
sed -n '40,100p' pkg/schedule/cpu.goRepository: kubeservice-stack/node-metrics
Length of output: 2058
🏁 Script executed:
#!/bin/bash
set -euo pipefail
set +e
echo "## package-level Start() receive: <-Start()"
rg -nP --type=go -C2 '<-\s*Start\(\s*\)' . || true
echo "## package-level Start() assignment: x := Start()"
rg -nP --type=go -C2 '\b\w+\s*(:=|=)\s*Start\(\s*\)' . || true
echo "## any Start() calls whose result is used as single value (heuristic): <-(...Start())"
rg -nP --type=go -C2 '<-\s*\(?[^;\n]*Start\(\s*\)?' . || trueRepository: kubeservice-stack/node-metrics
Length of output: 642
Fix downstream Start() callers for the new two-value return contract.
vendor/github.com/kubeservice-stack/common/pkg/schedule/scheduler.go now defines Start() as func (s *Scheduler) Start() (stopped chan bool, done <-chan struct{}) (and closes doneCh on exit); it also updates the package-level Start() to return the same two values. Remaining consumers still do single-value receives:
pkg/schedule/memory.go:go func() { <-nodeMemorySecondsSchedule.Start() }()pkg/schedule/cpu.go:go func() { <-nodeCPUSecondsSchedule.Start() }()
Update these call sites to handle both return values (or remove the unnecessary wrapper goroutine if you only need the scheduler to run) and wire stopped/done into shutdown if required.
Suggested caller-side fix pattern
- go func() {
- <-nodeCPUSecondsSchedule.Start()
- }()
+ nodeCPUSecondsSchedule.Start()🤖 Prompt for 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.
In `@vendor/github.com/kubeservice-stack/common/pkg/schedule/scheduler.go` around
lines 196 - 197, The Start() signature now returns two values (stopped chan
bool, done <-chan struct{}), so update the callers that currently do
single-value receives: in the goroutines using nodeMemorySecondsSchedule and
nodeCPUSecondsSchedule, call both return values (e.g. stopped, done :=
nodeMemorySecondsSchedule.Start()) and either: a) remove the unnecessary wrapper
goroutine and simply call nodeMemorySecondsSchedule.Start() if you only need it
to run, b) if you must run in a goroutine, capture both returns and use or
forward stopped/done into your shutdown logic, or c) ignore an unused value with
the blank identifier (e.g. _, done := ...) and use done in the receive. Ensure
you reference the Start() returns and wire stopped/done into shutdown handling
or explicitly discard the unused value.
Bumps github.com/kubeservice-stack/common from 1.9.1 to 1.10.0.
Release notes
Sourced from github.com/kubeservice-stack/common's releases.
Commits
495bdc7update code optimizations (#143)6983e6echore(deps): bump github.com/redis/go-redis/v9 from 9.16.0 to 9.19.0 (#140)678433cBump github.com/asjdf/gorm-cache from 1.2.3 to 1.3.0 (#142)0d32466Bump go.opentelemetry.io/contrib/samplers/jaegerremote (#137)df4ee5bupdate package (#136)c4176ceBump kentaro-m/auto-assign-action from 2.0.1 to 2.0.2 (#133)87c732bBump codecov/codecov-action from 5.5.2 to 6.0.0 (#134)4dceb1dBump actions/setup-go from 6.2.0 to 6.4.0 (#135)2f42ed6Bump kentaro-m/auto-assign-action from 2.0.0 to 2.0.1 (#130)997e6a8Bump actions/setup-go from 6.1.0 to 6.2.0 (#129)Summary by CodeRabbit
Bug Fixes
Performance
Chores