Skip to content

Update release sdk to net10, and promote "unshipped" APIs for release - #569

Merged
mgravell merged 2 commits into
masterfrom
marc/nuget-release-sdk10
Sep 18, 2026
Merged

mgravell merged 2 commits into
masterfrom
marc/nuget-release-sdk10

Conversation

@mgravell

@mgravell mgravell commented Sep 18, 2026

Copy link
Copy Markdown
Collaborator
  • Update the build SDK used in release to match the main build (net10, LTS)
  • Add a sort/promote script to manage the API ship-files
  • Run that script to promote for 1.8.0, eating a 1-off sort delta

Note

Low Risk
Changes are limited to release CI SDK version and offline public-API file maintenance; no product runtime or auth/data paths are touched.

Overview
Aligns the NuGet release GitHub workflow with the main build by switching setup-dotnet from .NET 9 to .NET 10.

Adds eng/public-api.py, a release/engineering helper for PublicApiAnalyzers PublicAPI.Shipped.txt / PublicAPI.Unshipped.txt under src: it sorts entries in place (stable ordering that strips modifier prefixes for grouping), optionally --promote moves all unshipped lines into shipped and clears unshipped, and --check fails CI-style if files would need sorting. The existing release job still blocks publish when unshipped API lines remain; this script is the intended way to sort and promote around ship time (per PR notes), but the workflow diff shown does not yet invoke it.

Reviewed by Cursor Bugbot for commit c73cc81. Bugbot is set up for automated code reviews on this repo. Configure here.

9 no longer matches global.json's 10.0.101 floor; the pack/push was only working because the runner happens to have a .NET 10 SDK preinstalled already.
Ported from marc's StackExchange.Redis PR #3245: sorts the PublicAPI
tracking files and, with --promote, folds Unshipped into Shipped as
a release step. Running --promote here also fixes the actual release
blocker (CmsInformation.CellSize was left unshipped) and, as a
one-off, fully re-sorts the previously unsorted Shipped.txt.
@mgravell mgravell changed the title Marc/nuget release sdk10 Update release sdk to net10, and promote "unshipped" APIs for release Sep 18, 2026

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: c73cc81de2

ℹ️ About Codex in GitHub

Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

Comment thread eng/public-api.py
*Promotion* (``--promote`` only). Moves every entry from ``PublicAPI.Unshipped.txt`` into its sibling
``PublicAPI.Shipped.txt``. "Shipped" means released and frozen, so doing this mid-cycle would freeze
API that has not shipped and cannot then be changed without it looking like a break. It is therefore
opt in, and belongs to the release: ship the package, then promote.

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Promote APIs before publishing the release

When a release contains unshipped entries, following the documented “ship the package, then promote” sequence makes the release fail: .github/workflows/nuget-release.yml verifies that every PublicAPI.Unshipped.txt is empty before its Build and Publish steps and exits nonzero otherwise. The promotion therefore needs to be run and committed before publishing the GitHub release, not afterward.

Useful? React with 👍 / 👎.

Comment thread eng/public-api.py
Comment on lines +116 to +117
if not args.check:
shipped.write(new_shipped)

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Validate every API pair before writing any of them

When more than one project has API tracking files and a later pair contains a shipped/unshipped clash, earlier pairs have already been written here before problems is checked at the end. The command then exits with status 2 while leaving those earlier shipped files promoted and their unshipped files emptied, producing a partial failed operation; collect and validate all planned changes before performing any writes.

Useful? React with 👍 / 👎.

Comment thread eng/public-api.py
print(("would change: " if args.check else "updated: ") + c)

if args.check:
print("run 'eng/public-api.py' to fix.", file=sys.stderr)

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Preserve promotion mode in the suggested fix command

When --promote --check detects pending APIs, this message instructs the caller to run the script without --promote. That command only sorts the files and leaves the unshipped entries in place, so the same check continues to fail indefinitely; the suggested command needs to include --promote whenever promotion mode was requested.

Useful? React with 👍 / 👎.

@cursor cursor Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cursor Bugbot has reviewed your changes using high effort and found 1 potential issue.

Fix All in Cursor

❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, have a team admin enable autofix in the Cursor dashboard.

Reviewed by Cursor Bugbot for commit c73cc81. Configure here.

Comment thread eng/public-api.py
s = s[len(m):]
changed = True
# tie-break on the whole line so the order is total and stable
return (s, line)

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sort key ignores nullability prefix

Medium Severity

sort_key strips experimental [...] annotations and member modifiers so a type's APIs stay in one block, but it never strips the PublicApiAnalyzers ~ prefix for nullability-oblivious members. Those lines then sort after every normal signature, so they are torn out of their type and land at the end of PublicAPI.Shipped.txt.

Fix in Cursor Fix in Web

Reviewed by Cursor Bugbot for commit c73cc81. Configure here.

@mgravell
mgravell merged commit ca66d2e into master Sep 18, 2026
22 checks passed
@mgravell
mgravell deleted the marc/nuget-release-sdk10 branch September 18, 2026 08:39
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.

1 participant