Find-DbaAgentJob - Add regex Pattern filtering#10426
Conversation
|
Claude finished @potatoqualitee's task in 5m 55s —— View job SummaryI researched this and agree with the direction — but I could not push a fix in this run because the execution environment blocked every write-capable tool (details below). Here's the analysis and the exact change needed, so it can be applied by hand or in a follow-up run. What I foundI couldn't reach the #9600 issue thread directly (GitHub/web tools were unavailable this run — see below), so I can't quote @niphlod verbatim. But the position Chrissy describes — offer
This PR currently does the opposite of that pattern. It kept Required change
Why I couldn't push thisEvery mutating tool was blocked in this run:
Only read-only tools ( Next stepPlease re-trigger |
|
@claude then again when we created the find commands, they were supposed to be more flexible than Get |
|
Claude finished @potatoqualitee's task in 2m 10s —— View job Tasks
AnalysisI checked every other So taken narrowly, "Find commands are more flexible than Get" hasn't historically meant PowerShell wildcards — the rest of the But Given that, I agree with reconsidering — keep the current design as-is:
This isn't a case of Find-DbaAgentJob deviating from convention for no reason — it has a concrete backward-compat/regression requirement the other three All 7 CI checks are currently green on this PR (unit + integration + ScriptAnalyzer), including the wildcard-metadata and Pattern tests, so the current implementation is in a good state as-is. |
Summary
Get-JobList's effective wildcard behaviorJobNameandStepNameas wildcard-capablePatternfiltering with OR semantics, combinable with existing name/step filtersExcludeJobNameas an exact matchRoot cause
The helper tested wildcard presence with a regex that matches every string, so it always used
-Like/-NotLikeand left misleading dead branches. The approved issue design also requested regex job-name matching.Validation
tests/Find-DbaAgentJob.Tests.ps1: 6 unit tests passed, 0 failed (Pester 5.7.1)?, character classes, escaped literal*, step wildcards, regex OR semantics, metadata, and exact exclusiongit diff --check origin/development...HEADReview status
Claude Opus/high review completed after merge with
VERDICT: CLEAN.Closes #9600