airbytehq / airbytehq/airbyte

bug(source-mssql): CDC check crashes on localized SQL Server Agent service names

未關閉
#82,785 2 則留言 0 個 reaction 已指派 0 人 在 GitHub 檢視
autoteam connectors/source/mssql hyd-review team/db-dw-sources
主要語言
Python
星號
22.1k
分支
5.4k
平均合併
5 小時
30 天內合併 PR
671

描述

## Summary

CDC-enabled `source-mssql` connection checks crash on localized (non-English) SQL Server installations with:

```
java.lang.ArrayIndexOutOfBoundsException: Index 0 out of bounds for length 0
```

## Root cause

`assertSqlServerAgentRunning` (in `MsSqlSourceMetadataQuerier.kt`) looks up the SQL Server Agent service with a hard-coded `LIKE 'SQL Server Agent%'`. German installations name the service `SQL Server-Agent` (hyphen), so the query returns zero rows and the connector indexes into an empty result while validating that the Agent is "Running".

## Impact

Users on localized SQL Server instances cannot set up CDC replication at all, even when the Agent is running correctly. `source-mssql` is a certified connector.

## History

- Previously reported in #66582, which was closed as completed even though the fix never landed.
- Community PR #72867 proposed widening the `LIKE` pattern. That PR was closed on 2026-07-27 as part of a stale-PR cleanup (no maintainer review in ~5 months, no test covering localized service names) — the underlying bug was not disputed, hence this issue.

## Suggested fix

Match the service name without assuming English punctuation/wording, and fail with a clear error message (rather than an index-out-of-bounds) when no Agent row is found. A regression test with a localized service name would prevent the next recurrence.

---
Filed at the request of @jimruppert while triaging the community PR backlog.
[Devin session](https://app.devin.ai/sessions/12011a91f2d541f0826863290e5ad30c)

---
**Internal Tracking:** https://github.com/airbytehq/oncall/issues/13170

貢獻指南

開啟貢獻指南

研究方向

Start in MsSqlSourceMetadataQuerier.kt at assertSqlServerAgentRunning and trace the service lookup and result handling. Locate the source-mssql metadata or connection-check tests, then add coverage for the German SQL Server-Agent name and the no-row case. Done means localized CDC connection checks no longer crash and report a clear failure when no Agent row is found.

由索引模型根據 Issue 內容生成。

評估

技術堆疊
kotlin, sql
領域
data-engineering, databases
Issue 類型
缺陷
難度
3/5
預估耗時
1-2 天
活躍度
冷清
描述清晰度
描述清楚
新手友好度
72/100

把新 issue 寄到你的電子郵件信箱

精選適合新手參與的 GitHub issue 摘要。