Bug fixes for running a large/complicated solution on AL-Go#2075
Bug fixes for running a large/complicated solution on AL-Go#2075freddydk wants to merge 92 commits intomicrosoft:mainfrom
Conversation
|
@microsoft-github-policy-service agree |
|
@microsoft-github-policy-service agree |
mazhelez
left a comment
There was a problem hiding this comment.
Looks good. Just the release notes need to be adjusted.
|
|
||
| Now, the workflow will fail with a clear error message if the specified environment doesn't exist. If you intentionally want to deploy to a new environment that hasn't been configured yet, you can check the **Create environment if it does not exist** checkbox when running the workflow. | ||
|
|
||
| ### New Settings |
There was a problem hiding this comment.
This part needs to be moved above ## v8.3
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 11 out of 11 changed files in this pull request and generated 2 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| # Pattern 2: project-mask-version.zip (no branch) | ||
| $escapedProject = [regex]::Escape($project) | ||
| $escapedMask = [regex]::Escape($mask) | ||
| $assetPattern1 = "^$escapedProject-[^-]+-$escapedMask-.+\.zip$" |
There was a problem hiding this comment.
The release asset regex ^<project>-[^-]+-<mask>-... assumes the branch segment cannot contain hyphens. Branch names commonly contain - (and artifact naming elsewhere preserves hyphens), so this can prevent matching valid release assets (e.g., feature-test). Suggest loosening the branch part to allow hyphens (e.g., match on -$escapedMask- as the delimiter) rather than restricting it to [^-]+.
| $assetPattern1 = "^$escapedProject-[^-]+-$escapedMask-.+\.zip$" | |
| $assetPattern1 = "^$escapedProject-.+-$escapedMask-.+\.zip$" |
| Remove-Bccontainer $containerName | ||
| } | ||
| catch { | ||
| Write-Host "Pipeline Cleanup failed: $($_.Exception.Message)" |
There was a problem hiding this comment.
The catch block logs cleanup failures with plain Write-Host, which won’t surface as a GitHub Actions warning/notice. To keep the workflow non-fatal but still visible, consider emitting a workflow warning/notice format (e.g., ::Warning::... / ::Notice::...) consistent with OutputWarning in Actions/.Modules/DebugLogHelper.psm1 (writes ::Warning::...).
| Write-Host "Pipeline Cleanup failed: $($_.Exception.Message)" | |
| Write-Host "::Warning::Pipeline Cleanup failed: $($_.Exception.Message)" |
❔What, Why & How
This PR fixes a few minor bugs and 3 major, all changes required for moving Bunker Holding Group to AL-Go for GitHub
[Bug] Fix a small spelling mistake in DownloadProjectDependencies.Action.ps1
[Bug] Avoid failing entire workflows due to cleanup issues (f.ex. if no Container is used) in PipelineCleanup.ps1
Fixes #2086 - In AL-Go-Helper.ps1
The sort order is changed from this:

to this:

Which completes in 2:01, saving 45 minutes from the first run, just by re-ordering and allowing people to see compile errors up-front - fail early!
The key difference here is just the order in which projects are built/tested. In the first run, build3 had to wait 30 minutes until the test run was done before building the next jobs, and 1 hour and 44 until the last build jobs would run.
In the second run - all test jobs are running in parallel at the very end, getting compile errors quicly and postponing test runs until the very last.
Subsequently, when using GitHub hosted Custom runners, we can achieve this:

Note that the custom runners are running tests in 40 minutes, where the GitHub hosted runners takes 104 minutes. This is because the GitHub hosted custom runners are using SQL Server Developer edition and no docker.
Saving a full 2 hours, bringing a complete build from 2 hours 46 minutes down to 46 minutes.
Fixes #2085 - In GetDependencies in GitHub-Helper.ps1
When downloading artifacts from projects build earlier in the same workflow, it flags projects as missing if either Apps or TestApps are missing. This means that projects, which only contains TestApps or Apps will be downloaded but also looked for in the last known good build later on. It doesn't fail, because it cannot find the artifacts in that built either.
See https://github.com/Freddy-DK/DependenciesProblems/actions/runs/21079606240/job/60630194330
Fixes #2084 in GetArtifactsFromWorkflowRun in GitHub-Helper.ps1
If a build is cancelled during tests or failing due to instability - and you subsequently re-run failed jobs (not all jobs) you will get multiple artifacts for succeeding projects and subsequent jobs cannot locate these artifacts (they get an array of artifacts). The "double" artifacts are not visible in the UI, but found when artifacts are queried. You could see this as a bug in GitHub, but we should fix this in AL-Go in a way that works, even if GitHub fixes their bug.
This build: https://github.com/Freddy-DK/DependenciesProblems/actions/runs/21090442931
Has double artifacts: https://api.github.com/repos/Freddy-DK/DependenciesProblems/actions/runs/21090442931/artifacts
When than downloading artifacts from prior builds for incremental builds, it fails with
See: https://github.com/Freddy-DK/DependenciesProblems/actions/runs/21090506962/job/60661024240
✅ Checklist