Skip to content

Conversation

@mbaijal
Copy link
Contributor

@mbaijal mbaijal commented Jun 18, 2021

This PR is one of two to implement Issue #826
Link to the code-generator PR

Testing

I tested the change by enabling it for applicationAutoscaling (ScalableTarget) - you can check the generated code on this branch just for reference.

@ack-bot ack-bot requested review from a-hilaly and vijtrip2 June 18, 2021 09:00
@ack-bot ack-bot added the needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. label Jun 18, 2021
@ack-bot
Copy link
Collaborator

ack-bot commented Jun 18, 2021

Hi @mbaijal. Thanks for your PR.

I'm waiting for a aws-controllers-k8s member to verify that this patch is reasonable to test. If it is, they should reply with /ok-to-test on its own line. Until that is done, I will not automatically test new commits in this PR, but the usual testing commands by org members will still work. Regular contributors should join the org to skip this step.

Once the patch is verified, the new status will be reflected by the ok-to-test label.

I understand the commands that are listed here.

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.

@mbaijal mbaijal changed the title Adds logic to the reconcile function to handle the optional infinite requeue (Issue #826) [testing] Adds logic to the reconcile function to handle the optional infinite requeue (Issue #826) Jun 18, 2021
@vijtrip2
Copy link
Contributor

/approve

@vijtrip2
Copy link
Contributor

@mbaijal, There are merge conflicts. Can you please fix the conflicts, amend and force push again ?

@mbaijal
Copy link
Contributor Author

mbaijal commented Jun 21, 2021

@mbaijal, There are merge conflicts. Can you please fix the conflicts, amend and force push again ?

Yes, this is new over the weekend, let me fix it.

@mbaijal mbaijal force-pushed the infinite-requeue branch from 778f657 to d5fad31 Compare June 22, 2021 21:57
@mbaijal mbaijal force-pushed the infinite-requeue branch from d5fad31 to 2770256 Compare June 23, 2021 06:58
@mbaijal mbaijal changed the title [testing] Adds logic to the reconcile function to handle the optional infinite requeue (Issue #826) Adds logic to the reconcile function to handle the optional infinite requeue (Issue #826) Jun 24, 2021
) (AWSResourceManager, error)
// IsAdoptable returns true if the resource is able to be adopted
IsAdoptable() bool
// RequeueOnSuccessSeconds returns true if the resource should be requeued after specified seconds
Copy link
Contributor

@vijtrip2 vijtrip2 Jun 24, 2021

Choose a reason for hiding this comment

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

godoc is out of date. Please fix it and everything else looks very good. 💯

Copy link
Collaborator

Choose a reason for hiding this comment

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

@vijtrip2 I'll fix on a followup (handling the TODO above) :)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Thanks Jay.


// AWSResourceManagerFactory returns an AWSResourceManager that can be used to
// manage AWS resources for a particular AWS account
// TODO(jaypipes): Move AWSResourceManagerFactory into its own file
Copy link
Collaborator

Choose a reason for hiding this comment

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

haha! :) nice.

) (AWSResourceManager, error)
// IsAdoptable returns true if the resource is able to be adopted
IsAdoptable() bool
// RequeueOnSuccessSeconds returns true if the resource should be requeued after specified seconds
Copy link
Collaborator

Choose a reason for hiding this comment

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

@vijtrip2 I'll fix on a followup (handling the TODO above) :)

@jaypipes
Copy link
Collaborator

/lgtm

@ack-bot ack-bot added the lgtm Indicates that a PR is ready to be merged. label Jun 24, 2021
@ack-bot
Copy link
Collaborator

ack-bot commented Jun 24, 2021

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: jaypipes, mbaijal, 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 d48e9e0 into aws-controllers-k8s:main Jun 24, 2021
rlog.Debug(
"requeueing resource after resource synced condition true",
)
return requeue.NeededAfter(nil, time.Duration(duration)*time.Second)
Copy link
Member

Choose a reason for hiding this comment

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

@jaypipes isn't it better to pass the debug message on line #286 to requeue instead of nil?

Copy link
Collaborator

Choose a reason for hiding this comment

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

@surajkota the nil in the NeededAfter is for an error. There is no error here.

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. needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants