Skip to content

Conversation

@seedspirit
Copy link
Contributor

resolves #6429 (BA-2847)

Checklist: (if applicable)

  • Milestone metadata specifying the target backport version
  • Mention to the original issue
  • Installer updates including:
    • Fixtures for db schema changes
    • New mandatory config options
  • Update of end-to-end CLI integration tests in ai.backend.test
  • API server-client counterparts (e.g., manager API -> client SDK)
  • Test case(s) to:
    • Demonstrate the difference of before/after
    • Demonstrate the flow of abstract/conceptual models with a concrete implementation
  • Documentation
    • Contents in the docs directory
    • docstrings in public interfaces and type annotations

@seedspirit seedspirit self-assigned this Oct 30, 2025
@github-actions github-actions bot added size:L 100~500 LoC comp:manager Related to Manager component comp:common Related to Common component labels Oct 30, 2025
@seedspirit seedspirit marked this pull request as ready for review October 30, 2025 09:53
Copilot AI review requested due to automatic review settings October 30, 2025 09:53
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR introduces two new abstract base classes for converting minilang expressions to domain-specific objects: BaseMinilangFilterConverter for filter expressions and BaseMinilangOrderParser for order expressions. These base classes provide reusable parsing and conversion logic that can be extended by domain-specific implementations.

  • Adds BaseMinilangFilterConverter to convert minilang filter expressions to structured Filter objects with support for AND/OR logical operations
  • Adds BaseMinilangOrderParser to parse order expressions (e.g., "+id,-status") into OrderingOption objects
  • Introduces two new exception classes: InvalidParameter and ASTParsingFailed for better error handling

Reviewed Changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 4 comments.

File Description
src/ai/backend/manager/repositories/types.py Adds BaseMinilangFilterConverter and BaseMinilangOrderParser abstract base classes with supporting methods for parsing and converting minilang expressions
src/ai/backend/common/exception.py Adds InvalidParameter and ASTParsingFailed exception classes for parameter validation and AST parsing errors
changes/6492.feature.md Documents the feature addition for the changelog

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@github-actions github-actions bot added size:XL 500~ LoC and removed size:L 100~500 LoC labels Nov 3, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

comp:common Related to Common component comp:manager Related to Manager component size:XL 500~ LoC

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Introduce Base Filter and Order Converter for Graphene resolvers

3 participants