Skip to content

Bump github.com/kubeservice-stack/common from 1.9.1 to 1.10.0#86

Open
dependabot[bot] wants to merge 1 commit into
masterfrom
dependabot/go_modules/github.com/kubeservice-stack/common-1.10.0
Open

Bump github.com/kubeservice-stack/common from 1.9.1 to 1.10.0#86
dependabot[bot] wants to merge 1 commit into
masterfrom
dependabot/go_modules/github.com/kubeservice-stack/common-1.10.0

Conversation

@dependabot

@dependabot dependabot Bot commented on behalf of github May 25, 2026

Copy link
Copy Markdown
Contributor

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.

Release v1.10.0

What's Changed

Full Changelog: kubeservice-stack/common@v1.9.1...v1.10.0

Commits
  • 495bdc7 update code optimizations (#143)
  • 6983e6e chore(deps): bump github.com/redis/go-redis/v9 from 9.16.0 to 9.19.0 (#140)
  • 678433c Bump github.com/asjdf/gorm-cache from 1.2.3 to 1.3.0 (#142)
  • 0d32466 Bump go.opentelemetry.io/contrib/samplers/jaegerremote (#137)
  • df4ee5b update package (#136)
  • c4176ce Bump kentaro-m/auto-assign-action from 2.0.1 to 2.0.2 (#133)
  • 87c732b Bump codecov/codecov-action from 5.5.2 to 6.0.0 (#134)
  • 4dceb1d Bump actions/setup-go from 6.2.0 to 6.4.0 (#135)
  • 2f42ed6 Bump kentaro-m/auto-assign-action from 2.0.0 to 2.0.1 (#130)
  • 997e6a8 Bump actions/setup-go from 6.1.0 to 6.2.0 (#129)
  • Additional commits viewable in compare view

Summary by CodeRabbit

  • Bug Fixes

    • Strengthened type conversion safety in utility functions, preventing runtime errors on invalid type assertions.
    • Enhanced scheduler goroutine completion signaling for improved lifecycle management.
  • Performance

    • Optimized string manipulation operations and slice randomization algorithms.
  • Chores

    • Updated common utility library dependencies to the latest versions.

@dependabot dependabot Bot added dependencies Pull requests that update a dependency file go Pull requests that update Go code labels May 25, 2026
@CLAassistant

Copy link
Copy Markdown

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.
You have signed the CLA already but the status is still pending? Let us recheck it.

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>
@dependabot dependabot Bot force-pushed the dependabot/go_modules/github.com/kubeservice-stack/common-1.10.0 branch from ba1ed7c to 83812bb Compare June 8, 2026 03:34
@pull-request-size pull-request-size Bot added size/XS and removed size/S labels Jun 8, 2026
@coderabbitai

coderabbitai Bot commented Jun 8, 2026

Copy link
Copy Markdown

Review Change Stack

📝 Walkthrough

Walkthrough

This PR upgrades the vendored github.com/kubeservice-stack/common dependency from v1.9.1 to v1.10.0. The upgrade introduces a new completion-channel return from the Scheduler.Start() API and hardens multiple utility functions with safer type assertions and improved documentation.

Changes

kubeservice-stack/common Dependency Upgrade

Layer / File(s) Summary
Dependency Version Declarations
go.mod, vendor/modules.txt
Updated module version from v1.9.1 to v1.10.0 and bumped Go toolchain version from 1.24.0 to 1.26 in the vendor manifest.
Scheduler Completion Channel API
vendor/github.com/kubeservice-stack/common/pkg/schedule/scheduler.go
Scheduler.Start() now returns a tuple of (stopped chan bool, done <-chan struct{}) instead of just the stopped channel. The goroutine defers closing the done channel. Both the receiver method and package-level Start() function wrapper were updated to forward both channels.
Utility Package Type-Safety and Documentation
vendor/github.com/kubeservice-stack/common/pkg/utils/map.go, vendor/github.com/kubeservice-stack/common/pkg/utils/slice.go, vendor/github.com/kubeservice-stack/common/pkg/utils/strings.go
Map utilities (ToMapStrings, Strings) now safely type-assert values and added GoDoc comments for Keys and Values. Slice utilities replaced direct assertions with ok-check patterns in InterfacesToStrings, ToStringDict, and ToStrings; also changed RNG seeding strategy and reimplemented SliceShuffle with Fisher–Yates algorithm. String utilities optimized GetBetweenStr to use direct slicing and expanded documentation for String2Bytes and Bytes2String to document zero-copy semantics and memory-sharing risks.

Estimated Code Review Effort

🎯 2 (Simple) | ⏱️ ~12 minutes

Poem

🐰 A dependency hops from point-nine to one-dot-ten,
With safer type checks and a scheduler's done-when,
The utilities now guard against type misdeclare,
No panics at runtime—just robust, careful care! ✨

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 43.75% 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 clearly and accurately summarizes the main change: a dependency version bump from 1.9.1 to 1.10.0 for github.com/kubeservice-stack/common, which is the sole purpose of 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.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch dependabot/go_modules/github.com/kubeservice-stack/common-1.10.0

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

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

📥 Commits

Reviewing files that changed from the base of the PR and between 2890ed6 and 83812bb.

⛔ Files ignored due to path filters (1)
  • go.sum is excluded by !**/*.sum
📒 Files selected for processing (6)
  • go.mod
  • vendor/github.com/kubeservice-stack/common/pkg/schedule/scheduler.go
  • vendor/github.com/kubeservice-stack/common/pkg/utils/map.go
  • vendor/github.com/kubeservice-stack/common/pkg/utils/slice.go
  • vendor/github.com/kubeservice-stack/common/pkg/utils/strings.go
  • vendor/modules.txt

Comment on lines +196 to +197
func (s *Scheduler) Start() (stopped chan bool, done <-chan struct{}) {
stopped = make(chan bool, 1)

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🔴 Critical

🧩 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/schedule

Repository: 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/schedule

Repository: 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*\))' . || true

Repository: 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.go

Repository: 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*\)?' . || true

Repository: 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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

dependencies Pull requests that update a dependency file go Pull requests that update Go code size/XS

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant