✨ BestEffortRestartPolicy e2e - #1860
Conversation
|
📝 CL Summary: This pull request introduces the |
cf95240 to
8975be3
Compare
8975be3 to
3540c58
Compare
3540c58 to
6993c1a
Compare
test fix issue with condition message update
6993c1a to
4215de5
Compare
Minimum allowed line rate is |
aruneshpa
left a comment
There was a problem hiding this comment.
LGTM. Two minor comments.
| vmCtx.VM, | ||
| vmopv1.VirtualMachineConditionPlacementReady) { | ||
| vmopv1.VirtualMachineConditionPlacementReady) || | ||
| pkgcond.GetReason(vmCtx.VM, |
There was a problem hiding this comment.
I may be missing something here. :( But what you are adding seems redundant? The only way your code executes is when the VirtualMachineConditionPlacementReady is False AND the reason is NotReady -- upon which we set the reason to NotReady in the if block?
|
|
||
| // The object is still being processed. | ||
| msg := pkgcond.GetMessage(obj, vspherepolv1.ReadyConditionType) | ||
| if msg != "" { |
There was a problem hiding this comment.
This is confusing. Instead of creating this weird formatted string by sticking this next to the error, let's either have another key (e.g., "msg", ). Or, change the error to include the message somehow.
What does this PR do, and why is it needed?
Adds the remaining E2E coverage for the
AutomaticVMEvictionPolicy/BestEffortRestartPolicycompute-policy CRDs (product code already merged in #1859), closing outtasks.mdT021/T022 and adding T040:BestEffortRestartPolicyviaspec.policiestags the VM.BestEffortRestartPolicysurfaces a not-readyPolicyEvaluationcondition (Ready=False, message containing "does not match").AutomaticVMEvictionPolicyand explicitly referencing an OptionalBestEffortRestartPolicysurfaces both instatus.policies.spec.policies.All new
Its are labeledexperimentalpere2e-testing.md, pending validation on real hardware.Also removes a standalone
ComputePolicye2e spec (computepolicy.go) and itsContext("COMPUTE-POLICY", ...)wiring that were added earlier under the mistaken assumptionComputePolicyhad no e2e coverage — it already has thorough mandatory/optional combination coverage through the real WCP admin API path intest/e2e/vmservice/vmservice/virtualmachine/virtualmachinelcm.go(Context("IaaS Policies", ...),Context("PLACEMENT-POLICY-COMBINATIONS", ...)), so the parallel direct-CRD-creation spec was redundant. This PR's scope is intentionally limited toAutomaticVMEvictionPolicy/BestEffortRestartPolicy..sdd/specs/007-vm-eviction-policy/plan.mdandtasks.mdupdated to match.Which issue(s) is/are addressed by this PR? (optional, in
fixes #<issue number>(, fixes #<issue_number>, ...)format, will close the issue(s) when PR gets merged):Fixes #
Are there any special notes for your reviewer:
experimentallabel and are excluded from CI until validated on hardware.createAutomaticVMEvictionPolicy/createBestEffortRestartPolicygained anenforcementModeparameter (previously hardcoded per kind) so both Mandatory and Optional variants are exercisable from the same helpers; all existing call sites updated accordingly.Please add a release note if necessary: