Hacktoberfest 2026: những issue maintainer đã đánh dấu cho tháng Mười, đang mở và phù hợp người mới. Xem issue Hacktoberfest

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

Đang mở
#123 0 bình luận 0 reaction 0 người được giao Xem trên GitHub

Chưa có ai nhận issue này.

Đánh giá

Độ khó
4/5
Thời gian dự kiến
3-5 ngày
Mức phù hợp với người mới
48/100
Loại issue
Lỗi
Độ rõ ràng
Khá rõ ràng
Mức độ hoạt động
Sôi nổi
Công nghệ
elasticsearch, powershell, sql
Lĩnh vực
databases, devops, tooling

Hướng nghiên cứu

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.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

  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.

Ngôn ngữ chính
PowerShell
Star
57
Fork
68
Chỉ số merge pull request
Không có pull request nào được merge trong 30 ngày

Chuẩn bị môi trường

Dự án này không cung cấp dev container, Dockerfile hay hướng dẫn đóng góp, nên bạn cần tự thiết lập môi trường: hãy bắt đầu từ README và xem hướng dẫn đóng góp lần đầu của chúng tôi để biết các bước chung.

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của microsoft/Code-Search

Tất cả issue của microsoft/Code-Search

Issue tương tự

Thêm issue về Databases

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.