Migrate PartialModifier to Updater pattern
- Dominant language
- Python
- Stars
- 670
- Forks
- 183
- Avg merge
- 17h 7m
- Merged PRs (30d)
- 358
Description
## Overview
Replace the legacy `PartialModifier` class in `src/ai/backend/manager/types.py` with the new `Updater` pattern from `src/ai/backend/manager/repositories/base/updater.py`.
## Current State
The `PartialModifier` class in `types.py` is an abstract base class used for partial update operations:
```python
class PartialModifier(ABC):
@abstractmethod
def fields_to_update(self) -> dict[str, Any]:
"""Returns a dictionary of fields that should be updated."""
pass
```
## Target State
Use the new `Updater` and `UpdaterSpec` pattern with `execute_updater` function from `repositories/base/updater.py` for consistency with other repository patterns (Creator, Querier, Purger).
## Tasks
- [ ] Identify all usages of `PartialModifier` in the codebase
- [ ] Migrate each usage to `UpdaterSpec` / `Updater` pattern
- [ ] Update tests accordingly
- [ ] Remove legacy `PartialModifier` class from `types.py`
## Related
- Parent Epic: BA-3345
- Similar migration for Creator: BA-3348
JIRA Issue: BA-3352
Contributor guide
Assessment
This issue has not been assessed yet.