KEMBAR78
Fix: enforce non-empty asset list when publishing by mohiuddin-khan-shiam · Pull Request #13201 · microsoft/WSL · GitHub
Skip to content

Conversation

@mohiuddin-khan-shiam
Copy link
Contributor

This patch closes a logic gap in tools/devops/create-release.py:

  • Problem – The script’s --publish mode was intended to require at least one asset, but Click passes an empty tuple if no assets are provided. The original guard (if assets is None) never triggered, allowing empty releases to be drafted.
  • Solution – Replace the check with if not assets: which catches both None and empty collections, preventing accidental empty releases.
  • Impact – Ensures CI and manual runs cannot publish a release without payload, aligning behavior with the CLI contract and avoiding junk tags that require manual cleanup.

odiomarcelino and others added 2 commits June 29, 2025 18:26
This patch closes a logic gap in [tools/devops/create-release.py](cci:7://file:///c:/Users/T2430514/Downloads/WSL/tools/devops/create-release.py:0:0-0:0):

* **Problem** – The script’s `--publish` mode was intended to require at least one asset, but Click passes an empty tuple if no assets are provided. The original guard (`if assets is None`) never triggered, allowing empty releases to be drafted.
* **Solution** – Replace the check with `if not assets:` which catches both `None` and empty collections, preventing accidental empty releases.
* **Impact** – Ensures CI and manual runs cannot publish a release without payload, aligning behavior with the CLI contract and avoiding junk tags that require manual cleanup.

Co-Authored-By: S. M. Mohiuddin Khan Shiam <147746955+mohiuddin-khan-shiam@users.noreply.github.com>
This patch closes a logic gap in [tools/devops/create-release.py](cci:7://file:///c:/Users/T2430514/Downloads/WSL/tools/devops/create-release.py:0:0-0:0):

* **Problem** – The script’s `--publish` mode was intended to require at least one asset, but Click passes an empty tuple if no assets are provided. The original guard (`if assets is None`) never triggered, allowing empty releases to be drafted.
* **Solution** – Replace the check with `if not assets:` which catches both `None` and empty collections, preventing accidental empty releases.
* **Impact** – Ensures CI and manual runs cannot publish a release without payload, aligning behavior with the CLI contract and avoiding junk tags that require manual cleanup.
@OneBlue OneBlue merged commit 41f97bb into microsoft:master Jul 24, 2025
1 check passed
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.

4 participants