SVM: bump the API to beta, remove unused fields#134784
SVM: bump the API to beta, remove unused fields#134784k8s-ci-robot merged 1 commit intokubernetes:masterfrom
Conversation
|
@michaelasp: The label(s) DetailsIn response to this:
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-sigs/prow repository. |
|
This issue is currently awaiting triage. If a SIG or subproject determines this is a relevant issue, they will accept it by applying the The DetailsInstructions 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-sigs/prow repository. |
|
/sig api-machinery |
563a796 to
daf0351
Compare
|
This PR may require API review. If so, when the changes are ready, complete the pre-review checklist and request an API review. Status of requested reviews is tracked in the API Review project. |
d15fca7 to
1211458
Compare
| for monitorGVR, m := range gb.monitors { | ||
| if monitorGVR.Group == resource.Group && monitorGVR.Resource == resource.Resource { | ||
| if monitorGVR.Group == resource.Group && | ||
| monitorGVR.Resource == resource.Resource && | ||
| monitorGVR.Version == resource.Version { | ||
| monitor = m | ||
| break | ||
| } | ||
| } | ||
| } | ||
|
|
||
| if monitor == nil { | ||
| return nil, fmt.Errorf("no monitor found for resource %s", resource.String()) | ||
| return nil, false, fmt.Errorf("no monitor found for resource %s", resource.String()) | ||
| } |
There was a problem hiding this comment.
Delete the var and loop altogether:
monitor, ok := gb.monitors[resource]
if !ok {
return nil, false, fmt.Errorf("no monitor found for resource %s", resource.String())
}There was a problem hiding this comment.
Ah yeah, missed that. At this point we know the exact gvr.
| // returning monitor to allow the caller to decide whether to retry as it can be synced later | ||
| return resourceMonitor, fmt.Errorf("dependency graph for resource %s is not synced", resource.String()) | ||
| return resourceMonitor, false, nil |
There was a problem hiding this comment.
Just return nil, false, nil here and drop the comment.
| if err != nil || cmp != 0 { | ||
| allErrs = append(allErrs, field.Invalid(fldPath.Child("resourceVersion"), newSVMBundle.Status.ResourceVersion, err.Error())) |
There was a problem hiding this comment.
Ah yeah, this is a weird error, create an error if one doesn't exist.
ddaf542 to
e66dd9d
Compare
| allErrs = append(allErrs, field.Invalid(field.NewPath("resource"), newSVMBundle.Spec.Resource.Resource, "field is immutable")) | ||
| } | ||
| // prevent changes to the spec | ||
| allErrs = append(allErrs, apivalidation.ValidateImmutableField(oldSVMBundle.Spec, newSVMBundle.Spec, field.NewPath("spec"))...) |
There was a problem hiding this comment.
So the error message returned is correct:
| allErrs = append(allErrs, apivalidation.ValidateImmutableField(oldSVMBundle.Spec, newSVMBundle.Spec, field.NewPath("spec"))...) | |
| allErrs = append(allErrs, apivalidation.ValidateImmutableField(newSVMBundle.Spec, oldSVMBundle.Spec, field.NewPath("spec"))...) |
1b55e97 to
218635f
Compare
|
|
Co-authored-by: Stanislav Láznička <[email protected]>
|
@michaelasp: The following test failed, say
Full PR test history. Your PR dashboard. Please help us cut down on flakes by linking to an open issue when you hit one in your PR. DetailsInstructions 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-sigs/prow repository. I understand the commands that are listed here. |
|
/lgtm |
|
LGTM label has been added. DetailsGit tree hash: fd7f132701bf987b60a405f3f8879ceff3e0162e |
|
/lgtm |
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: enj, liggitt, michaelasp The full list of commands accepted by this bot can be found here. The pull request process is described here DetailsNeeds approval from an approver in each of these files:
Approvers can indicate their approval by writing |
What type of PR is this?
/kind feature /kind api-change
What this PR does / why we need it:
This PR bumps the SVM API to beta and removes the StorageVersionMigration object's fields as discussed in kubernetes/enhancements#5597, follow up to #134480
Which issue(s) this PR is related to:
KEP: kubernetes/enhancements#4192
Special notes for your reviewer:
Does this PR introduce a user-facing change?
Additional documentation e.g., KEPs (Kubernetes Enhancement Proposals), usage docs, etc.: