| Author | Daemyung Kang (daemyung@lablup.com), Hyunhoi Koo (hhkoo@lablup.com) |
|---|---|
| Status | Draft |
| Created | 2026-01-14 |
| Created-Version | 25.19.1 |
| Target-Version | |
| Implemented-Version |
- JIRA: BA-XXXX
- GitHub: #XXXX
Why is this change needed? What problem does it solve?
Example:
Currently,
StringFilteronly supports 4 out of 10 defined filter fields. Users expect all filter fields to work, butstarts_with,ends_with, andnot_equalsare silently ignored. This causes confusion and unexpected query results.
Describe the current state or design that this proposal aims to change.
Example:
def build_query_condition( self, contains_factory: Callable[[str, bool], QueryCondition], equals_factory: Callable[[str, bool], QueryCondition], ) -> Optional[QueryCondition]: # Only 4 fields are handled, others are ignored
Describe the new design or changes being proposed.
Example:
@dataclass class StringMatchSpec: value: str case_insensitive: bool = False negated: bool = False def build_query_condition( self, contains_factory: Callable[[StringMatchSpec], QueryCondition], equals_factory: Callable[[StringMatchSpec], QueryCondition], starts_with_factory: Callable[[StringMatchSpec], QueryCondition], ends_with_factory: Callable[[StringMatchSpec], QueryCondition], ) -> Optional[QueryCondition]: # All fields are now handled
Describe backward compatibility considerations and migration plan if applicable.
Example:
- Existing
build_query_condition()calls will require updates- New factory parameters are required (no default values)
- Factory signature changed from
Callable[[str, bool], QueryCondition]toCallable[[StringMatchSpec], QueryCondition]
- Update all adapter implementations to use new
StringMatchSpec- Add
starts_with_factoryandends_with_factoryto all callers- Test all filter combinations
Outline the implementation steps and priorities.
Example:
Phase 1: Core changes
- Add
StringMatchSpecdataclass- Update
StringFilter.build_query_condition()signaturePhase 2: Adapter updates
- Update
ScalingGroupFilterGQLadapter- Update other adapters using
StringFilterPhase 3: Testing
- Add unit tests for all filter field combinations
- Add integration tests for GraphQL queries
List any unresolved questions or items that need further discussion.
Example:
- Should we add
not_contains,not_starts_with,not_ends_withfields toStringFilter?- Should factory parameters be optional with default
Nonefor backward compatibility?
- Link to related documents, discussions, or external resources
Example: