Skip to content

Launchpad Service#7

Merged
akremenetsky merged 1 commit intomasterfrom
feat/gservice
Oct 27, 2025
Merged

Launchpad Service#7
akremenetsky merged 1 commit intomasterfrom
feat/gservice

Conversation

@akremenetsky
Copy link
Member

@akremenetsky akremenetsky commented Oct 2, 2025

Launchpad service is a service that can run multiple services and execute them sequentially. It's convienient when you have multiple services that need to be run in a specific order or the services aren't heavy and you don't want to use multiprocessing. Also it simplify the configuration of the services.

Example of configuration to run 3 services:

[DEFAULT]
verbose = True
debug = True

[launchpad]
services =
    my_package.service_foo:FooService,
    my_package.service_bar:BarService,
    my_package.service_baz:BazService
common_registrator_opts = my_package.service_common:common_opts
common_initializer = my_package.service_common:common_init

[my_package.service_foo:FooService]
name = foo

[my_package.service_bar:BarService]
name = bar
project_id = 123

[my_package.service_baz:BazService]
param1 = value1
param2 = value2

@akremenetsky akremenetsky self-assigned this Oct 2, 2025
@akremenetsky
Copy link
Member Author

/gemini review

Copy link

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

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

Code Review

This pull request introduces a generic service runner, GService, which leverages oslo.config for configuration management. The changes include adding a new command-line entry point, defining base classes for configurable services, and providing utility functions for dynamic class loading.

My review has identified a few areas for improvement, primarily concerning error handling, API usage, and Python version compatibility. Specifically, there's an unhandled exception case during service loading, use of a deprecated API in importlib-metadata, a non-standard type hint that will cause issues on older Python versions, a misleading base class implementation, and a small opportunity for code simplification in module loading. Addressing these points will improve the robustness and maintainability of the new service runner.

@akremenetsky akremenetsky force-pushed the feat/gservice branch 3 times, most recently from 921a65c to bb47b4d Compare October 21, 2025 21:13
@akremenetsky
Copy link
Member Author

/gemini review

@akremenetsky akremenetsky changed the title Added GService Launchpad Service Oct 21, 2025
@akremenetsky akremenetsky marked this pull request as ready for review October 21, 2025 21:15
Copy link

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

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

Code Review

This pull request introduces a new LaunchpadService that can run multiple services sequentially, configured via oslo.config. The implementation is comprehensive, including a command-line entry point, utility functions for loading services, and extensive tests.

My review focuses on improving robustness and documentation. I've pointed out a couple of typos in the README.md file. More importantly, I've identified a potential ValueError in the service string parsing logic that could crash the application, and suggested a fix. I also found a test isolation issue in the new unit tests that could lead to flaky tests and recommended using a pytest fixture to resolve it.

Overall, this is a great addition. Once these points are addressed, the PR should be ready to merge.

@akremenetsky akremenetsky force-pushed the feat/gservice branch 2 times, most recently from a9a83b7 to 0561c39 Compare October 21, 2025 21:34
Launchpad service is a service that can run multiple services and
execute them sequentially. It's convienient when you have multiple
services that need to be run in a specific order or the services
aren't heavy and you don't want to use multiprocessing.
Also it simplify the configuration of the services.

Signed-off-by: Anton Kremenetsky <anton.kremenetsky@gmail.com>
@akremenetsky akremenetsky merged commit a923da8 into master Oct 27, 2025
10 checks passed
@akremenetsky akremenetsky deleted the feat/gservice branch October 27, 2025 10:47
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