Skip to content

Make SERVICES act as preload-list for EAGER_SERVICE_LOADING #6438

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

Merged
merged 4 commits into from
Jul 12, 2022

Conversation

dfangl
Copy link
Member

@dfangl dfangl commented Jul 12, 2022

Current behavior

Currently, SERVICES will deactivate certain service plugins - which leads to all sorts of problems, a lot of if is_api_enableds over the codebase, and the bad practice to define SERVICES variable - often without taking in mind the interconnection of a lot of services.

New behavior

SERVICES will lose all functionality if EAGER_SERVICE_LOADING=0. This should be without impact for most costumers (due to lazy loading), except for the warning message printed at startup.
SERVICES will now define a list of services preloaded with EAGER_SERVICE_LOADING=1. If this is enabled, all services specified will be started on startup, everything else will be loaded on demand. There is no more failing of requests due to a service not specified in SERVICES
Service plugins cannot be disabled now, and are all enabled (but not necessarily loaded) by default.

Impact

Impact should be, in general, minimal, due to the default activation of lazy service loading. It should however reduce SERVICES-related support cases.

Future work

  • remove SERVICE_PORTS and dependencies on localstack-client

@dfangl dfangl temporarily deployed to localstack-ext-tests July 12, 2022 16:23 Inactive
Copy link
Member

@thrau thrau left a comment

Choose a reason for hiding this comment

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

looks great! thanks for cleaning this up. SERVICES has lead to lots of confusion with lazy loading, so glad to see it go. but still has some utility with EAGER_SERVICE_LOADING=1

@dfangl dfangl temporarily deployed to localstack-ext-tests July 12, 2022 16:36 Inactive
@dfangl dfangl temporarily deployed to localstack-ext-tests July 12, 2022 16:51 Inactive
@coveralls
Copy link

Coverage Status

Coverage increased (+0.02%) to 91.694% when pulling 7ac71d3 on rework-services-config into 2c85ccd on master.

@github-actions
Copy link

LocalStack integration with Pro

       3 files  ±0         3 suites  ±0   59m 29s ⏱️ - 3m 15s
1 127 tests ±0  1 087 ✔️ ±0  40 💤 ±0  0 ±0 
1 442 runs  ±0  1 373 ✔️ ±0  69 💤 ±0  0 ±0 

Results for commit 7ac71d3. ± Comparison against base commit 2c85ccd.

@dfangl dfangl merged commit f909413 into master Jul 12, 2022
@dfangl dfangl deleted the rework-services-config branch July 12, 2022 19:39
@localstack localstack locked and limited conversation to collaborators Jul 12, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants