Visitar URL original
implement lazy-loading of services by thrau · Pull Request #4648 · localstack/localstack · GitHub
The Wayback Machine - https://web.archive.org/web/20211108055205/https://github.com/localstack/localstack/pull/4648
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

implement lazy-loading of services #4648

Merged
merged 36 commits into from Oct 18, 2021
Merged

implement lazy-loading of services #4648

merged 36 commits into from Oct 18, 2021

Conversation

Labels
None yet
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

5 participants
@thrau
Copy link
Member

@thrau thrau commented Sep 26, 2021 •

This PR adds

  • A ServiceManager class that now takes care of managing AWS services (instead of previously having a only global arrays of state)
  • A ServicePlugin concept that uses our plugin framework to load services
  • optional lazy-loading of services

To test:

  • start localstack with EAGER_SERVICE_START=0
  • run localstack status services and observe that services are in available mode

TODO

  • this will break localstack-ext. there's a branch with the same name in localstack-ext that needs to be updated and released at the same time.
  • remove localstack.cli.plugins (a cli tool i added for debugging purposes)
  • remove resulting dead code
@thrau thrau had a problem deploying to localstack-ext-tests Sep 26, 2021 Failure
@thrau thrau requested review from dfangl, whummer and alexrashed Sep 26, 2021
@github-actions
Copy link

@github-actions github-actions bot commented Sep 26, 2021 •

LocalStack integration with Pro

0 files   -     1  0 suites   - 1   0s ⏱️ - 17m 45s
0 tests  - 621  0 ✔️  - 602  0 💤  - 17  0 ❌  - 2 

Results for commit 3cc1291. ± Comparison against base commit 3f9476f.

This pull request removes 621 tests.
tests.integration.cloudformation.test_cloudformation_apigateway ‑ test_cfn_apigateway_aws_integration
tests.integration.cloudformation.test_cloudformation_changesets ‑ test_create_change_set_create_existing
tests.integration.cloudformation.test_cloudformation_changesets ‑ test_create_change_set_import
tests.integration.cloudformation.test_cloudformation_changesets ‑ test_create_change_set_invalid_params
tests.integration.cloudformation.test_cloudformation_changesets ‑ test_create_change_set_missing_stackname
tests.integration.cloudformation.test_cloudformation_changesets ‑ test_create_change_set_update_nonexisting
tests.integration.cloudformation.test_cloudformation_changesets ‑ test_create_change_set_update_without_parameters
tests.integration.cloudformation.test_cloudformation_changesets ‑ test_create_change_set_with_ssm_parameter
tests.integration.cloudformation.test_cloudformation_changesets ‑ test_create_change_set_with_template_url
tests.integration.cloudformation.test_cloudformation_changesets ‑ test_create_change_set_without_parameters
…

♻️ This comment has been updated with latest results.

Loading

localstack/cli/plugins.py Outdated Show resolved Hide resolved
Loading
localstack/cli/plugins.py Outdated Show resolved Hide resolved
Loading
localstack/config.py Outdated Show resolved Hide resolved
Loading
localstack/services/infra.py Outdated Show resolved Hide resolved
Loading
localstack/services/infra.py Outdated Show resolved Hide resolved
Loading
localstack/services/plugins.py Outdated Show resolved Hide resolved
Loading
localstack/services/plugins.py Outdated Show resolved Hide resolved
Loading
localstack/services/plugins.py Outdated Show resolved Hide resolved
Loading
localstack/services/plugins.py Outdated Show resolved Hide resolved
Loading
localstack/plugins.py Outdated Show resolved Hide resolved
Loading
@dfangl dfangl had a problem deploying to localstack-ext-tests Oct 4, 2021 Failure
@dfangl dfangl had a problem deploying to localstack-ext-tests Oct 4, 2021 Error
@thrau thrau had a problem deploying to localstack-ext-tests Oct 9, 2021 Failure
@dfangl dfangl had a problem deploying to localstack-ext-tests Oct 11, 2021 Failure
@dfangl dfangl had a problem deploying to localstack-ext-tests Oct 12, 2021 Failure
@dfangl dfangl had a problem deploying to localstack-ext-tests Oct 12, 2021 Failure
@coveralls
Copy link

@coveralls coveralls commented Oct 12, 2021 •

Coverage Status

Coverage decreased (-0.5%) to 79.835% when pulling 3cc1291 on services-v2 into 3f9476f on master.

Loading

Copy link
Member

@whummer whummer left a comment

Awesome set of changes - can't express how excited I am to get this merged soon! 🎉 Great job @thrau and @dfangl !! 💪

Loading

localstack/plugins.py Outdated Show resolved Hide resolved
Loading
Loading
localstack/services/edge.py Outdated Show resolved Hide resolved
Loading
localstack/services/infra.py Outdated Show resolved Hide resolved
Loading
localstack/services/infra.py Outdated Show resolved Hide resolved
Loading
localstack/services/plugins.py Outdated Show resolved Hide resolved
Loading
localstack/services/plugins.py Show resolved Hide resolved
Loading
localstack/services/plugins.py Outdated Show resolved Hide resolved
Loading
localstack/utils/bootstrap.py Show resolved Hide resolved
Loading
@thrau
Copy link
Member Author

@thrau thrau commented Oct 15, 2021

571c70b is released as 0.13.0.dev1

Loading

@thrau thrau had a problem deploying to localstack-ext-tests Oct 15, 2021 Failure
@thrau
Copy link
Member Author

@thrau thrau commented Oct 15, 2021

released ea4d2d6 as 0.13.0.dev2

Loading

@thrau thrau had a problem deploying to localstack-ext-tests Oct 17, 2021 Failure
@thrau thrau had a problem deploying to localstack-ext-tests Oct 17, 2021 Failure
dfangl
dfangl approved these changes Oct 18, 2021
Copy link
Member

@whummer whummer left a comment

Rocket is ready to launch!! 🚀 🎉

Loading

@thrau thrau merged commit f41b25c into master Oct 18, 2021
8 of 9 checks passed
Loading
@whummer whummer deleted the services-v2 branch Oct 18, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment