Skip to content

Conversation

@vukelich
Copy link
Member

@vukelich vukelich commented Dec 1, 2025

There have been PRs since the series of "Great Cancellation" pull requests where some types aren't being generated with using CancellationToken. This PR is an attempt at incremental fixes to new-command.md for better async code generation.

Copilot AI review requested due to automatic review settings December 1, 2025 01:51
@vukelich vukelich requested review from a team as code owners December 1, 2025 01:51
@github-project-automation github-project-automation bot moved this to Untriaged in Azure MCP Server Dec 1, 2025
Copilot finished reviewing on behalf of vukelich December 1, 2025 01:53
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR enhances the documentation in new-command.md to provide comprehensive guidance on proper CancellationToken usage in async methods, addressing issues where developers were omitting CancellationToken parameters in newly generated code.

Key Changes:

  • Added explicit CancellationToken cancellationToken parameter to all async method signatures in code examples throughout the documentation
  • Expanded guidance on when to use = default for CancellationToken parameters (only when other parameters also have defaults)
  • Added critical checklist items and "Do not"/"Always" guidelines emphasizing proper CancellationToken usage in service interfaces, implementations, command methods, and tests

You can also share your feedback on Copilot code review for a chance to win a $100 gift card. Take the survey.

@github-project-automation github-project-automation bot moved this from Untriaged to In Progress in Azure MCP Server Dec 1, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: In Progress

Development

Successfully merging this pull request may close these issues.

3 participants