Skip to content

Conversation

@xiangyan99
Copy link
Member

Introduce a new format of the continuation token

@xiangyan99
Copy link
Member Author

The test failures are in min-dep tests which use azure-core 1.32.0.

They will be gone after we ship core and update core's dep version in mgmt-core .

@xiangyan99 xiangyan99 marked this pull request as ready for review January 8, 2026 00:32
Copilot AI review requested due to automatic review settings January 8, 2026 00:32
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 pull request introduces a new continuation token format for long-running operations (LRO) in azure-core, migrating from pickle-based serialization to JSON-based serialization.

Key Changes:

  • Migration from pickle to JSON for continuation token serialization, improving security and cross-platform compatibility
  • Introduction of versioned token format to support future migration paths
  • Security improvements including filtering of sensitive headers from continuation tokens
  • New helper class _ContinuationTokenHttpResponse for reconstructing responses from tokens

Reviewed changes

Copilot reviewed 12 out of 12 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
sdk/core/azure-core/azure/core/polling/_utils.py New utility module with token encoding/decoding functions, header filtering, and version compatibility checks
sdk/core/azure-core/azure/core/polling/base_polling.py Updated LROBasePolling to use JSON-based tokens, added _ContinuationTokenHttpResponse class, modified get_continuation_token() and from_continuation_token() methods
sdk/core/azure-core/azure/core/polling/_poller.py Updated NoPolling to use new token utilities, removed pickle imports
sdk/core/azure-core/azure/core/_version.py Version bump from 1.37.1 to 1.38.0
sdk/core/azure-core/CHANGELOG.md Documented breaking change in continuation token format
sdk/core/azure-core/TROUBLESHOOTING.md New troubleshooting guide for continuation token compatibility issues
sdk/core/azure-core/tests/test_base_polling.py Updated tests to validate JSON token format, added tests for pickle incompatibility and security features
sdk/core/azure-core/tests/test_polling.py Added tests for token validation and error handling
sdk/core/azure-core/tests/async_tests/test_base_polling_async.py Updated async tests to match sync changes
sdk/core/azure-mgmt-core/tests/test_arm_polling.py Updated tests to validate JSON token structure
sdk/core/azure-mgmt-core/tests/asynctests/test_async_arm_polling.py Updated async ARM polling tests
sdk/core/azure-core/tests/testserver_tests/coretestserver/coretestserver/test_routes/polling.py Added test server routes for continuation token testing

@xiangyan99 xiangyan99 merged commit fb8cbea into main Jan 8, 2026
54 checks passed
@xiangyan99 xiangyan99 deleted the update_continuation_token_version branch January 8, 2026 20:48
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.

5 participants