Skip to content

ci: reset exit codes in idempotent npm/vsce publish checks#7897

Merged
jingjingjia-ms merged 2 commits into
mainfrom
ci/idempotent-release-exitcode-fix
Jul 6, 2026
Merged

ci: reset exit codes in idempotent npm/vsce publish checks#7897
jingjingjia-ms merged 2 commits into
mainfrom
ci/idempotent-release-exitcode-fix

Conversation

@jingjingjia-ms

@jingjingjia-ms jingjingjia-ms commented Jul 4, 2026

Copy link
Copy Markdown
Contributor

Follow-up to #7895. The idempotent npm and vs_marketplace publish checks detected already-published versions correctly, but the trailing native command left $LASTEXITCODE non-zero, failing the step on re-runs (build 225636 failed at npm-check and vs_marketplace for exactly this reason).

Fix: capture and reset the leftover exit code and end both scripts with exit 0. Genuine failures still throw and surface as non-zero exits.

No source/behavioral changes — pipeline YAML only; validated with yaml.safe_load.

The npm-check pwsh step and the vs_marketplace AzureCLI inlineScript
correctly detected already-published versions, but the trailing native
command (npm view E404 / vsce publish 'already exists') left
\0 non-zero, causing the whole step to fail on idempotent
re-runs. Capture and reset the leftover exit code and end both scripts
with 'exit 0'; genuine failures still throw and surface as non-zero.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@jingjingjia-ms jingjingjia-ms requested a review from a team as a code owner July 4, 2026 00:06
@msgraph-bot msgraph-bot Bot added this to Kiota Jul 4, 2026
@github-code-quality

github-code-quality Bot commented Jul 4, 2026

Copy link
Copy Markdown

Code Coverage Overview

Languages: C#

C# / code-coverage/dotnet

The overall coverage in the branch is 72%. Coverage data for the branch is not yet available.

Show a code coverage summary of the most covered files.
File 7fd8337 +/-
/home/runner/wo...guageRefiner.cs 98%
/home/runner/wo...criptRefiner.cs 98%
/home/runner/wo...MethodWriter.cs 97%
/home/runner/wo...MethodWriter.cs 96%
/home/runner/wo...MethodWriter.cs 96%
/home/runner/wo...MethodWriter.cs 95%
/home/runner/wo...rs/GoRefiner.cs 93%
/home/runner/wo...KiotaBuilder.cs 90%
/home/runner/wo...ationService.cs 89%
/home/runner/wo...xGenerator.g.cs 75%

Updated July 06, 2026 16:22 UTC
Code Coverage is in Public Preview. Learn more and provide us with your feedback.

@github-project-automation github-project-automation Bot moved this to In Progress 🚧 in Kiota Jul 4, 2026
@jingjingjia-ms jingjingjia-ms enabled auto-merge (squash) July 6, 2026 16:17
@jingjingjia-ms jingjingjia-ms merged commit 1e8ced5 into main Jul 6, 2026
481 of 483 checks passed
@jingjingjia-ms jingjingjia-ms deleted the ci/idempotent-release-exitcode-fix branch July 6, 2026 16:47
@github-project-automation github-project-automation Bot moved this from In Progress 🚧 to Done ✔️ in Kiota Jul 6, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Done ✔️

Development

Successfully merging this pull request may close these issues.

2 participants