Skip to content

Fix prerelease module imports - #428

Merged
Eugene Tolmachev (et1975) merged 1 commit into
mainfrom
copilot/fix-prerelease-module-import
Sep 23, 2026
Merged

Eugene Tolmachev (et1975) merged 1 commit into
mainfrom
copilot/fix-prerelease-module-import

Conversation

@et1975

Copy link
Copy Markdown
Member

Summary

  • import installed prerelease modules through their manifest files instead of version directories
  • apply the fix to both Import-ModulePinned and Import-PSResourceDependencies
  • replace mocked path assertions with real PowerShell import regression coverage

Root cause

PSResourceGet correctly installs prerelease modules in suffix-less version directories such as ModuleName/11.0.262. Passing that directory directly to Import-Module fails because the directory basename is the version, not the module name. CDR now imports ModuleName/11.0.262/ModuleName.psd1.

Fixes the metadata-generation failure observed in ADO build 1377.

Validation

  • 229 non-integration CDR tests passed; 0 failed; 23 integration tests not run
  • regression tests were observed failing before the fix and passing afterward
  • PSScriptAnalyzer: 0 findings on changed lines (30 pre-existing findings elsewhere)
  • git diff --check passed
  • independent code review found no significant issues

Import installed prerelease modules through their manifest files rather than passing version directories to Import-Module. Replace mocked path assertions with real import regression coverage for both CDR import paths.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

Copilot-Session: 6c70a477-596a-450c-be69-4914b1d3e629

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot review overview

🟢 Approval recommended

All reviewed changes are covered by passing regression tests with no unresolved issues.

Review effort: Balanced
Findings: None

What changed in this PR

Fixes prerelease module imports by targeting installed module manifests rather than version directories.

Changes:

  • Resolves prerelease modules through their .psd1 manifests.
  • Applies the fix to both import workflows.
  • Adds real PowerShell import regression coverage.
File Description
tests/​Microsoft.AVS.CDR.Tests.ps1 Adds regression coverage for both prerelease import paths.
Microsoft.AVS.CDR/​Microsoft.AVS.CDR.psm1 Resolves prerelease module manifests before importing.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

@et1975
Eugene Tolmachev (et1975) merged commit e9a82bd into main Sep 23, 2026
10 checks passed
@et1975
Eugene Tolmachev (et1975) deleted the copilot/fix-prerelease-module-import branch September 23, 2026 20:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants