Hacktoberfest 2026:维护者为十月标记出来的 issue,仍然开放、适合新手。 浏览 Hacktoberfest issue

ADO_Server_Diagnostics_2025 cannot be run as published: missing Common.psm1 and two analyzers incompatible with Elasticsearch 8

未关闭
#123 0 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

还没有人认领这个 Issue。

评估

难度
4/5
预计耗时
3-5 天
新手友好度
48/100
Issue 类型
缺陷
描述清晰度
基本清楚
活跃度
活跃
技术栈
elasticsearch, powershell, sql

调研方向

Start with ADO_Server_Diagnostics_2025/Common.psm1 and Troubleshooting/Utils/Common.psm1, then inspect Analyzers/Test-ElasticsearchHealth.psm1 and Test-IndicesHaveUnsupportedMappings.psm1 against Elasticsearch 8.14.1. Read Troubleshooting/readme.txt and locate every Invoke-Sqlcmd call before running Repair-Search.ps1. Done means a published 25H2 run completes all analyzers, documents the actual parameters, and handles the stated SQL TLS condition.

由索引模型根据 Issue 内容生成。

描述

  1. ADO_Server_Diagnostics_2025/Common.psm1 is missing from the repository. The scripts in the root of that folder import it and fail. We had to copy the file from Azure_DevOps_Server_2022.

  2. ADO_Server_Diagnostics_2025/Troubleshooting/Utils/Common.psm1 is also missing. The Utils folder in that path contains only Algorithms.ps1, while the 2022 equivalent contains both files. Repair-Search.ps1 cannot start without it.

  3. Analyzers/Test-ElasticsearchHealth.psm1 crashes on Elasticsearch 8. Line 109 throws IndexOutOfRangeException. The aggregation built earlier in the function groups by the _type field, which was removed in Elasticsearch 8, so mappings.buckets comes back empty and $mappings[0] is out of bounds. Azure DevOps Server 25H2 installs Elasticsearch 8.14.1, so this analyzer can never complete on a supported 25H2 deployment.

  4. Analyzers/Test-IndicesHaveUnsupportedMappings.psm1 throws on Elasticsearch 8. Line 78 raises GET _mapping/<type> failed with status code [400] unexpectedly. The _mapping/{type} endpoint was removed in Elasticsearch 8 and now returns HTTP 400 (no handler found for uri) instead of the HTTP 404 the script expects. Suggested fix: treat 400 the same as 404, or skip this analyzer entirely on Elasticsearch 8, since the function's own comment notes there is only one mapping per index in current releases.

    Because analyzers 3 and 4 run in the middle of the sequence, their exceptions abort Repair-Search.ps1 before the remaining analyzers execute. We had to patch both files locally to get a complete run.

  5. Troubleshooting/readme.txt documents parameter names that do not exist. The actual parameters of Repair-Search.ps1 are -SQLServerInstance, -ConfigurationDatabaseName, -CollectionDatabaseName, -CollectionName, -ElasticsearchServiceUrl, -ElasticsearchServiceCredential and -EntityType.

  6. Invoke-Sqlcmd calls fail against SQL Server instances without a trusted TLS certificate. Version 22.x of the SqlServer PowerShell module encrypts connections by default, so every call fails with The certificate chain was issued by an authority that is not trusted. Setting $PSDefaultParameterValues in the caller's session does not help, because the calls are made from inside the module scope. We had to add -TrustServerCertificate to every Invoke-Sqlcmd call in the scripts.

主要语言
PowerShell
星标
57
派生
68
PR 合并指标
30 天内没有已合并 PR

环境准备

这个项目没有提供开发容器、Dockerfile 或贡献指南,环境需要你自己搭建:先看它的 README,通用步骤见我们的新手贡献指南。

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

microsoft/Code-Search 的其他 Issue

查看 microsoft/Code-Search 的全部 Issue

相似的 Issue

更多 Databases Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。