Skip to content

fix: avoid redis create test panic#694

Closed
ldming wants to merge 1 commit into
mainfrom
supprt/fix-redis-ci
Closed

fix: avoid redis create test panic#694
ldming wants to merge 1 commit into
mainfrom
supprt/fix-redis-ci

Conversation

@ldming

@ldming ldming commented Jul 14, 2026

Copy link
Copy Markdown
Collaborator

Summary

  • assert the Redis chart’s stable clusterDef output instead of indexing an optional component-definition list
  • remove the obsolete component-definition test constant

Root cause

The Redis create test indexed ChartInfo.ComponentDef[0]. In CI the list was empty for a valid rendered Redis cluster, causing an index-out-of-range panic. The rendered chart always identifies the cluster through clusterDef: redis.

Validation

  • go test ./pkg/cmd/cluster -run '^TestCluster$' -count=1 -ginkgo.focus='create sharding cluster command'\n- go test ./... -coverprofile=coverage.txt\n- golangci-lint run --timeout=5m ./pkg/cmd/cluster/...

@github-actions github-actions Bot added the size/XS Denotes a PR that changes 0-9 lines. label Jul 14, 2026
@apecloud-bot

Copy link
Copy Markdown
Collaborator

This branch name is not following the standards: feature/|bugfix/|release/|hotfix/|support/|releasing/|dependabot/

@codecov-commenter

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 40.94%. Comparing base (de3b5ff) to head (9c6df05).
⚠️ Report is 6 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #694      +/-   ##
==========================================
- Coverage   40.95%   40.94%   -0.02%     
==========================================
  Files         184      184              
  Lines       24658    24658              
==========================================
- Hits        10098    10095       -3     
- Misses      13412    13414       +2     
- Partials     1148     1149       +1     
Flag Coverage Δ
unittests 40.94% <ø> (-0.02%) ⬇️

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

☔ View full report in Codecov by Harness.
📢 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.

@ldming
ldming marked this pull request as ready for review July 14, 2026 09:19
@ldming

ldming commented Jul 14, 2026

Copy link
Copy Markdown
Collaborator Author

Superseded by the same fix on the correctly named support/ branch.

@ldming ldming closed this Jul 14, 2026
@ldming
ldming deleted the supprt/fix-redis-ci branch July 14, 2026 09:21
@github-actions github-actions Bot added this to the Release 1.0 milestone Jul 14, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size/XS Denotes a PR that changes 0-9 lines.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants