You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Add Version property to the `$Context` object passed to orchestrator
functions, similar to
Azure/azure-functions-powershell-worker#1108.
As a result, PowerShell Functions users will be able to specify a
version in **host.json**:
``` json
{
"extensions": {
"durableTask": {
"defaultVersion": "2.0"
}
}
}
```
and check the orchestration version in their orchestrator functions in
order to keep them backward compatible, for example:
``` powershell
if ($Context.Version -eq '1.0') {
# Legacy code path
Invoke-DurableActivity 'A'
} elseif ($Context.Version -eq '2.0') {
# New code path
Invoke-DurableActivity 'B'
}
```
**Note: Microsoft.Azure.WebJobs.Extensions.DurableTask 3.1.0+ is
required for this to work properly.**
### Pull request checklist
* [x] My changes **do not** require documentation changes
* [ ] Otherwise: Documentation issue linked to PR
* [ ] My changes **should not** be added to the release notes for the
next release
* [x] Otherwise: I've added my notes to `release_notes.md`
* [x] My changes **do not** need to be backported to a previous version
* [ ] Otherwise: Backport tracked by issue/PR #issue_or_pr
* [x] I have added all required tests (Unit tests, E2E tests)
0 commit comments