Skip to content

Conversation

@khanhtc1202
Copy link
Member

@khanhtc1202 khanhtc1202 commented Jan 19, 2021

What this PR does / why we need it:

Which issue(s) this PR fixes:

Fixes #1449

Does this PR introduce a user-facing change?:

NONE

@pipecd-bot
Copy link
Collaborator

COVERAGE

Code coverage for golang is 33.49%. This pull request does not change code coverage.

@pipecd-bot pipecd-bot added size/S and removed size/M labels Jan 19, 2021
@khanhtc1202 khanhtc1202 changed the title Using retry instead of time sleep Using retry instead of waiting for a specific duration of time Jan 19, 2021
@pipecd-bot
Copy link
Collaborator

COVERAGE

Code coverage for golang is 33.49%. This pull request does not change code coverage.

@khanhtc1202 khanhtc1202 marked this pull request as ready for review January 19, 2021 11:30
@pipecd-bot
Copy link
Collaborator

COVERAGE

Code coverage for golang is 33.49%. This pull request does not change code coverage.

@pipecd-bot
Copy link
Collaborator

COVERAGE

Code coverage for golang is 33.49%. This pull request does not change code coverage.

@pipecd-bot
Copy link
Collaborator

COVERAGE

Code coverage for golang is 33.49%. This pull request does not change code coverage.

// RequestRetryTime represents the number of times calling to AWS resource control.
RequestRetryTime = 3
// RetryIntervalDuration represents duration time between retry.
RetryIntervalDuration = 1 * time.Minute
Copy link
Member

Choose a reason for hiding this comment

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

How about moving these into the executor/lambda package as private consts?

Copy link
Member Author

@khanhtc1202 khanhtc1202 Jan 20, 2021

Choose a reason for hiding this comment

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

Since it's an attribute attached to the AWS API, I think it would be better if it were placed in the AWS client wrapper package.
On the other hand, I planned to use those constants here too UpdateFunction src ( UpdateFunctionConfig has to wait (retry) several times until UpdateFunctionCode process finished in the AWS server )

Copy link
Member

@nghialv nghialv Jan 20, 2021

Choose a reason for hiding this comment

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

Since it's an attribute attached to the AWS API

I am not sure they belong to AWS API or the CloudProvider callers.

But just a nit. 👍

Copy link
Member Author

@khanhtc1202 khanhtc1202 Jan 20, 2021

Choose a reason for hiding this comment

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

Thanks, let's move it to the callers later if necessary 😄

@nghialv
Copy link
Member

nghialv commented Jan 20, 2021

/lgtm

Copy link
Member

@nakabonne nakabonne left a comment

Choose a reason for hiding this comment

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

Thanks!

@pipecd-bot
Copy link
Collaborator

APPROVE

This pull request is APPROVED by nakabonne.

Approvers can cancel the approval by writing /approve cancel in a comment. Any additional commits also will change this pull request to be not-approved.

@pipecd-bot pipecd-bot merged commit 1d58b0d into master Jan 20, 2021
@pipecd-bot pipecd-bot deleted the fix-waiting-time branch January 20, 2021 02:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Using backoff instead of time sleep waiting for a specific duration of time.

5 participants