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

Refactor conditions logic #305

Merged
merged 2 commits into from
Mar 18, 2020
Merged

Refactor conditions logic #305

merged 2 commits into from
Mar 18, 2020

Conversation

alexander-demicev
Copy link

Refactor conditions logic and make it more simple. PR also contains a commit that removes double imports.

func conditionFailed() providerconfigv1.AWSMachineProviderCondition {
return providerconfigv1.AWSMachineProviderCondition{
Type: providerconfigv1.MachineCreation,
Status: corev1.ConditionTrue,

Choose a reason for hiding this comment

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

Should be false?

Suggested change
Status: corev1.ConditionTrue,
Status: corev1.ConditionFalse,

type AWSMachineProviderConditionReason string

const (
// MachineCreationSucceeded indicates machine creation success

Choose a reason for hiding this comment

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

Nit: should have period at end

Suggested change
// MachineCreationSucceeded indicates machine creation success
// MachineCreationSucceeded indicates machine creation success.

@@ -60,6 +60,16 @@ const (
MachineCreation AWSMachineProviderConditionType = "MachineCreation"
)

// AWSMachineProviderConditionReason is reason for the condition's last transition

Choose a reason for hiding this comment

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

Nit: should have period at end

Suggested change
// AWSMachineProviderConditionReason is reason for the condition's last transition
// AWSMachineProviderConditionReason is reason for the condition's last transition.

const (
// MachineCreationSucceeded indicates machine creation success
MachineCreationSucceeded AWSMachineProviderConditionReason = "MachineCreationSucceeded"
// MachineCreationFailed indicates machine creation fail

Choose a reason for hiding this comment

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

Nit: consistency

Suggested change
// MachineCreationFailed indicates machine creation fail
// MachineCreationFailed indicates machine creation failure.

@alexander-demicev
Copy link
Author

@JoelSpeed fixed

Copy link

@JoelSpeed JoelSpeed left a comment

Choose a reason for hiding this comment

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

/lgtm

@openshift-ci-robot openshift-ci-robot added the lgtm Indicates that a PR is ready to be merged. label Mar 17, 2020
@enxebre
Copy link
Member

enxebre commented Mar 18, 2020

/approve

@openshift-ci-robot
Copy link

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: enxebre

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

The pull request process is described 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

@openshift-ci-robot openshift-ci-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Mar 18, 2020
@openshift-merge-robot openshift-merge-robot merged commit bf2f68a into openshift:master Mar 18, 2020
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. lgtm Indicates that a PR is ready to be merged.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants