Jump to content

Connect SuperML | Leeroopedia MCP: Equip your AI agents with best practices, code verification, and debugging knowledge. Powered by Leeroo — building Organizational Superintelligence. Contact us at founders@leeroo.com.

Implementation:MaterializeInc Materialize GitHub Issue Tracker

From Leeroopedia
Revision as of 15:38, 16 February 2026 by Admin (talk | contribs) (Auto-imported from implementations/MaterializeInc_Materialize_GitHub_Issue_Tracker.md)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)


Knowledge Sources
Domains CI/CD, Issue Tracking, Error Handling
Last Updated 2026-02-08 00:00 GMT

Overview

The GitHub Issue Tracker module fetches and parses known GitHub issues with ci-regexp annotations to match CI test failures against tracked bugs.

Description

This module queries the GitHub Search API for issues containing ci-regexp: directives in their body text across the MaterializeInc/database-issues repository (and optionally other repos). Each issue is parsed to extract a regex pattern (ci-regexp:), an optional apply-to filter (ci-apply-to:), a location filter (ci-location:), and an ignore-failure flag (ci-ignore-failure:). These are compiled into KnownGitHubIssue dataclass instances that CI tooling uses to match test failure output against known bugs. Issues with invalid regex patterns are collected as GitHubIssueWithInvalidRegexp error objects for reporting.

Usage

Use this module in CI pipelines to automatically correlate test failures with known GitHub issues, reducing noise from known bugs and surfacing genuinely new failures.

Code Reference

Source Location

Signature

@dataclass
class KnownGitHubIssue:
    regex: re.Pattern[Any]
    apply_to: str | None
    info: dict[str, Any]
    ignore_failure: bool
    location: str | None

@dataclass(kw_only=True, unsafe_hash=True)
class GitHubIssueWithInvalidRegexp(ObservedBaseError, WithIssue):
    regex_pattern: str
    def to_text(self) -> str: ...
    def to_markdown(self) -> str: ...

def get_known_issues_from_github(
    token: str | None = os.getenv("GITHUB_TOKEN"),
    repo: str = "MaterializeInc/database-issues",
) -> tuple[list[KnownGitHubIssue], list[GitHubIssueWithInvalidRegexp]]: ...

def get_known_issues_from_github_page(
    token: str | None, repo: str, page: int = 1
) -> Any: ...

Import

from materialize.github import get_known_issues_from_github, KnownGitHubIssue

I/O Contract

Input Type Description
token None GitHub API token (defaults to GITHUB_TOKEN env var)
repo str GitHub repository to search (default: "MaterializeInc/database-issues")
Output Type Description
known_issues list[KnownGitHubIssue] Parsed issues with compiled regex patterns for matching
invalid_issues list[GitHubIssueWithInvalidRegexp] Issues with malformed regex patterns

Usage Examples

from materialize.github import get_known_issues_from_github

known_issues, invalid_issues = get_known_issues_from_github()

# Match a CI failure against known issues
failure_text = "ERROR: relation 'foo' does not exist"
for issue in known_issues:
    if issue.regex.search(failure_text):
        print(f"Known issue: {issue.info.get('title')}")

Related Pages

Page Connections

Double-click a node to navigate. Hold to expand connections.
Principle
Implementation
Heuristic
Environment