fix: powershell WindmillClient module loading on Windows workers#8370
fix: powershell WindmillClient module loading on Windows workers#8370rubenfiszel merged 1 commit intomainfrom
Conversation
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
|
Claude finished @rubenfiszel's task in 54s —— View job Code Review: PR #8370
Overall: Clean, well-targeted bugfix addressing a regression from 1.650.0. All three changes are correct and the PR description is excellent — clear root cause analysis with the originating commit identified. Fix 1: Regex for indented
|
Deploying windmill with
|
| Latest commit: |
5431fa9
|
| Status: | ✅ Deploy successful! |
| Preview URL: | https://ce626c23.windmill.pages.dev |
| Branch Preview URL: | https://fix-powershell-windmillclien.windmill.pages.dev |
Summary
get_module_versions()previously returned["unknown"]for empty/corrupted module directories, causingcheck_module_installed()to treat them as installed. Now verifies.psd1/.psm1files actually exist in version subdirectories before considering a module cached.RE_POWERSHELL_IMPORTSused^Import-Modulewhich skipped indented imports. Changed to^\s*Import-Module— the old behavior was masked by caching (module only needed to be detected once), but became visible when the cache path changed in 1.650.0.Write-Output $_was merged onto the same line as the closing"of the previousWrite-Outputdue to a Rust line-continuation bug, causing PowerShell to parse$_as an argument rather than a separate command. This is why error output showed the literal textWrite-Outputin the error message.Regression introduced in: 1.650.0 (
424ca59dfe— make WINDMILL_DIR configurable), which moved the Windows PowerShell cache from/tmp/windmill/cache/powershellto{temp_dir}/windmill/cache/powershell. The old cache was abandoned, and the bugs in module detection/regex prevented recovery.Test plan
Import-Module WindmillClientand verify it installs and loads correctlyImport-Module WindmillClient(inside function body or with leading spaces)Write-Outputtext when a script failspowershellcache directory and verify modules are re-downloaded on next run🤖 Generated with Claude Code