Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: NPE when adding a new service port #8803

Merged
merged 1 commit into from
Jan 16, 2025

Conversation

leon-inf
Copy link
Contributor

@leon-inf leon-inf commented Jan 14, 2025

close #8802

@leon-inf leon-inf added this to the Release 0.8.5 milestone Jan 14, 2025
@github-actions github-actions bot added the size/S Denotes a PR that changes 10-29 lines. label Jan 14, 2025
Copy link

codecov bot commented Jan 14, 2025

Codecov Report

Attention: Patch coverage is 85.71429% with 2 lines in your changes missing coverage. Please review.

Project coverage is 65.31%. Comparing base (c7b4541) to head (b298eaf).
Report is 1 commits behind head on release-0.8.

Files with missing lines Patch % Lines
controllers/apps/transformer_cluster_service.go 85.71% 1 Missing and 1 partial ⚠️
Additional details and impacted files
@@               Coverage Diff               @@
##           release-0.8    #8803      +/-   ##
===============================================
+ Coverage        65.14%   65.31%   +0.17%     
===============================================
  Files              307      307              
  Lines            38516    38523       +7     
===============================================
+ Hits             25090    25162      +72     
+ Misses           11229    11164      -65     
  Partials          2197     2197              
Flag Coverage Δ
unittests 65.31% <85.71%> (+0.17%) ⬆️

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.

// TODO: how about the order changed?
servicePorts := make(map[string]corev1.ServicePort)
for i, port := range obj.Ports {
servicePorts[port.Name] = obj.Ports[i]
Copy link
Collaborator

Choose a reason for hiding this comment

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

port.Name is optional and omitempty?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Change to use the port as the hash key.

@shanshanying
Copy link
Contributor

@Y-Rookie PTAL

@github-actions github-actions bot modified the milestones: Release 0.8.5, Release 0.9.3 Jan 14, 2025
@leon-inf leon-inf force-pushed the bugfix/npe-when-adding-service-port branch from 8fdf0b8 to b298eaf Compare January 16, 2025 01:55
@leon-inf leon-inf merged commit 1cb93f7 into release-0.8 Jan 16, 2025
53 checks passed
@leon-inf leon-inf deleted the bugfix/npe-when-adding-service-port branch January 16, 2025 04:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
size/S Denotes a PR that changes 10-29 lines.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[BUG] KubeBlocks 0.8.4 Crashes After Updating SVC to Existing Clusters.
4 participants