Skip to content

Show preview warnings only for prerelease versions - #293

Merged
Mike Krüger (mkrueger) merged 1 commit into
mainfrom
dev/mkrueger/fix/preview-version-warning
Nov 6, 2026
Merged

Mike Krüger (mkrueger) merged 1 commit into
mainfrom
dev/mkrueger/fix/preview-version-warning

Conversation

@mkrueger

Copy link
Copy Markdown
Collaborator

Summary

Show preview labels and warnings only when the running shell version is a prerelease, so stable builds no longer describe themselves as previews.

  • Determine prerelease status using NuGetVersion.IsPrerelease.
  • Gate the startup warning and welcome-screen preview label/disclaimer while retaining the displayed version.
  • Cover stable, preview, beta, RC, build-metadata, and unknown versions in regression tests.
  • Document the behavior. Leave release versioning and update-channel behavior unchanged.

Validation

  • dotnet build CosmosDBShell/CosmosDBShell.csproj --no-restore - passed, no warnings or errors.
  • dotnet build CosmosDBShell.Tests/CosmosDBShell.Tests.csproj --no-restore - passed, no warnings or errors.
  • Focused WelcomeCommandTests and ShellUpdateCheckerTests - 36 passed.
  • git diff --check - passed.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🟢 Approval recommended

No active review issues are reported for the change limiting preview labels and warnings to prerelease shell versions.

No open issues 🎉

What changed in this PR

This PR makes preview labels and warnings conditional on the running shell version being a prerelease, while preserving version display and leaving release versioning and update-channel behavior unchanged.

Changes:

  • Use NuGetVersion.IsPrerelease to gate startup warnings and welcome-screen preview content.
  • Add regression cases for stable, preview, beta, RC, build-metadata, and unknown versions.
  • Document when preview warnings appear.
File Description
docs/​commands.md Document prerelease-only preview warnings.
CosmosDBShell/​cosmos_welcome.ans Mark preview labels and disclaimers as conditional content.
CosmosDBShell/​Azure.Data.Cosmos.Shell.Core/​WelcomeScreen.cs Render conditional preview content based on version status.
CosmosDBShell/​Azure.Data.Cosmos.Shell.Core/​ShellInterpreter.cs Add prerelease detection and gate the startup warning.
CosmosDBShell.Tests/​CommandTests/​WelcomeCommandTests.cs Verify welcome and startup output across version formats.

Review effort: Balanced

@github-code-quality

Copy link
Copy Markdown

Code coverage overview

Languages: C#

C# / code-coverage/dotnet

main 6867370 dev/mkrueger/fix/pre... 2fd051a +/-
75% 75% 0%
View coverage of the 2 most impacted files.
File main 6867370 dev/mkrueger/fix/pre... 2fd051a +/-
D:\a\CosmosDBSh...lInterpreter.cs 80% 80% 0%
D:\a\CosmosDBSh...elcomeScreen.cs 96% 97% +1%

ℹ️ Calculations represent line coverage. Results may change as calculations are updated.

@mkrueger
Mike Krüger (mkrueger) merged commit 4eb8cfe into main Nov 6, 2026
13 checks passed
@mkrueger
Mike Krüger (mkrueger) deleted the dev/mkrueger/fix/preview-version-warning branch November 6, 2026 09:25
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