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

Add utilities for autoscaling. #72

Merged
merged 2 commits into from
Sep 28, 2022
Merged

Add utilities for autoscaling. #72

merged 2 commits into from
Sep 28, 2022

Conversation

rhoboat
Copy link
Contributor

@rhoboat rhoboat commented Sep 23, 2022

Description

Utility functions for autoscaling.

Documentation

TODOs

  • Update the docs.
  • Keep the changes backward compatible where possible.
  • Run the pre-commit checks and tests.
  • Ensure any 3rd party code adheres with our license policy or delete this line if its not applicable.

Related Issues

Relates to https://github.com/gruntwork-io/ecsgrunt/pull/2.

Copy link
Contributor

@yorinasub17 yorinasub17 left a comment

Choose a reason for hiding this comment

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

Mostly LGTM! Only had a few minor nits.

awscommons/v2/autoscaling.go Show resolved Hide resolved
logging/logging.go Show resolved Hide resolved
awscommons/v2/autoscaling.go Show resolved Hide resolved
Comment on lines +53 to +54
logger.Errorf("Failed to set ASG desired capacity to %d", desiredCapacity)
logger.Errorf("If the capacity is set in AWS, undo by lowering back to the original desired capacity. If the desired capacity is not yet set, triage the error message below and try again.")
Copy link
Contributor

Choose a reason for hiding this comment

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

NIT: these are kind of application specific logs. I would probably convert these to a custom error type that the caller can use to decide what log message to output.

This approach would also help with removing the need to handle a logger in these funcs.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I will take care of this remaining issue in a future PR. I resolved the others, because they should be fixed by #73

@rhoboat
Copy link
Contributor Author

rhoboat commented Sep 28, 2022

Going to merge this up and address comments in a future PR!

@rhoboat rhoboat merged commit b3539bc into master Sep 28, 2022
@rhoboat rhoboat deleted the feature/autoscaling branch September 28, 2022 21:45
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.

2 participants