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

🐛 enhanced ud verification of cloneset #1608

Closed
wants to merge 2 commits into from

Conversation

ls-2018
Copy link
Member

@ls-2018 ls-2018 commented May 4, 2024

Ⅰ. Describe what this PR does

Ⅱ. Does this pull request fix one issue?

Ⅲ. Describe how to verify it

Ⅳ. Special notes for reviews

@kruise-bot
Copy link

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by:
Once this PR has been reviewed and has the lgtm label, please assign fillzpp for approval by writing /assign @fillzpp in a comment. For more information see:The Kubernetes Code Review Process.

The full list of commands accepted by this bot can be found here.

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

@kruise-bot kruise-bot added the size/M size/M: 30-99 label May 4, 2024
Signed-off-by: acejilam <acejilam@gmail.com>
Copy link

codecov bot commented May 4, 2024

Codecov Report

Attention: Patch coverage is 8.00000% with 23 lines in your changes are missing coverage. Please review.

Project coverage is 49.23%. Comparing base (0d0031a) to head (7caf56d).
Report is 30 commits behind head on master.

❗ Current head 7caf56d differs from pull request most recent head 276c70a. Consider uploading reports for the commit 276c70a to get more accurate results

Files Patch % Lines
...ployment/validating/uniteddeployment_validation.go 0.00% 21 Missing and 2 partials ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master    #1608      +/-   ##
==========================================
+ Coverage   47.91%   49.23%   +1.31%     
==========================================
  Files         162      164       +2     
  Lines       23491    18836    -4655     
==========================================
- Hits        11256     9273    -1983     
+ Misses      11014     8339    -2675     
- Partials     1221     1224       +3     
Flag Coverage Δ
unittests 49.23% <8.00%> (+1.31%) ⬆️

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.

allErrs = append(allErrs, field.Invalid(fldPath.Root(), template, fmt.Sprintf("Convert_v1_PodTemplateSpec_To_core_PodTemplateSpec failed: %v", err)))
return allErrs
}
allErrs = append(allErrs, appsvalidation.ValidatePodTemplateSpecForReplicaSet(coreTemplate, selector, 0, fldPath.Child("cloneSetTemplate", "spec", "template"), webhookutil.DefaultPodValidationOptions)...)
Copy link
Member

Choose a reason for hiding this comment

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

pkg/webhook/uniteddeployment/validating/uniteddeployment_validation.go:357:163: not enough arguments in call to appsvalidation.ValidatePodTemplateSpecForReplicaSet

@@ -380,6 +395,14 @@ func validateDeployment(deployment *appsv1alpha1.DeploymentTemplateSpec, fldPath

return allErrs
}
func validateCloneSet(cs *appsv1alpha1.CloneSetTemplateSpec, fldPath *field.Path) field.ErrorList {
Copy link
Member

Choose a reason for hiding this comment

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

The check is too simple, is it possible to refer to the cloneset validate webhook?

@ls-2018 ls-2018 closed this Jun 4, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
size/M size/M: 30-99
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants