SPLAT-1129: adding failure domain awareness for vSphere#228
Conversation
21a03f8 to
9831732
Compare
|
converting to draft to prevent unnecessary CI runs. |
9831732 to
ae64fda
Compare
|
/test lint |
042f8fd to
b7e9d28
Compare
|
/test lint |
728f955 to
1777d77
Compare
|
/test fmt |
|
/test images |
719486c to
a6d2e97
Compare
|
@rvanderp3: This pull request references SPLAT-1129 which is a valid jira issue. 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/test-infra repository. |
6aedea0 to
2a6bacf
Compare
|
/payload-job periodic-ci-openshift-release-master-nightly-4.15-e2e-vsphere-ovn-serial |
|
@jcpowermac: trigger 1 job(s) for the /payload-(job|aggregate) command
See details on https://pr-payload-tests.ci.openshift.org/runs/ci/0b745ac0-87b1-11ee-934c-9f87e50880b6-0 |
|
/test e2e-vsphere-multi-zone-operator e2e-vsphere-operator |
| .PHONY: lint | ||
| lint: ## Run golangci-lint over the codebase. | ||
| $(call ensure-home, ${GOLANGCI_LINT} run ./... --timeout 5m) | ||
| $(call ensure-home, GOGC=50 ${GOLANGCI_LINT} run ./... --timeout 5m --new-from-rev=${PULL_BASE_SHA} -v) |
There was a problem hiding this comment.
Does the linter still work locally with these changes?
| Client: mgr.GetClient(), | ||
| Scheme: mgr.GetScheme(), | ||
| Namespace: managedNamespace, | ||
| VSphereCPMSFeatureGateEnabled: vSphereCPMSFeatureGateEnabled, |
There was a problem hiding this comment.
I would probably put the feature gate accessor as a member of the reconciler struct so that we can keep this around once this feature gate is gone/so it can be re-used by other features
| api-approved.openshift.io: https://github.com/openshift/api/pull/1112 | ||
| exclude.release.openshift.io/internal-openshift-hosted: "true" | ||
| include.release.openshift.io/self-managed-high-availability: "true" | ||
| release.openshift.io/feature-set: Default |
There was a problem hiding this comment.
We need to make sure the TechPreview and Custom versions of this are included as well
| return nil, fmt.Errorf("unable to generate control plane machine set spec: %w", err) | ||
| } | ||
| case configv1.VSpherePlatformType: | ||
| if !r.VSphereCPMSFeatureGateEnabled { |
There was a problem hiding this comment.
Should move the feature gate accessor Enabled call to here IMO
| if cpmsFailureDomain.Platform == "" { | ||
| return nil, errNoFailureDomains | ||
| } |
There was a problem hiding this comment.
Can we actually get here? Is there ever a generation on AWS/Azure/GCP without failure domains?
There was a problem hiding this comment.
it doesn't appear we can, just removed this.
| var cpmsFailureDomain machinev1.FailureDomains | ||
|
|
||
| var err error |
There was a problem hiding this comment.
Does the linter complain if you remove this empty line?
There was a problem hiding this comment.
yes, it does with 'declarations should never be cuddled'
| return nil, fmt.Errorf("%w: %sFailureDomain{}", errUnsupportedPlatform, machineFailureDomains[0].Type()) | ||
| cpmsFailureDomain, err := buildPlatformFailureDomains(platformType, failureDomains) | ||
| if err != nil { | ||
| return nil, err |
| if cpmsFailureDomain.Platform == "" { | ||
| return nil, errNoFailureDomains | ||
| if cpmsFailureDomain == nil && err == nil { | ||
| return nil, nil //nolint:nilnil |
There was a problem hiding this comment.
Why is this ok to be nil nil? Can you add a quick comment to explain it? Can we even get a nil nil? Looking at buildPlatformFailureDomains I don't see it as possible to return nil nil?
There was a problem hiding this comment.
you are correct, removing that statement
| } | ||
| } | ||
|
|
||
| return machinev1.VSphereFailureDomain{} |
There was a problem hiding this comment.
Unresolved conversation thread
e08d75f to
1add572
Compare
|
/hold placing hold for additional work on comments |
|
/hold cancel |
|
/test unit |
Co-authored-by: vr4manta <vr4manta@gmail.com>
663d8b4 to
805d05e
Compare
805d05e to
3f8ed21
Compare
|
/approve |
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: JoelSpeed 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 |
|
@rvanderp3: The following tests failed, say
Full PR test history. Your PR dashboard. 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/test-infra repository. I understand the commands that are listed here. |
|
[ART PR BUILD NOTIFIER] This PR has been included in build ose-cluster-control-plane-machine-set-operator-container-v4.15.0-202311272131.p0.g800e341.assembly.stream for distgit ose-cluster-control-plane-machine-set-operator. |
Associated PRs:
Depends on PRs: