-
Notifications
You must be signed in to change notification settings - Fork 3.2k
Introduce new version of continuation token #44574
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
|
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 . |
There was a problem hiding this 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
_ContinuationTokenHttpResponsefor 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 |
Co-authored-by: Kashif Khan <[email protected]>
…m/Azure/azure-sdk-for-python into update_continuation_token_version
Introduce a new format of the continuation token