Pass pester_verbosity through to Invoke-Maester so the input takes effect - #49
Open
kongkratos wants to merge 1 commit into
Open
Pass pester_verbosity through to Invoke-Maester so the input takes effect#49kongkratos wants to merge 1 commit into
kongkratos wants to merge 1 commit into
Conversation
The pester_verbosity input was a no-op. The script set Output.Verbosity on a PesterConfiguration object but never passed -Verbosity, so Invoke-Maester's GetPesterConfiguration overwrote it with its own default of 'None'. Fixes maester365#48
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (1)
📝 WalkthroughWalkthroughThe action now passes the configured ChangesPester verbosity
Estimated code review effort: 1 (Trivial) | ~2 minutes Suggested reviewers: 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #48
The
pester_verbosityinput is currently a no-op. Setting it toDetailedproduces no Pester output at all, while still loggingPester verbosity level set to: Detailed, so it looks like it was applied.Cause
The script configures a
PesterConfigurationobject and passes it toInvoke-Maester, but never passes-Verbosity:Invoke-Maester->GetPesterConfiguration(Maester 2.2.0) then overwrites the value unconditionally:Since the action never binds
-Verbosity, the configured level is replaced withNoneon every run.Change
Adds
Verbosity = $PesterVerbosityto the parameter hashtable so the value survives.Verification
Reproduced the interaction against real Pester 5.7.1 types, mirroring
GetPesterConfiguration:Notes
-Verbosityis an existingInvoke-Maesterparameter with the same validated set (None,Normal,Detailed,Diagnostic) as the action input, so it passes the script's existing version-compatibility guard that strips unsupported parameters.None, which is alsoInvoke-Maester's default, so runs that do not setpester_verbosityare unaffected.Start test executionand completion, so there is no way to tell a slow run from a hung one.As noted in #48, it may also be worth changing Maester itself so
GetPesterConfigurationonly overridesOutput.Verbositywhen the caller explicitly bound-Verbosity, so an explicitly supplied-PesterConfigurationis not silently overwritten. That is a separate change in the module repo and is not needed for this fix.Summary by CodeRabbit