stride3d / stride3d/stride

NuGet upload loop can report success after an earlier package push fails

Open Beginner friendly
#3,416 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
C#
Stars
7.8k
Forks
1.2k
Avg merge
2d 17h
Merged PRs (30d)
49

Description

Release Type: GitHub release automation

Version: master at 1714e21ce4f8706e38100896a3f017ac29ba5026

Platform: PowerShell release step; isolated reproduction with PowerShell 7.6.5 on macOS, using a stub publisher and no registry access.

Describe the bug

In release-deploy.yml, Push NuGet packages, each loop invokes dotnet nuget push without checking its exit status. With the default $PSNativeCommandUseErrorActionPreference = $false, an earlier failed upload can be overwritten by a later successful native command. The step then exits zero and the subsequent tag/release steps can proceed.

To reproduce

  1. Extract the existing Push NuGet packages run block into a temporary .ps1 file.
  2. Create empty fixture files under bin/packages: Stride.Core.4.4.0-beta6.nupkg, Stride.Engine.4.4.0-beta6.nupkg, and Stride.GameStudio.4.4.0-beta6.nupkg.
  3. Put a native executable named dotnet first on PATH that returns exit 1 for the Core filename and exit 0 for the others. Do not use a real publisher.
  4. Execute with GitHub's documented PowerShell wrapper: prepend $ErrorActionPreference = 'stop', append if ((Test-Path -LiteralPath variable:\LASTEXITCODE)) { exit $LASTEXITCODE }.

Observed: the simulated Core upload failed; Engine and GameStudio continued; the script exited 0. Adding an immediate $LASTEXITCODE check after each push made the same fixture exit 1.

Expected behavior

An upload failure must make the step fail, even if independent uploads continue. Check every push and either stop immediately or collect failures and exit nonzero at the end. GameStudio should not publish when required providers failed. --skip-duplicate is useful recovery behavior and should remain where intended.

Additional context

This is an isolated reproduction of the checked-in loop, not a claim that an official release currently has missing packages. GitHub's shell documentation explains the last-exit-code wrapper.

Disclosure: I maintain dispat and found this while reviewing release failure propagation. The fix belongs in the existing workflow.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start in .github/workflows/release-deploy.yml, in the Push NuGet packages run block at lines 128-175, and inspect how each dotnet nuget push result is handled. Reproduce with the listed bin/packages fixtures and stub dotnet executable, then verify that a failed provider upload makes the step nonzero and prevents GameStudio publication while preserving intended --skip-duplicate behavior.

Written by the indexing model from the issue text.

Assessment

Tech stack
csharp, github-actions, powershell
Domain
ci-cd, release
Issue type
Bug
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Active
Clarity
Clearly specified
Newbie friendliness
88/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.