Skip to content

fix: correct typo stingSliceResults -> stringSliceResults#346

Open
yahyasaqban-lab wants to merge 1 commit into
volcano-sh:mainfrom
yahyasaqban-lab:fix/typo-stringSliceResults
Open

fix: correct typo stingSliceResults -> stringSliceResults#346
yahyasaqban-lab wants to merge 1 commit into
volcano-sh:mainfrom
yahyasaqban-lab:fix/typo-stringSliceResults

Conversation

@yahyasaqban-lab
Copy link
Copy Markdown

Summary

Fixed typo in variable name stingSliceResults -> stringSliceResults in pkg/store/store_valkey.go (5 occurrences).

Test plan

  • Variable name corrected in all occurrences

Fixes #345

🤖 Generated with Claude Code

Fixed typo in variable name in store_valkey.go (5 occurrences).

Fixes volcano-sh#345

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Copilot AI review requested due to automatic review settings May 17, 2026 19:58
@volcano-sh-bot
Copy link
Copy Markdown
Contributor

Keywords which can automatically close issues and at(@) or hashtag(#) mentions are not allowed in commit messages.

The list of commits with invalid commit messages:

  • 203fc31 fix: correct typo stingSliceResults -> stringSliceResults
Details

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. I understand the commands that are listed here.

@volcano-sh-bot
Copy link
Copy Markdown
Contributor

Welcome @yahyasaqban-lab! It looks like this is your first PR to volcano-sh/agentcube 🎉

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Fixes a typo in the Valkey store implementation (pkg/store/store_valkey.go) by renaming stingSliceResults to stringSliceResults, improving code clarity and avoiding confusion when reading Valkey MGET handling.

Changes:

  • Renamed the local variable stingSliceResultsstringSliceResults and updated all in-scope references in loadSandboxesBySessionIDs.

Copy link
Copy Markdown
Contributor

@gemini-code-assist gemini-code-assist Bot left a comment

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 corrects a typo in the variable name stingSliceResults to stringSliceResults within the loadSandboxesBySessionIDs function. The reviewer suggested improving the validation logic for the MGET result size by checking for exact equality against the number of requested keys, which ensures the integrity of positional mapping.

Comment thread pkg/store/store_valkey.go
Comment on lines +119 to 121
if len(stringSliceResults) > len(sessionIDKeys) {
return nil, fmt.Errorf("unexpected MGet result size: %d, param size: %d", len(stringSliceResults), len(sessionIDKeys))
}
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.

medium

The validation logic for the MGET result size should check for exact equality rather than just whether the result is larger than expected. In Redis/Valkey, MGET always returns a result for every key requested, maintaining the same order. If the lengths differ, it indicates a protocol or communication issue that would make the subsequent positional mapping (e.g., using the index i to reference sessionIDs[i] in the loop below) incorrect. Using != provides a more robust check.

Suggested change
if len(stringSliceResults) > len(sessionIDKeys) {
return nil, fmt.Errorf("unexpected MGet result size: %d, param size: %d", len(stringSliceResults), len(sessionIDKeys))
}
if len(stringSliceResults) != len(sessionIDKeys) {
return nil, fmt.Errorf("unexpected MGet result size: %d, expected: %d", len(stringSliceResults), len(sessionIDKeys))
}

@codecov-commenter
Copy link
Copy Markdown

⚠️ Please install the 'codecov app svg image' to ensure uploads and comments are reliably processed by Codecov.

Codecov Report

❌ Patch coverage is 60.00000% with 2 lines in your changes missing coverage. Please review.
✅ Project coverage is 49.12%. Comparing base (524e55e) to head (203fc31).
⚠️ Report is 54 commits behind head on main.

Files with missing lines Patch % Lines
pkg/store/store_valkey.go 60.00% 1 Missing and 1 partial ⚠️
❗ Your organization needs to install the Codecov GitHub app to enable full functionality.
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #346      +/-   ##
==========================================
+ Coverage   47.57%   49.12%   +1.55%     
==========================================
  Files          30       30              
  Lines        2819     2858      +39     
==========================================
+ Hits         1341     1404      +63     
+ Misses       1338     1301      -37     
- Partials      140      153      +13     
Flag Coverage Δ
unittests 49.12% <60.00%> (+1.55%) ⬆️

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

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Copy link
Copy Markdown
Contributor

@FAUST-BENCHOU FAUST-BENCHOU left a comment

Choose a reason for hiding this comment

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

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
we dont accept this kind of DCO

@volcano-sh-bot
Copy link
Copy Markdown
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: hzxuzhonghu

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

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.

Typo error stingSliceResults in store_valkey.go

6 participants