Skip to content

Fail the build when a template fails to build - #524

Open
danielchalmers wants to merge 1 commit into
devfrom
fix/template-build-failures-are-fatal
Open

Fail the build when a template fails to build#524
danielchalmers wants to merge 1 commit into
devfrom
fix/template-build-failures-are-fatal

Conversation

@danielchalmers

@danielchalmers danielchalmers commented Jul 27, 2026

Copy link
Copy Markdown
Member

InstallAndBuildAllTemplates.ps1 runs 52 dotnet commands and never checks an exit code between them. A non-zero exit from a native command is not a PowerShell error, so $ErrorActionPreference does not catch it, and the step's exit code is whatever the last command returned.

If InteractivityServer_Auth breaks at permutation 5 of 26, WasmStandalone_CallsWebApi succeeding at the end still turns the job green.

The last 30 mudblazor-ci runs are 30/30 success. For a workflow that compiles 26 generated projects with /warnaserror against a moving MudBlazor dependency, that record is more suspicious than reassuring.

InstallAndBuildAllTemplates.ps1 runs 52 dotnet commands and never checks an
exit code between them. A non-zero exit from a native command is not a
PowerShell error, so the script runs to the end regardless, and the step
reports the exit code of the last build only.

A template breaking anywhere except the final permutation therefore leaves
mudblazor-ci green. The last 30 runs have all passed.

Setting ErrorActionPreference and PSNativeCommandUseErrorActionPreference
makes the first failing dotnet command terminate the script.
@danielchalmers

danielchalmers commented Jul 27, 2026

Copy link
Copy Markdown
Member Author

Holding this until the SQLitePCLRaw advisory is resolved upstream.

#525 proposed pinning the package in the template; that was closed in favour of waiting for EF Core, since the pin would become stale as soon as upstream moves.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant