Skip to content

Create settings singelton for client, server, task settings#202

Open
Ekyoz wants to merge 1 commit into
devfrom
feat/client_settings
Open

Create settings singelton for client, server, task settings#202
Ekyoz wants to merge 1 commit into
devfrom
feat/client_settings

Conversation

@Ekyoz
Copy link
Copy Markdown

@Ekyoz Ekyoz commented Apr 27, 2026

This pull request refactors configuration management throughout the codebase to use centralized settings objects instead of reading from environment variables at runtime. This improves maintainability, testability, and consistency of configuration across the application. Key areas affected include task management, gRPC server and client initialization, and module servicing.

Configuration Centralization and Refactoring:

  • Replaced direct environment variable access in BaseTaskManager with a TaskSettings object, updating all references to task concurrency, queue, and timeout parameters to use this settings object. (src/digitalkin/core/task_manager/base_task_manager.py) [1] [2] [3] [4] [5] [6] [7] [8] [9] [10] [11]

  • Updated GrpcClientWrapper to use a ClientSettings object for all gRPC client configuration, including channel security and retry settings, instead of reading from environment variables. (src/digitalkin/grpc_servers/utils/grpc_client_wrapper.py) [1] [2] [3]

gRPC Server and Servicer Improvements:

  • Modified gRPC server startup (_base_server.py) to rely on a ServerSettings object for enabling and configuring the asyncio inspector, rather than environment variables. (src/digitalkin/grpc_servers/_base_server.py)

  • Refactored ModuleServicer and its usage to accept and use a ServerSettings object for settings such as setup cache size and completion timeout, removing environment variable dependencies. (src/digitalkin/grpc_servers/module_servicer.py, src/digitalkin/grpc_servers/module_server.py) [1] [2] [3] [4] [5] [6] [7] [8]

These changes collectively move the codebase toward a more robust and testable configuration approach, reducing reliance on environment variables and improving clarity of configuration dependencies.

@Ekyoz Ekyoz self-assigned this Apr 27, 2026
@Ekyoz Ekyoz requested a review from xaviave April 27, 2026 09:00
@Ekyoz Ekyoz force-pushed the feat/client_settings branch 5 times, most recently from 6255fce to 8235f21 Compare April 28, 2026 15:51
@Ekyoz Ekyoz marked this pull request as ready for review April 29, 2026 07:08
@Ekyoz Ekyoz force-pushed the feat/client_settings branch 3 times, most recently from 2574316 to 5344c3c Compare April 29, 2026 12:37
…arameters

feat(client): add top-level gRPC client settings and channel configuration

feat(client_settings): Update client settings structure and improve task management configurations

feat(client_settings): Update client and server configuration settings in .env.example and related files

Signed-off-by: Alexandre <a.tresallet@digitalkin.ai>
@Ekyoz Ekyoz force-pushed the feat/client_settings branch from 5344c3c to e85aac0 Compare April 29, 2026 12:44
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.

1 participant