-
-
Notifications
You must be signed in to change notification settings - Fork 4.5k
add restricted services config #9494
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
Conversation
682d89c to
aab476f
Compare
9f9daab to
df388ef
Compare
alexrashed
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice! Really cool implementation of the strict service loading. Awesome that it stays pretty simple and clean. I only had a few comments, most of them are nitpicks :)
alexrashed
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorry about the confusion with my (mistaken) PR comment in the last review.
Besides the new change concerning the port mapping, the code is looking great! 🚀
1158008 to
4504510
Compare
Motivation
Disclaimer: targeting
masterfor now to validate all tests, and we will set theSTRICT_SERVICE_LOADINGvariable to default toTruein the release branch afterwards. This variable won't be advertised and is used to decouple eager service loading from "strict" service loading, and might be removed after the release.When some services are problematic, or we want to use LocalStack for only one or more services, we should be able to use the
SERVICESvariable coupled withSTRICT_SERVICE_LOADING=1in order to be able to only enable the listed services.The
EAGER_SERVICE_LOADINGfunctionality is untouched for now, and is applied on top: meaning if you don't haveSTRICT_SERVICE_LOADINGset then you'll have all available services, and will only eager load the services inSERVICES.If
STRICT_SERVICE_LOADING=1is set, then the services inSERVICESwill be the only ones available. You can additionally eager load them by specifyingEAGER_SERVICE_LOADING =1.Example: you only want S3 and SQS loaded:
SERVICES=sqs,s3+STRICT_SERVICE_LOADING=1You want kinesis eager loaded at startup, but still lazy load other services:
SERVICES=kinesis+EAGER_SERVICE_LOADING =1You want to only use kinesis, dynamodb, s3 and sqs, but with eager loading:
SERVICES=kinesis,dynamodb,sqs,s3+STRICT_SERVICE_LOADING=1+EAGER_SERVICE_LOADING =1We should also do a new pass on the
API_DEPENDENCIESconstant to validate the inter-service dependencies, and be sure we will load the necessary services.\cc @steffyP
Changes
Change the logic for
get_enabled_apis, which is now linked toSTRICT_SERVICE_LOADING.Create new logic for eager loading, linked to the
get_preloaded_servicesmethod andEAGER_SERVICE_LOADING.Add a test to validate the new behaviour of disabling services.