Uploaded image for project: 'AI Platform Core Components'
  1. AI Platform Core Components
  2. AIPCC-7745

Refactor create_midstream_matcher regex for readability & optional upstream tag support

    • Icon: Bug Bug
    • Resolution: Won't Do
    • Icon: Normal Normal
    • None
    • None
    • Accelerator Enablement
    • None
    • False
    • Hide

      None

      Show
      None
    • False
    • AIPCC Accelerators 21, AIPCC Accelerators 22, AIPCC Accelerators 23, AIPCC Accelerators 24, AIPCC Accelerators 25, AIPCC Accelerators 26, AIPCC Accelerators 27

      Summary: Refactor create_midstream_matcher Regex for Readability & Investigate Optional Upstream Tag Support

      Description

      We recently simplified the create_midstream_matcher function to strictly enforce the +rhai suffix. See https://gitlab.com/redhat/rhel-ai/wheels/builder/-/merge_requests/1708 . This ensures that non-midstream tags (formerly "upstream") are rejected, preventing build failures caused by processing tags that lack necessary dependencies.

      While the logic is now safer, we need to improve the maintainability of the regular expressions and determine if we need to re-introduce upstream support behind a feature flag.

      Context & Recent Changes

      • Strict Enforcement: The conditional logic for upstream tag support was removed.
      • Mandatory Suffix: The +rhai suffix is now required in all regex patterns.
      • Terminology: Updated "upstream" to "non-midstream" throughout the codebase.
      • Scope: Applied to midstream built packages (llama-stack, vLLM for now).

      Objectives

      1. Refactor Regex: Convert the current condensed regular expressions to use Verbose Syntax (e.g., re.VERBOSE in Python). This will allow us to comment on individual parts of the pattern for better long-term maintainability.
      2. Optional Support (If required): If teams need upstream tags, implement an optional argument (llamastack will need it). A new argument will be added to the matcher, rejecting upstream tags by default, but allowing projects to building from upstream tags as well.

              rh-ee-pmattsso Percy Mattsson
              emacchi@redhat.com Emilien Macchi
              Frank's Team
              Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

                Created:
                Updated:
                Resolved: