MCPcopy Create free account
hub / github.com/MaterializeInc/materialize / check_query_errors

Function check_query_errors

misc/python/materialize/sqlancer.py:120–143  ·  view source on GitHub ↗
(logs_dir: Path)

Source from the content-addressed store, hash-verified

118
119
120def check_query_errors(logs_dir: Path) -> list[str]:
121 unexpected_errors = []
122 log_files = list(logs_dir.glob("*.log"))
123
124 for log_file in log_files:
125 try:
126 content = log_file.read_text()
127 except Exception:
128 continue
129
130 for line in content.splitlines():
131 if "ERROR" not in line:
132 continue
133
134 is_ignored = False
135 for pattern in IGNORED_ERROR_PATTERNS:
136 if re.search(pattern, line):
137 is_ignored = True
138 break
139
140 if not is_ignored:
141 unexpected_errors.append(f"{log_file.name}: {line}")
142
143 return unexpected_errors
144
145
146def create_services(service_name: str) -> list[Service | Materialized]:

Callers 1

run_sqlancerFunction · 0.85

Calls 2

listFunction · 0.50
appendMethod · 0.45

Tested by

no test coverage detected