Side findings - Stop-Function without return, a warning that never throws, certificate files on PowerShell 7 and smaller defects in 10 commands
Maintainer thường phản hồi trong vòng 2 ngày
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
- 35/100
Hướng nghiên cứu
The issue lists defects across several commands and names relevant locations, including tests/Get-DbaComputerCertificate.Tests.ps1:28. Start by reading the affected command and its existing tests, then reproduce one defect against development 900ba0347 (v2.9.1). Add a regression test that fails on the old behavior; done means the selected defect is fixed and its test passes.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
Defects found while going through the notes of the last weeks' work. Each one is checked against development 900ba0347 (v2.9.1); the line numbers are from there. None of them is in an open pull request. The plan is one fix per command, with a test that fails on the old code where the defect can be shown.
Defects
- Get-XpDirTreeRestoreFile (private, called by Get-DbaBackupInformation and so by Restore-DbaDatabase), lines 51 and 62-67: three
Stop-Functioncalls withoutreturn. When the instance cannot access the path, the function warns and then runs the directory query against that path anyway. For an S3 path it warns and goes on with$pathSepunset. The twoTest-DbaPathchecks at 62 and 65 are one check twice:$pathand$Pathare the same variable. - Set-DbaPrivilege, lines 389-394: when the remoting check fails, the command only writes a warning.
-EnableExceptionnever throws for it, so a script that relies on the exception carries on as if the privileges had been granted. - Get-DbaComputerCertificate, lines 129-130:
-Pathfails on PowerShell 7.X509Certificate2.Import()is not supported there; the command returns nothing and warns "Issue connecting to computer | X509Certificate is immutable on this platform", which also points to the wrong cause. Reproduced with a .cer file on PowerShell 7.6; Windows PowerShell 5.1 returns the certificate. The integration test skips on PowerShell 7 for this reason (tests/Get-DbaComputerCertificate.Tests.ps1:28). The constructor that takes the bytes works on both. - Copy-DbaRegServer: the only registered server command without
Disconnect-RegServer. It opens the stores of the source and of every destination through Get-DbaRegServerStore (lines 323 and 338) and never closes them; the other nine registered server commands call it since #10577 and #10633. The effect is not measured yet. - Install-DbaFirstResponderKit: since First Responder Kit 8.34 (2026-07-08), sp_Blitz needs sp_ineachdb.
-OnlyScript sp_Blitz.sql, as in the example at line 123, installs a procedure that fails at runtime with "Could not find stored procedure 'dbo.sp_ineachdb'" (seen in our lab on 2026-09-20). The command could add sp_ineachdb.sql when sp_Blitz.sql is selected, or at least the example and the help of-OnlyScriptshould name the dependency.
Smaller ones
- Invoke-DbaAdvancedUpdate, line 153: the debug message counts
$Actions, but the parameter is$Action, so it always reports 0 actions. Lines 231 and 233 write two progress messages directly after each other, so the first one is never readable. - Invoke-DbaDbLogShipping, lines 1109 and 1413:
$host.ui.PromptForChoice($title, ...)with$titlenever set, so the prompt has no caption. - Invoke-DbaDbClone, line 228:
$server.VersionMajor -lt 13 - ($server.VersionMajor -eq 13 -and ...)subtracts the boolean from 13 before comparing. Latent, because the check at line 214 already stops before that for SQL Server 2016 RTM;-lt 13says what is meant. - Get-DbaWaitResource, line 125:
stop-functionin lower case. It works; it is the only call written that way. - Get-OfflineSqlFileStructure (private): no caller anywhere in the module. Remove it?
This text was created by Claude and reviewed by Andreas Jordan.
- Ngôn ngữ chính
- PowerShell
- Star
- 2.9k
- Fork
- 869
- Merge trung bình
- 2 ngày 4 giờ
- Pull request đã merge (30 ngày)
- 38
Chuẩn bị môi trường
Khởi chạy dev container của dự án ngay trên trình duyệt, bằng tài khoản GitHub của bạn.
- Không có Dockerfile hay tệp Docker Compose
- Có mẫu pull request
- Đọc hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- 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.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của dataplat/dbatools
-
bugs life triage required
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 65/100
Maintainer thường phản hồi trong vòng 2 ngày
-
bugs life triage required
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 75/100
Maintainer thường phản hồi trong vòng 2 ngày
-
Invoke-DbaDbPiiScan - Fix broken PII patterns, add Nordic known names, and proposals for metadata-only scan and native classificationCó thể đã có người làm Có pull request liên kết đang mở hoặc đã được merge. Đang mở
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 35/100
Maintainer thường phản hồi trong vòng 2 ngày
-
bugs life triage required
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 48/100
dataplat/dbatools#10860 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 2 ngày
-
bugs life Chrissy needed
Độ khó 3/5 Nửa ngày Mức phù hợp với người mới 38/100
Maintainer thường phản hồi trong vòng 2 ngày
Tất cả issue của dataplat/dbatools
Issue tương tự
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 64/100
Maintainer thường phản hồi trong vòng 1 ngày
-
bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 85/100
Maintainer thường phản hồi trong vòng 1 ngày
-
bug db/postgres user-priority/P1
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 80/100
kagent-dev/kagent#3789 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 74/100
Maintainer thường phản hồi trong vòng 1 ngày