Skip to content

Comments

SPLAT-1211: recognize topology and failure domains represented by the infrastructure resource#250

Merged
openshift-ci[bot] merged 1 commit intoopenshift:mainfrom
rvanderp3:SPLAT-1211
Oct 26, 2023
Merged

SPLAT-1211: recognize topology and failure domains represented by the infrastructure resource#250
openshift-ci[bot] merged 1 commit intoopenshift:mainfrom
rvanderp3:SPLAT-1211

Conversation

@rvanderp3
Copy link
Contributor

This PR introduces the infrastructure resource to aid in the resolution of topology and failure domains for platforms such as vSphere.

@openshift-ci openshift-ci bot added the size/L Denotes a PR that changes 100-499 lines, ignoring generated files. label Oct 13, 2023
@rvanderp3
Copy link
Contributor Author

rvanderp3 commented Oct 13, 2023

I would expect this lint error since there isn't a provider using the infrastructure resource until Nutanix or vSphere providers are implemented.

pkg/machineproviders/providers/openshift/machine/v1beta1/providerconfig/providerconfig.go:115:138: `newProviderConfigFromProviderSpec` - `infrastructure` is unused (unparam)
func newProviderConfigFromProviderSpec(logger logr.Logger, providerSpec machinev1beta1.ProviderSpec, platformType configv1.PlatformType, infrastructure *configv1.Infrastructure) (ProviderConfig, error) {
                                                                                                                                         ^
pkg/controllers/controlplanemachinesetgenerator/utils.go:170:122: `buildFailureDomains` - `infrastructure` always receives `nil` (unparam)
func buildFailureDomains(logger logr.Logger, machineSets []machinev1beta1.MachineSet, machines []machinev1beta1.Machine, infrastructure *configv1.Infrastructure) (*machinev1builder.FailureDomainsApplyConfiguration, error) {

@JoelSpeed
Copy link
Contributor

Should we add the appropriate no lints for now so that this doesn't give a false signal on other PRs? Then they can be removed when they are no longer required?

I assume the motivation here is to share the commonly needed parts for the Nutanix and vSphere failure domain implementations and get them merged in chunks?

@rvanderp3
Copy link
Contributor Author

Should we add the appropriate no lints for now so that this doesn't give a false signal on other PRs? Then they can be removed when they are no longer required?

I assume the motivation here is to share the commonly needed parts for the Nutanix and vSphere failure domain implementations and get them merged in chunks?

Yes, that makes sense, I'll add the no lint. Correct, the motivation was to break out the common pieces to get them merged in chunks.

rvanderp3 added a commit to rvanderp3/cluster-control-plane-machine-set-operator that referenced this pull request Oct 16, 2023
Copy link
Contributor

@yanhua121 yanhua121 left a comment

Choose a reason for hiding this comment

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

Should add the below line at L149 of machine/v1beta1/provider.go:
o := &openshiftMachineProvider{
...
infrastructure: infrastructure,
}

rvanderp3 added a commit to rvanderp3/cluster-control-plane-machine-set-operator that referenced this pull request Oct 23, 2023
@jcpowermac
Copy link
Contributor

/lgtm

@openshift-ci openshift-ci bot added the lgtm Indicates that a PR is ready to be merged. label Oct 25, 2023
Copy link
Contributor

@elmiko elmiko left a comment

Choose a reason for hiding this comment

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

this makes sense to me, i just have a question and request.


infrastructure := configv1builder.Infrastructure().AsAWS("test", "eu-west-2").WithName(util.InfrastructureName).Build()
Expect(k8sClient.Create(ctx, infrastructure)).To(Succeed())

Copy link
Contributor

Choose a reason for hiding this comment

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

are there any new tests associated with the change, or should the old test just keep working?

i'm wondering if we need a test for the specific logic changes.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

The old tests should just continue to work. I'm expecting vSphere and Nutanix to implement unit tests that specifically exercise the consumption of the infrastructure resource.

//
//nolint:cyclop
func buildFailureDomains(logger logr.Logger, machineSets []machinev1beta1.MachineSet, machines []machinev1beta1.Machine) (*machinev1builder.FailureDomainsApplyConfiguration, error) {
//nolint:cyclop,unparam
Copy link
Contributor

Choose a reason for hiding this comment

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

since we are adding the unparam here, i think we should add a comment mentioning that the infra is a TODO or something, waiting for the nutanix and vsphere impls.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

good call out, will handle that

}

func newProviderConfigFromProviderSpec(logger logr.Logger, providerSpec machinev1beta1.ProviderSpec, platformType configv1.PlatformType) (ProviderConfig, error) {
//nolint:unparam
Copy link
Contributor

Choose a reason for hiding this comment

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

similar comment on unparam

@openshift-ci openshift-ci bot removed the lgtm Indicates that a PR is ready to be merged. label Oct 25, 2023
…ure resource

Co-Authored-By: vr4manta <vr4manta@gmail.com>
@rvanderp3 rvanderp3 changed the title recognize topology and failure domains represented by the infrastructure resource SPLAT-1211: recognize topology and failure domains represented by the infrastructure resource Oct 25, 2023
@openshift-ci-robot
Copy link

openshift-ci-robot commented Oct 25, 2023

@rvanderp3: This pull request references SPLAT-1211 which is a valid jira issue.

Warning: The referenced jira issue has an invalid target version for the target branch this PR targets: expected the task to target the "4.15.0" version, but no target version was set.

Details

In response to this:

This PR introduces the infrastructure resource to aid in the resolution of topology and failure domains for platforms such as vSphere.

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.

@openshift-ci-robot openshift-ci-robot added the jira/valid-reference Indicates that this PR references a valid Jira ticket of any type. label Oct 25, 2023
@openshift-ci
Copy link
Contributor

openshift-ci bot commented Oct 25, 2023

@rvanderp3: The following tests failed, say /retest to rerun all failed tests or /retest-required to rerun all mandatory failed tests:

Test name Commit Details Required Rerun command
ci/prow/e2e-nutanix-ovn 5c2ad1a link false /test e2e-nutanix-ovn
ci/prow/e2e-gcp-ovn-etcd-scaling 5c2ad1a link false /test e2e-gcp-ovn-etcd-scaling
ci/prow/e2e-vsphere-operator 5c2ad1a link false /test e2e-vsphere-operator
ci/prow/e2e-vsphere-multi-zone-operator 5c2ad1a link false /test e2e-vsphere-multi-zone-operator

Full PR test history. Your PR dashboard.

Details

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. I understand the commands that are listed here.

@JoelSpeed
Copy link
Contributor

/approve
/lgtm

IIUC the tests that are currently failing are expected to fail. I think @elmiko's comments have been resolved so we can continue

@rvanderp3 rvanderp3 changed the title SPLAT-1211: recognize topology and failure domains represented by the infrastructure resource SPLAT-1211: recognize topology and failure domains represented by the infrastructure resource Oct 26, 2023
@rvanderp3 rvanderp3 changed the title SPLAT-1211: recognize topology and failure domains represented by the infrastructure resource SPLAT-1211: recognize topology and failure domains represented by the infrastructure resource Oct 26, 2023
@JoelSpeed
Copy link
Contributor

/approve
/lgtm

@openshift-ci openshift-ci bot added the lgtm Indicates that a PR is ready to be merged. label Oct 26, 2023
@openshift-ci
Copy link
Contributor

openshift-ci bot commented Oct 26, 2023

[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

Details 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

@openshift-ci openshift-ci bot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Oct 26, 2023
@openshift-ci openshift-ci bot merged commit 8cf08ea into openshift:main Oct 26, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

approved Indicates a PR has been approved by an approver from all required OWNERS files. jira/valid-reference Indicates that this PR references a valid Jira ticket of any type. lgtm Indicates that a PR is ready to be merged. size/L Denotes a PR that changes 100-499 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants