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

update aws related scalers to reuse the aws clients #2255

Merged
merged 3 commits into from
Nov 8, 2021

Conversation

fivesheep
Copy link
Contributor

@fivesheep fivesheep commented Nov 4, 2021

update aws related scalers to reuse the aws clients instead of creating a new one for every GetMetrics call

Signed-off-by: Xiayang Wu xwu@rippling.com

Provide a description of what has been changed

Refactor the aws related scalers, which includes cloudwatch, sqs and kinesis, to hold references to the dedicated aws client per scaler instance to improve performance, since the aws clients are reusable and able to refresh tokens automatically.

This is a follow up on issue: #2242

Checklist

  • Commits are signed with Developer Certificate of Origin (DCO - learn more)
  • Tests have been added
  • A PR is opened to update our Helm chart (repo) (if applicable, ie. when deployment manifests are modified)
  • A PR is opened to update the documentation on (repo) (if applicable)
  • Changelog has been updated

Fixes #

…ing a new one for every GetMetrics call

Signed-off-by: Xiayang Wu <xwu@rippling.com>
Signed-off-by: Xiayang Wu <xwu@rippling.com>
@fivesheep
Copy link
Contributor Author

tests also needed to be updated. to use the XXXifaces from the aws sdk, we can now mock the api calls in unit tests

Signed-off-by: Xiayang Wu <xwu@rippling.com>
Copy link
Member

@JorTurFer JorTurFer left a comment

Choose a reason for hiding this comment

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

LGTM!
Thanks for your contribution!

Copy link
Member

@zroubalik zroubalik left a comment

Choose a reason for hiding this comment

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

LGTM, thanks a lot for this!

@zroubalik zroubalik merged commit ca8d5ea into kedacore:main Nov 8, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants