Support trackALAlertsInGitHub for workspace compilation build path - #2331
Open
aholstrup1 wants to merge 1 commit into
Open
Support trackALAlertsInGitHub for workspace compilation build path#2331aholstrup1 wants to merge 1 commit into
aholstrup1 wants to merge 1 commit into
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
Extends GitHub AL alert tracking to workspace compilation.
Changes:
- Adds compiler capability detection and
--errorlogdirectoryforwarding. - Connects alert settings to workspace builds.
- Adds Pester coverage and release notes.
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
Actions/.Modules/CompileFromWorkspace.psm1 |
Adds error-log support and capability probing. |
Actions/CompileApps/Compile.ps1 |
Configures the diagnostics output directory. |
Tests/CompileFromWorkspace.Test.ps1 |
Tests error-log argument construction. |
RELEASENOTES.md |
Announces workspace compilation alert support. |
| ) | ||
|
|
||
| try { | ||
| $compileHelp = & $ALToolPath workspace compile --help 2>&1 | Out-String |
| .OUTPUTS | ||
| Boolean indicating whether the option is supported. | ||
| #> | ||
| function Test-ALToolWorkspaceCompileSupportsOption { |
spetersenms
previously approved these changes
Jul 27, 2026
Thread an ErrorLogDirectory through Build-AppsInWorkspace and CompileAppsInWorkspace so that, when trackALAlertsInGitHub is enabled with workspaceCompilation, altool workspace compile writes per-project *.errorLog.json diagnostics into .buildartifacts/ErrorLogs (the same folder the classic Run-AlPipeline path uses). Defensively probes 'workspace compile --help' and only passes --errorlogdirectory when supported. Adds Pester coverage. AB#641509
aholstrup1
force-pushed
the
aholstrup1-track-al-alerts-workspace-compile
branch
from
July 27, 2026 09:11
9e442bc to
16c5653
Compare
Contributor
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 4 out of 4 changed files in this pull request and generated 1 comment.
Comments suppressed due to low confidence (1)
Actions/.Modules/CompileFromWorkspace.psm1:476
- A failed native executable does not throw solely because it exits nonzero, so this
catchdoes not reliably detect a failed help probe. If the failed invocation emits usage text containing the option, this returnstrueand the subsequent compile can hard-fail instead of taking the promised warning/fallback path. Check$LASTEXITCODEbefore matching the output (or invoke throughRunAndCheck, which already enforces this).
$compileHelp = & $ALToolPath workspace compile --help 2>&1 | Out-String
return ($compileHelp -match [regex]::Escape($Option))
| } | ||
| Mock Copy-CompiledAppsToOutput { return @() } | ||
| # Simulate a compiler that advertises the --errorlogdirectory option in its help | ||
| Mock Test-ALToolWorkspaceCompileSupportsOption { return $true } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
❔What, Why & How
trackALAlertsInGitHubsurfaces AL compiler diagnostics as GitHub code scanning alerts, but it only worked on the classic Run-AlPipeline build path. WhenworkspaceCompilation(preview) was enabled, no*.errorLog.jsonfiles were produced, so no alerts appeared even with the setting turned on.This wires the same behavior into the workspace compilation path. When both
trackALAlertsInGitHubandworkspaceCompilationare enabled, AL-Go passes--errorlogdirectorytoaltool workspace compileso each project emits an*.errorLog.jsondiagnostics file into its.buildartifacts/ErrorLogs/folder. From there the existing upload +ProcessALCodeAnalysisLogspipeline picks them up, converts them to SARIF, and publishes code scanning alerts, matching the classic build behavior.The
--errorlogdirectoryargument is threaded through via aGenerateErrorLogswitch driven by$settings.trackALAlertsInGitHub. If the consumed compiler version does not yet support--errorlogdirectory, the option is skipped and a warning is logged so the rest of the build is unaffected (no silent no-op, no hard failure).✅ Checklist