diff --git a/Actions/WorkflowPostProcess/README.md b/Actions/WorkflowPostProcess/README.md index 23e91cd3cf..6c9a0161f6 100644 --- a/Actions/WorkflowPostProcess/README.md +++ b/Actions/WorkflowPostProcess/README.md @@ -1,6 +1,8 @@ # PostProcess action -Finalize a workflow +Finalize a workflow by recording telemetry about its conclusion, duration, and AL-Go configuration. + +This action is telemetry-only. Failures are visible in the logs but do not fail the workflow. Actual build and test failures are still enforced by the workflow's status checks. ## INPUT diff --git a/Actions/WorkflowPostProcess/action.yaml b/Actions/WorkflowPostProcess/action.yaml index 34451f012d..f84d022f3c 100644 --- a/Actions/WorkflowPostProcess/action.yaml +++ b/Actions/WorkflowPostProcess/action.yaml @@ -26,6 +26,7 @@ runs: steps: - name: run shell: ${{ inputs.shell }} + continue-on-error: true env: _telemetryScopeJson: ${{ inputs.telemetryScopeJson }} _currentJobContext: ${{ inputs.currentJobContext }} diff --git a/RELEASENOTES.md b/RELEASENOTES.md index b6e473b2bd..c4417fda5f 100644 --- a/RELEASENOTES.md +++ b/RELEASENOTES.md @@ -21,6 +21,7 @@ To retain the previous behavior, set `cacheImageName` to an empty string in .AL- ### Issues +- Workflow finalization telemetry failures, including GitHub API errors, no longer fail an otherwise successful workflow. - Issue 2358 - Update AL-Go System Files no longer creates a commit or pull request when only the template SHA would change, avoiding unnecessary CI/CD runs. - Issue 2370 - Retry CI/CD baseline discovery when no eligible run is returned, logging result counts for diagnostics and URL-encoding query values so discovery URLs render correctly in logs. The existing full-build fallback is preserved when no baseline is found after retries. - Issue 2113 - Fix device-login initialization in Create Online Dev. Environment and Publish To Environment when authentication secrets are unavailable. diff --git a/Tests/TestActionsHelper.psm1 b/Tests/TestActionsHelper.psm1 index cab015702b..41e70a97d8 100644 --- a/Tests/TestActionsHelper.psm1 +++ b/Tests/TestActionsHelper.psm1 @@ -47,13 +47,16 @@ function GetActionScript { <# .SYNOPSIS Test the yaml structure of an action +.PARAMETER ContinueOnError +Require the action's run step to be non-blocking. #> function YamlTest { Param( [string] $scriptRoot, [string] $actionName, [string] $actionScript, - $outputs = @{} + $outputs = @{}, + [switch] $ContinueOnError ) $emptyActionScript = "function emptyAction {`n[CmdletBinding()]`nParam()`n}`n" @@ -126,6 +129,9 @@ function YamlTest { $yaml.AppendLine(" steps:") | Out-Null $yaml.AppendLine(" - name: run") | Out-Null $yaml.AppendLine(' shell: ${{ inputs.shell }}') | Out-Null + if ($ContinueOnError) { + $yaml.AppendLine(" continue-on-error: true") | Out-Null + } if ($outputs -and $outputs.Count -gt 0) { $yaml.AppendLine(" id: $($actionname.ToLowerInvariant())") | Out-Null } diff --git a/Tests/WorkflowPostProcess.Test.ps1 b/Tests/WorkflowPostProcess.Test.ps1 index 36fea65a29..cb0f3b25b3 100644 --- a/Tests/WorkflowPostProcess.Test.ps1 +++ b/Tests/WorkflowPostProcess.Test.ps1 @@ -18,10 +18,10 @@ Describe "WorkflowPostProcess Action Tests" { Invoke-Expression $actionScript } - It 'Test action.yaml matches script' { + It 'Test action.yaml matches script and telemetry failures are non-blocking' { $outputs = [ordered]@{ } - YamlTest -scriptRoot $scriptRoot -actionName $actionName -actionScript $actionScript -outputs $outputs + YamlTest -scriptRoot $scriptRoot -actionName $actionName -actionScript $actionScript -outputs $outputs -ContinueOnError } # Call action