Skip to content

Fix conditional insertion syntax in kiota generation template#1443

Merged
jingjingjia-ms merged 1 commit into
mainfrom
jingjingjia-ms/fix-kiota-conditional-checkout
Jun 30, 2026
Merged

Fix conditional insertion syntax in kiota generation template#1443
jingjingjia-ms merged 1 commit into
mainfrom
jingjingjia-ms/fix-kiota-conditional-checkout

Conversation

@jingjingjia-ms

@jingjingjia-ms jingjingjia-ms commented Jun 30, 2026

Copy link
Copy Markdown
Contributor

Problem

Running .azure-pipelines/generation-pipeline.yml failed with:

The 'stages' parameter is not a valid StageList. language-generation-kiota.yml (Line: 73): A template expression is not allowed in this context language-generation-kiota.yml (Line: 81): While parsing a block mapping, did not find expected key.

Cause

The ${{ if ... }}: conditional-insertion blocks live inside the steps: sequence, but were written as bare mapping keys without a leading - . In Azure Pipelines, a conditional insertion into a sequence must itself be a sequence item.

Fix

Added the leading - to the four conditional blocks (checkout, anonymous clone, App-auth Key Vault, default-path Key Vault).

Microsoft Reviewers: Open in CodeFlow

The "${{ if ... }}:" conditional-insertion blocks in the steps sequence
were missing the leading "- ", causing YAML parsing errors (template
expression not allowed in this context / did not find expected key) when
running generation-pipeline.yml.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@jingjingjia-ms jingjingjia-ms requested a review from a team as a code owner June 30, 2026 17:11
@jingjingjia-ms jingjingjia-ms merged commit 759a199 into main Jun 30, 2026
5 checks passed
@jingjingjia-ms jingjingjia-ms deleted the jingjingjia-ms/fix-kiota-conditional-checkout branch June 30, 2026 18:21
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.

3 participants