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

Application Autoscaling basic features #3082

Merged

Conversation

dawngerpony
Copy link
Contributor

@dawngerpony dawngerpony commented Jun 20, 2020

Fixes #1931.

Problem

moto currently has no support for mocking any of the Application Load Balancing features of boto3. See #1931 for more information.

Changes

Current status of this PR:

  • basic support for describe_scalable_targets with "consistency validation" for ECS-based targets
  • "consistency validation" (my own term) means that you must mock ECS and create a service before you can register any scalable targets against that service, i.e. your scalable targets must be consistent with the mock resources to which they refer
  • basic support for register_scalable_target
  • parameter validation over and above the basic validation provided by the boto3 client
  • README and contributor guide updates

TODO

  • More comprehensive parameter validation
  • support for additional endpoints (should be in another PR)
  • better support (e.g. "consistency validation") for additional services supported by Application Autoscaling, similar to that already implemented for ECS in this PR. The full list seems to be:
    APPSTREAM = "appstream"
    RDS = "rds"
    LAMBDA = "lambda"
    CASSANDRA = "cassandra"
    DYNAMODB = "dynamodb"
    CUSTOM_RESOURCE = "custom-resource"
    ELASTICMAPREDUCE = "elasticmapreduce"
    EC2 = "ec2"
    COMPREHEND = "comprehend"
    ECS = "ecs"
    SAGEMAKER = "sagemaker"

Notes

  • The changes in this PR were inspired by Add managedblockchain network functions #2956 #2957 as well as the existing autoscaling functionality, which is far closer to the functionality required by Application Autoscaling than the Managed Blockchain functionality.
  • This is my first PR implementing an entirely new endpoint; feedback is welcomed 🙏

@dawngerpony dawngerpony changed the title Placeholder to test Application Autoscaling. Application Autoscaling basic features Jun 20, 2020
@coveralls
Copy link

coveralls commented Jun 22, 2020

Coverage Status

Coverage decreased (-0.02%) to 94.378% when pulling b65c59c on dawngerpony:feature/1931-application-autoscaling into 385c78a on spulec:master.

@dawngerpony
Copy link
Contributor Author

NB. Build is currently failing due to #3098

@dawngerpony dawngerpony marked this pull request as ready for review June 28, 2020 11:32
moto/applicationautoscaling/__init__.py Outdated Show resolved Hide resolved
moto/applicationautoscaling/models.py Outdated Show resolved Hide resolved
moto/applicationautoscaling/models.py Outdated Show resolved Hide resolved
tests/test_applicationautoscaling/test_validation.py Outdated Show resolved Hide resolved
tests/test_applicationautoscaling/test_validation.py Outdated Show resolved Hide resolved
Copy link
Collaborator

@bblommers bblommers 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 @dawngerpony!

I'm going to have to leave this open for now - will merge it after we get master fixed

@dawngerpony
Copy link
Contributor Author

LGTM. Thanks for your contribution @dawngerpony!

I'm going to have to leave this open for now - will merge it after we get master fixed

No problem, I've tried merging your changes from #3099 into my branch to see if I can at least get a green build while I'm waiting for master to go green.

@dawngerpony
Copy link
Contributor Author

@bblommers I think this PR might be ready to merge now? I've pushed your build fix from master into my branch.

@bblommers bblommers merged commit b225e96 into getmoto:master Jul 3, 2020
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.

Application Autoscaling service
3 participants