From 4ab859e9564e381f852b7853f01588d4f760f1cf Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Tue, 17 Feb 2026 20:55:44 +0000 Subject: [PATCH 1/2] Initial plan From 472fb314ff0d81f82ab00ab7d23df89c54383769 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Tue, 17 Feb 2026 21:02:46 +0000 Subject: [PATCH 2/2] Fix doc release crash by ensuring logs directory exists for py2docfx Co-authored-by: scbedd <45376673+scbedd@users.noreply.github.com> --- eng/scripts/docs/Docs-Onboarding.ps1 | 30 ++++++++++++++++++++-------- 1 file changed, 22 insertions(+), 8 deletions(-) diff --git a/eng/scripts/docs/Docs-Onboarding.ps1 b/eng/scripts/docs/Docs-Onboarding.ps1 index 70f8a7a68c0a..66b1374deb89 100644 --- a/eng/scripts/docs/Docs-Onboarding.ps1 +++ b/eng/scripts/docs/Docs-Onboarding.ps1 @@ -188,14 +188,28 @@ function Validate-Python-DocMsPackages($PackageInfo, $PackageInfos, $PackageSour -ItemType Directory ` -Path (Join-Path $outputRoot "docsOutput") - # Force the python output to be unbuffered so we see more than just the warnings. - Write-Host "Executing: python -u -m py2docfx --param-file-path $outputJsonFile -o $outputDocsDir" - $pyOutput = python -u -m py2docfx --param-file-path $outputJsonFile -o $outputDocsDir 2>&1 - $pyOutput | ForEach-Object { Write-Host $_ } - Write-Host "`n" - if ($LASTEXITCODE -ne 0) { - LogWarning "py2docfx command failed, see output above." - $allSucceeded = $false + # Create the logs directory in the temp directory. py2docfx expects this directory + # to exist for logging. We'll run py2docfx from the temp directory so it uses this logs dir. + $outputLogsDir = New-Item ` + -ItemType Directory ` + -Path (Join-Path $outputRoot "logs") ` + -Force + + # Change to the temp directory before running py2docfx so it uses the logs directory there + Push-Location $outputRoot + try { + # Force the python output to be unbuffered so we see more than just the warnings. + Write-Host "Executing: python -u -m py2docfx --param-file-path $outputJsonFile -o $outputDocsDir" + $pyOutput = python -u -m py2docfx --param-file-path $outputJsonFile -o $outputDocsDir 2>&1 + $pyOutput | ForEach-Object { Write-Host $_ } + Write-Host "`n" + if ($LASTEXITCODE -ne 0) { + LogWarning "py2docfx command failed, see output above." + $allSucceeded = $false + } + } + finally { + Pop-Location } } }