Repository navigation
[ci] Fix empty conditional block breaking internal pipeline YAML - #37686
Merged
Merged
Conversation
PR #37589 removed `- group: Publish-Build-Assets`, which was the only child of the `${{ if eq(variables['Build.DefinitionName'], 'dotnet-maui') }}` conditional, but left the now-empty conditional header behind. Azure DevOps requires a conditional insertion block to contain at least one entry, so the internal `dotnet-maui` pipeline fails to compile the pipeline YAML before running any stage: /eng/pipelines/common/variables.yml (Line: 81, Col: 7): Expected at least one key-value pair in the mapping The public `maui-pr` definition is unaffected because the outer guard only matches the `dotnet-maui` / `dotnet-maui-build` definition names, so the block is never expanded there. That is why PR validation stayed green while the official build was broken. No other file references the `Publish-Build-Assets` variable group, so the conditional is removed entirely rather than repopulated. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
rmarinho
temporarily deployed
to
copilot-pat-pool
August 20, 2026 17:10 — with
GitHub Actions
Inactive
Contributor
|
🚀 Dogfood this PR with:
curl -fsSL https://raw.githubusercontent.com/dotnet/maui/main/eng/scripts/get-maui-pr.sh | bash -s -- 37686Or
iex "& { $(irm https://raw.githubusercontent.com/dotnet/maui/main/eng/scripts/get-maui-pr.ps1) } 37686" |
rmarinho
temporarily deployed
to
copilot-pat-pool
August 20, 2026 17:10 — with
GitHub Actions
Inactive
|
Azure Pipelines: Successfully started running 1 pipeline(s). There may be pipelines that require an authorized user to comment /azp run to run. |
rmarinho
temporarily deployed
to
copilot-pat-pool
August 20, 2026 17:11 — with
GitHub Actions
Inactive
rmarinho
temporarily deployed
to
copilot-pat-pool
August 20, 2026 17:13 — with
GitHub Actions
Inactive
rmarinho
temporarily deployed
to
copilot-pat-pool
August 20, 2026 17:14 — with
GitHub Actions
Inactive
rmarinho
temporarily deployed
to
copilot-pat-pool
August 20, 2026 17:14 — with
GitHub Actions
Inactive
Contributor
There was a problem hiding this comment.
Pull request overview
This PR fixes a YAML template compilation failure in the internal dotnet-maui official Azure DevOps pipeline by removing an empty conditional insertion block in the shared variables template.
Changes:
- Removes an empty
${{ if ... }}conditional entry that had no children, which Azure DevOps rejects during template expansion.
kubaflo
approved these changes
Aug 20, 2026
This branch was previously deployed
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 subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
Note
Are you waiting for the changes in this PR to be merged?
It would be very helpful if you could test the resulting artifacts from this PR and let us know in a comment if this change resolves your issue. Thank you!
Problem
The internal
dotnet-mauiofficial build currently fails to compile the pipeline YAML, before any stage runs:Cause
#37589 removed
- group: Publish-Build-Assets, but that group was the only child of the conditional that enclosed it, leaving an empty block behind:Azure DevOps requires a conditional insertion block to contain at least one entry, so template expansion fails outright.
Why PR validation stayed green
The empty block is nested inside an outer guard:
For the public
maui-prdefinition that outer condition is false, so Azure DevOps short-circuits and never expands the inner block. The breakage is therefore invisible to PR CI and only manifests on the internal official build.Fix
Remove the empty conditional. No file in the repository references the
Publish-Build-Assetsvariable group any more, so it is deleted outright rather than repopulated.Validation
eng/pipelines/common/variables.ymlparses as valid YAML.eng/pipelines/for conditional blocks with no body — this was the only one.grepforPublish-Build-Assetsacrosseng/and.github/returns no remaining references.This blocks the internal build entirely, so it is worth merging ahead of larger infra work such as #36257 (which carries the same one-line fix, but cannot be validated on the internal pipeline until this is on
main).