Make PowerShell tooling dependencies feature-scoped#422
Conversation
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 81f19583be
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: f7a9a5202b
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: a14f986ee4
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: f2d3a8b127
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 8603ede1ca
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 33a49ca8bc
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 4cec9755b8
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 7e65821f67
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: ef0902b57b
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 36856faf50
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 1c67a26347
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 954c0df167
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 2111bf2f64
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 7c77555724
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| if (string.IsNullOrWhiteSpace(docs)) | ||
| docs = Environment.GetFolderPath(Environment.SpecialFolder.UserProfile); | ||
| if (!string.IsNullOrWhiteSpace(docs)) | ||
| return Path.Combine(docs!, "PowerShell", "Modules"); |
There was a problem hiding this comment.
Install Windows PowerShell bootstrap into the 5.1 module path
On Windows hosts where the direct bootstrap runs without a usable user PSModulePath entry and the runner falls back to powershell.exe (the supported PowerShell 5.1 case), this installs PSResourceGet under Documents\PowerShell\Modules, which Windows PowerShell 5.1 does not probe by default (Documents\WindowsPowerShell\Modules is the user path). The direct install can therefore appear to succeed, but the next PowerShellGet/PSResourceGet operation still cannot import the bootstrapped module; choose the destination based on the executable/edition or include the WindowsPowerShell user module path for 5.1.
Useful? React with 👍 / 👎.
| if (skip.Contains(RepositoryToolModuleName) || | ||
| dependencies.Any(static dependency => | ||
| dependency is not null && | ||
| !string.IsNullOrWhiteSpace(dependency.Name) && | ||
| IsRepositoryToolModule(dependency.Name))) |
There was a problem hiding this comment.
Bootstrap PSResourceGet when PowerShellGet is requested
When Invoke-ModuleTestSuite is run on a clean host with AdditionalModules (or manifest dependencies) that include PowerShellGet, this branch suppresses the PSResourceGet bootstrap solely because a repository-tool dependency is present. ModuleDependencyInstaller cannot direct-bootstrap PowerShellGet itself when both repository clients are missing, so the install fails before test dependencies can be fetched; only suppress the bootstrap when PSResourceGet is already requested, or install PSResourceGet before an explicit PowerShellGet dependency.
Useful? React with 👍 / 👎.
| var hasInstallTarget = dependencies.Any(dependency => | ||
| dependency is not null && | ||
| !string.IsNullOrWhiteSpace(dependency.Name) && | ||
| !IsRepositoryToolModule(dependency.Name) && | ||
| !skip.Contains(dependency.Name)); |
There was a problem hiding this comment.
Skip test-suite bootstrap when dependencies are satisfied
On an offline or locked-down host that already has the requested test-suite modules installed but has no repository client, this predicate still returns true just because a non-repository dependency is listed. The previous EnsureInstalled call would mark those modules as satisfied, but the new bootstrap runs first and can fail or mutate the host even though no download is needed; check NeedsInstall/installed metadata before bootstrapping PSResourceGet here.
Useful? React with 👍 / 👎.
| ModuleName = 'Pester' | ||
| ModuleVersion = '5.7.1' | ||
| }) | ||
| RequiredModules = @() |
There was a problem hiding this comment.
Preserve the Pester minimum for standalone test suites
After removing Pester from the manifest, standalone Invoke-ModuleTestSuite and validation test-suite runs no longer inherit the previous Pester >= 5.7.1 requirement; ModuleTestSuiteService adds the default Pester dependency without a minimum version, so a host with an older Pester already installed is treated as satisfied and runs tests under that old engine. The pipeline preflight still uses PesterMinimumVersion, so keep the same minimum in the standalone dependency path before dropping the manifest requirement.
Useful? React with 👍 / 👎.
Summary
Validation