Restore resilient HtmlAgilityPack.dll resolution in Export-GHEntraFido#723
Restore resilient HtmlAgilityPack.dll resolution in Export-GHEntraFido#723Copilot wants to merge 2 commits into
Export-GHEntraFido#723Conversation
There was a problem hiding this comment.
Copilot wasn't able to review any files in this pull request.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Export-GHEntraFido
|
Request changes The failing merge-fido-data check is still hitting: Failed to fetch data from URL: HtmlAgilityPack.dll not found. Ensure the dependency is installed before running Export-GHEntraFido. From the current PR head, I’m not seeing the fix described in the PR body in Scripts/Export-GHEntraFido.ps1. The script still appears to only search $HOME for HtmlAgilityPack.dll and then throw if nothing is found. I’m not seeing: the PSParseHTML import guard |
|
@copilot PR 722 didn't fix, please review and see why it didn't fix it |
I implemented the requested DLL-resolution logic in commit
Root cause confirmed: the previous fix was not present on PR #722’s head, so CI kept running the old logic. I prepared the correct fix in commit |
…, HOME fallback, remove duplicate fetch/parse Agent-Logs-Url: https://github.com/DevClate/EntraFIDOFinder/sessions/edc726c2-01bc-4607-adee-744f64a0c60f Co-authored-by: DevClate <107187714+DevClate@users.noreply.github.com>
|
No longer needed |
Invoke-WebRequest+LoadHtmlcalls from the originalOriginal prompt
Update pull request #722 in repository
DevClate/EntraFIDOFinderto fix the remaining GitHub Actions failure.Context:
Fix HtmlAgilityPack.dll resolution: scope lookup to PSParseHTML module directorycopilot/fix-gh-actions-job-failure-againat commit77e27a2a08d4ead0be2c9dd6a3b852a1c579a8de.Failed to fetch data from URL: HtmlAgilityPack.dll not found under PSParseHTML module path. Ensure PSParseHTML is installed before running Export-GHEntraFido.Root cause:
Scripts/Export-GHEntraFido.ps1now importsPSParseHTMLand only searches forHtmlAgilityPack.dllunder(Get-Module PSParseHTML).ModuleBase.$HOME, and the smallest safe fix is to keep the targeted module lookup first but add a fallback search under$HOMEbefore throwing.Required change:
Scripts/Export-GHEntraFido.ps1.PSParseHTMLimport guard.HtmlAgilityPack.dllunder the PSParseHTML module path.$HOMEforHtmlAgilityPack.dll.Suggested replacement for the DLL-loading block:
Acceptance criteria:
$HOME.The following is the prior conversation context from the user's chat exploration (may be truncated):
User: Why is this failing now?
Assistant: It’s failing because the PR changed how
HtmlAgilityPack.dllis discovered, and that new lookup is not finding the DLL in CI.Main - MergeMerge-GHFidoDataWhat changed in PR #722:
Scripts/Export-GHEntraFido.ps1was modified to stop searching under$HOMEPSParseHTMLand searches only under the module directory ($module.ModuleBase) forHtmlAgilityPack.dllWhy that breaks now:
PSParseHTMLinstalls successfully, but the DLL apparently is not present where your new code expects it.PSParseHTMLis installed, thenHtmlAgilityPack.dllwill exist underGet-Module PSParseHTML | % ModuleBase”.That’s the immediate root cause.
Supporting evidence:
PSParseHTMLin.github/workflows/GHMerge.yml.Merge-GHFidoData -> Export-GHEntraFido.Scripts/Export-GHEntraFido.ps1.Most likely explanations:
PSParseHTMLno longer shipsHtmlAgilityPack.dllin that path on Ubuntu/PowerShell 7.Get-Module PSParseHTMLresolves to a manifest/module base that does not contain the dependency assembly.Confidence: high on the cause, medium-high on the exact packaging detail.
Suggested fix:
(Get-Module PSParseHTML).ModuleBaseGet-ChildItem -Path $module.ModuleBase -RecurseHtmlAgilityPack.HtmlDocumentis already available$HOME...This pull request was created from Copilot chat.