Skip to content

Conversation

nmvk
Copy link
Contributor

@nmvk nmvk commented Mar 21, 2022

Issue #, if available:
aws-controllers-k8s/community#1231

Description of changes:
Nil check fix for IsSync needed for MemoryDB and
Fixed a compare ignore bug.

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

@ack-bot ack-bot requested review from jaypipes and vijtrip2 March 21, 2022 18:15
Copy link
Member

@a-hilaly a-hilaly left a comment

Choose a reason for hiding this comment

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

Lookgs good! thanks @nmvk

@ack-bot ack-bot removed the approved label Mar 21, 2022
Copy link
Contributor

@vijtrip2 vijtrip2 left a comment

Choose a reason for hiding this comment

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

Thanks for quick fix.

Would this handle multi-level nil check?

Ex: ko.Status.FieldA.SubFieldB should have nil check for both FieldA and SubFieldB

@a-hilaly
Copy link
Member

@vijtrip2 the generated code is fine for nested fields. It looks like the issue is only with top level fields

	if r.ko.Spec.ProvisionedThroughput == nil {
		return false, nil
	}
	if r.ko.Spec.ProvisionedThroughput.ReadCapacityUnits == nil {
		return false, nil
	}
	provisionedThroughputCandidates := []int{0, 10}
	if !ackutil.InStrings(*r.ko.Spec.ProvisionedThroughput.ReadCapacityUnits, provisionedThroughputCandidates) {
		return false, nil
	}

Nil check fix for IsSync needed for MemoryDB and
Fixed a compare ignore bug.
@nmvk nmvk changed the title Nil check for IsSync and Compare fix Nil check for IsSync Mar 21, 2022
@nmvk nmvk requested a review from a-hilaly March 21, 2022 20:16
Copy link
Contributor

@vijtrip2 vijtrip2 left a comment

Choose a reason for hiding this comment

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

/lgtm

@ack-bot ack-bot added the lgtm Indicates that a PR is ready to be merged. label Mar 21, 2022
@ack-bot
Copy link
Collaborator

ack-bot commented Mar 21, 2022

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: nmvk, vijtrip2

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

@ack-bot ack-bot merged commit 3499451 into aws-controllers-k8s:main Mar 21, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

approved lgtm Indicates that a PR is ready to be merged.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants