From a5fadd30b92b83a5a4a1fcfb6e3b397211bfc8dd Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Mon, 11 May 2026 20:58:12 +0000 Subject: [PATCH 1/4] Initial plan From 69bf761c166c879b513bf1092ee3c6190622d6dd Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Mon, 11 May 2026 21:00:06 +0000 Subject: [PATCH 2/4] Fix GetDependencies $mask variable mutation bug The outer foreach loop variable $mask was being reassigned inside the inner foreach loop when prepending the buildMode. This caused incorrect artifact mask names when iterating over multiple dependencies with different build modes. Introduced a local $currentMask variable to preserve the original $mask value across inner loop iterations. Agent-Logs-Url: https://github.com/microsoft/AL-Go/sessions/57de4c0d-e2ce-40ca-9c16-0cd1503b3c8f Co-authored-by: mazhelez <43066499+mazhelez@users.noreply.github.com> --- Actions/Github-Helper.psm1 | 24 +++++++++++++----------- 1 file changed, 13 insertions(+), 11 deletions(-) diff --git a/Actions/Github-Helper.psm1 b/Actions/Github-Helper.psm1 index 5a806673c..d56415cff 100644 --- a/Actions/Github-Helper.psm1 +++ b/Actions/Github-Helper.psm1 @@ -141,6 +141,8 @@ function GetDependencies { $projects = $dependency.projects $buildMode = $dependency.buildMode + # Use local copies to avoid mutating the outer loop variable + $currentMask = $mask if ($mask -eq 'TestApps') { $altMask = 'Apps' } @@ -149,11 +151,11 @@ function GetDependencies { } # change the mask to include the build mode if($buildMode -ne "Default") { - $mask = "$buildMode$mask" + $currentMask = "$buildMode$currentMask" $altMask = "$buildMode$altMask" } - Write-Host "Locating $mask artifacts for projects: $projects" + Write-Host "Locating $currentMask artifacts for projects: $projects" if ($dependency.release_status -eq "thisBuild") { $missingProjects = @() @@ -161,12 +163,12 @@ function GetDependencies { $branchName = $dependency.branch.Replace('\', '_').Replace('/', '_') $project = $project.Replace('\','_').Replace('/','_') # sanitize project name - $downloadName = Join-Path $saveToPath "$project-$branchName-$mask-*" + $downloadName = Join-Path $saveToPath "$project-$branchName-$currentMask-*" if (Test-Path $downloadName -PathType Container) { $folder = Get-Item $downloadName Get-ChildItem -Path $folder | ForEach-Object { - if ($mask -like '*TestApps') { + if ($currentMask -like '*TestApps') { $downloadedList += @("($($_.FullName))") } else { @@ -175,7 +177,7 @@ function GetDependencies { Write-Host "$($_.FullName) found from previous job" } } - elseif ($mask -like '*Apps') { + elseif ($currentMask -like '*Apps') { # Check whether Apps/TestApps exists before determining that project isn't built $altDownloadName = Join-Path $saveToPath "$project-$branchName-$altMask-*" if (!(Test-Path $altDownloadName -PathType Container)) { @@ -183,7 +185,7 @@ function GetDependencies { $missingProjects += @($project) } else { - Write-Host "$project built, but $mask not found" + Write-Host "$project built, but $currentMask not found" } } } @@ -197,12 +199,12 @@ function GetDependencies { $repository = ([uri]$dependency.repo).AbsolutePath.Replace(".git", "").TrimStart("/").TrimEnd("/") if ($dependency.release_status -eq "latestBuild") { $token = GetAccessToken -token $dependency.authTokenSecret -repository $repository -permissions @{"contents"="read";"actions"="read";"metadata"="read"} - $artifacts = GetArtifacts -token $token -api_url $api_url -repository $repository -mask $mask -projects $projects -version $dependency.version -branch $dependency.branch -baselineWorkflowID $dependency.baselineWorkflowID + $artifacts = GetArtifacts -token $token -api_url $api_url -repository $repository -mask $currentMask -projects $projects -version $dependency.version -branch $dependency.branch -baselineWorkflowID $dependency.baselineWorkflowID if ($artifacts) { $artifacts | ForEach-Object { $download = DownloadArtifact -path $saveToPath -token $token -artifact $_ if ($download) { - if ($mask -like '*TestApps') { + if ($currentMask -like '*TestApps') { $downloadedList += @("($download)") } else { @@ -215,7 +217,7 @@ function GetDependencies { } } else { - Write-Host -ForegroundColor Red "Could not find any $mask artifacts for projects $projects, version $($dependency.version)" + Write-Host -ForegroundColor Red "Could not find any $currentMask artifacts for projects $projects, version $($dependency.version)" } } elseif ($dependency.release_status -ne "thisBuild" -and $dependency.release_status -ne "include") { @@ -236,9 +238,9 @@ function GetDependencies { throw "Could not find a release that matches the criteria." } - $download = DownloadRelease -token $token -projects $projects -api_url $api_url -repository $repository -path $saveToPath -release $release -mask $mask + $download = DownloadRelease -token $token -projects $projects -api_url $api_url -repository $repository -path $saveToPath -release $release -mask $currentMask if ($download) { - if ($mask -like '*TestApps') { + if ($currentMask -like '*TestApps') { $downloadedList += @("($download)") } else { From a4cb1a255cbbcec4ab1cbce7376a9ff563a38f50 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Mon, 11 May 2026 21:06:49 +0000 Subject: [PATCH 3/4] Add release notes for GetDependencies $mask fix Agent-Logs-Url: https://github.com/microsoft/AL-Go/sessions/36cbe5be-4091-488a-af40-a744e4c0694a Co-authored-by: mazhelez <43066499+mazhelez@users.noreply.github.com> --- RELEASENOTES.md | 1 + 1 file changed, 1 insertion(+) diff --git a/RELEASENOTES.md b/RELEASENOTES.md index 7e98ef896..f88941bb5 100644 --- a/RELEASENOTES.md +++ b/RELEASENOTES.md @@ -21,6 +21,7 @@ The `DownloadProjectDependencies` action now downloads only artifacts from depen ### Issues +- Fix `GetDependencies` so that the `buildMode` prefix no longer leaks across dependency iterations, which caused incorrect artifact mask names when multiple `appDependencyProbingPaths` entries used different build modes. - Incremental builds (`modifiedApps` mode) now correctly identify unmodified apps for projects whose `appFolders` reference paths outside the project directory (e.g. using `../`) - Issue 2204 - Workspace compilation ignores vsixFile setting - Issue 2211 - Cannot create a release if a project contains only test apps From dffa6a0c7eea0b51ca9215eea89cf14e36aa3130 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Mon, 11 May 2026 21:11:47 +0000 Subject: [PATCH 4/4] Update release notes to follow issue number pattern (Issue 2236) Agent-Logs-Url: https://github.com/microsoft/AL-Go/sessions/4f3c6851-daf2-47cc-87de-59971993664f Co-authored-by: mazhelez <43066499+mazhelez@users.noreply.github.com> --- RELEASENOTES.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/RELEASENOTES.md b/RELEASENOTES.md index f88941bb5..bcdf0360b 100644 --- a/RELEASENOTES.md +++ b/RELEASENOTES.md @@ -21,7 +21,7 @@ The `DownloadProjectDependencies` action now downloads only artifacts from depen ### Issues -- Fix `GetDependencies` so that the `buildMode` prefix no longer leaks across dependency iterations, which caused incorrect artifact mask names when multiple `appDependencyProbingPaths` entries used different build modes. +- Issue 2236 - `GetDependencies` `buildMode` prefix leaks across dependency iterations, causing incorrect artifact mask names when multiple `appDependencyProbingPaths` entries use different build modes - Incremental builds (`modifiedApps` mode) now correctly identify unmodified apps for projects whose `appFolders` reference paths outside the project directory (e.g. using `../`) - Issue 2204 - Workspace compilation ignores vsixFile setting - Issue 2211 - Cannot create a release if a project contains only test apps