(logs_dir: Path)
| 118 | |
| 119 | |
| 120 | def 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 | |
| 146 | def create_services(service_name: str) -> list[Service | Materialized]: |
no test coverage detected