Test-DbaLastBackup - Add DbccOutput property with detailed DBCC messages#10239
Test-DbaLastBackup - Add DbccOutput property with detailed DBCC messages#10239andreasjordan wants to merge 4 commits intodevelopmentfrom
Conversation
- Modify Start-DbccCheck to return a structured object with Status and Output properties instead of a bare string. DBCC CHECKDB informational messages (row counts, Service Broker analysis, etc.) are captured via Invoke-DbaQuery -MessagesToOutput and returned in the Output property. - Fix bracket-escaping bug in Start-DbccCheck: database names containing ']' are now escaped to ']]' before being used in the DBCC CHECKDB query. - Update Test-DbaLastBackup to consume the new structured return value and expose the captured messages as a new DbccOutput property on every output object. DbccOutput is $null when DBCC was skipped. Closes #5375 (do Test-DbaLastBackup) Co-authored-by: Andreas Jordan <andreasjordan@users.noreply.github.com>
|
I will wait with the work on this until #10241 is merged to avoid conflicts. |
|
@claude please review this pull request but also review the function in general. |
|
Claude finished @andreasjordan's task in 1m 52s —— View job PR Review: Test-DbaLastBackup - DbccOutput + General Function Review
Overall AssessmentThe feature (exposing DBCC messages) and the bracket-escaping fix are both good ideas. However, there is one critical bug introduced by the PR, plus a few other issues worth addressing. Critical Bug
|
|
@claude have I addressed all issues in my last commit? |
|
Claude finished @andreasjordan's task in 1m 0s —— View job Checking if all issues have been addressed in the last commit...
Verification ResultsYes — all four issues from the previous review have been fixed:
The PR looks good to merge. |
Implements the feature requested in #5375: capture and expose the detailed informational messages from DBCC CHECKDB as a new
DbccOutputproperty on every output object returned byTest-DbaLastBackup.Also fixes a bracket-escaping bug in
Start-DbccCheckwhere database names containing]would cause a SQL syntax error.Closes #5375
Generated with Claude Code
This might need some additional commits: