lablup / lablup/backend.ai

Consolidate UnifiedConfig infrastructure to common module

Open
#7,787 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
Python
Stars
670
Forks
183
Avg merge
17h 7m
Merged PRs (30d)
358

Description

## Overview

Consolidate duplicated configuration classes across components (Manager, Agent, Storage Proxy, Web Server, App Proxy) into the common module.

## Current Problem

Multiple identical config classes exist in each component:

- `EtcdConfig` - duplicated in 5 places
- `OTELConfig` - duplicated in 5 places
- `ServiceDiscoveryConfig` - duplicated in 4 places
- `DebugConfig` - duplicated in 4 places
- `PyroscopeConfig` - duplicated in 3 places

## Target Structure

```
src/ai/backend/common/configs/
├── base.py # BaseUnifiedConfig
├── etcd.py # EtcdConfig
├── otel.py # OTELConfig
├── service_discovery.py # ServiceDiscoveryConfig
├── debug.py # DebugConfig
├── pyroscope.py # PyroscopeConfig
└── types.py # EventLoopType, etc.
```

## Benefits

- Single source of truth for common configs
- Easier maintenance and updates
- Consistent behavior across components
- Reduced code duplication

JIRA Issue: BA-3766

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.