Title: Schedules hotfix for DTS dashboard by andystaples · Pull Request #169 · microsoft/durabletask-python · GitHub
Open Graph Title: Schedules hotfix for DTS dashboard by andystaples · Pull Request #169 · microsoft/durabletask-python
X Title: Schedules hotfix for DTS dashboard by andystaples · Pull Request #169 · microsoft/durabletask-python
Description: Summary Schedules created with durabletask.scheduled were failing to load in the Durable Task Scheduler (DTS) dashboard. The dashboard backend reads the raw schedule entity state and deserializes it into .NET types with System.Text.Json (Web defaults), but the Python SDK persisted the state in a Python-native shape. This PR aligns the persisted schedule entity state (ScheduleState / ScheduleConfiguration) with the .NET SDK wire format so the dashboard can read it. In-memory representations are unchanged; only the persisted JSON shape is adjusted (with tolerant reads for round-tripping). Fixes status as a numeric enum, not a string. System.Text.Json (Web defaults) has no string-enum converter, so it expects the ordinal. ScheduleStatus is now serialized as its .NET ordinal (Uninitialized=0, Active=1, Paused=2). Fixes the original could not be converted to ... ScheduleStatus. Path: $.status error. interval as a .NET TimeSpan string, not interval_seconds. The interval is now formatted/parsed as [-][d.]hh:mm:ss[.fffffff] (e.g. 01:00:00) to match the .NET TimeSpan JSON converter. OrchestrationInput as a JSON-encoded string, not a raw object. .NET types the field as string?; Python held it as Any. A dict/object input serialized to a JSON object and was rejected (Cannot get the value of a token type 'StartObject' as a string. Path: $.ScheduleConfiguration.OrchestrationInput). It is now serialized to a JSON string on persist and decoded back on read; the in-memory value stays a raw object so the orchestration still starts with the correct input. PascalCase property names throughout. ScheduleState and ScheduleConfiguration now emit .NET property names (Status, ExecutionToken, ScheduleConfiguration, ScheduleId, Interval, etc.) so case-insensitive matching in the backend succeeds (snake_case underscores previously broke the match). Backward compatibility from_json on both types tolerates the legacy snake_case/string shapes (numeric or string status, interval_seconds, raw input) so states persisted by earlier Python workers still round-trip. Review feedback addressed _from_iso only normalizes a trailing Z (no longer replaces every Z in the string). ScheduleStatus.from_dotnet uses a PEP 604 union (int | str | None); removed the now-unused typing.Union import. ScheduleState.from_json preserves the __init__-generated execution_token when the field is absent, instead of overwriting it with None (which would make every run_schedule signal look stale and silently stop the schedule). Testing Added regression tests for the .NET-compatible JSON shape (numeric status, TimeSpan interval, JSON-string input), legacy-format deserialization, and execution-token preservation. All tests/durabletask/scheduled/ tests pass; flake8 clean. Verified end-to-end against the DTS emulator: created a schedule with a dictionary orchestration_input (the exact shape that previously failed) and confirmed the dashboard's GET /api/v1/taskhubs/schedules endpoint deserializes and lists it without error.
Open Graph Description: Summary Schedules created with durabletask.scheduled were failing to load in the Durable Task Scheduler (DTS) dashboard. The dashboard backend reads the raw schedule entity state and deserializes i...
X Description: Summary Schedules created with durabletask.scheduled were failing to load in the Durable Task Scheduler (DTS) dashboard. The dashboard backend reads the raw schedule entity state and deserializes i...
Opengraph URL: https://github.com/microsoft/durabletask-python/pull/169
X: @github
Domain: github.com
| react-profiling | 0 |
| react-import-map | react,react-dom,react-dom/client,react-dom/profiling,react-is,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@b8488ee2c322 |
| route-pattern | /:user_id/:repository/pull/:id/files(.:format) |
| route-controller | pull_requests |
| route-action | files |
| fetch-nonce | v2:3d7853ba-72c2-4e5b-6c4b-c382d47f2d6c |
| current-catalog-service-hash | ae870bc5e265a340912cde392f23dad3671a0a881730ffdadd82f2f57d81641b |
| request-id | 84C8:14DE81:8FA2C:C24A3:6AFE3232 |
| html-safe-nonce | 4fae1f96da78daec0a5d853f3cc29a4d8a0a58dc848a08dcccc5fb08434851fb |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI4NEM4OjE0REU4MTo4RkEyQzpDMjRBMzo2QUZFMzIzMiIsInZpc2l0b3JfaWQiOiIxNjMwMTcwNjA1ODE2Nzg3NTA3IiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0= |
| visitor-hmac | dcbb8a71cf71d225702c50ced139a9df6995f9ce0d19c265bb6c750453331208 |
| hovercard-subject-tag | pull_request:4001871910 |
| github-keyboard-shortcuts | repository,pull-request-list,pull-request-conversation,pull-request-files-changed,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/microsoft/durabletask-python/pull/169/files |
| twitter:image | https://avatars.githubusercontent.com/u/77818326?s=400&v=4 |
| twitter:card | summary_large_image |
| og:image | https://avatars.githubusercontent.com/u/77818326?s=400&v=4 |
| og:image:alt | Summary Schedules created with durabletask.scheduled were failing to load in the Durable Task Scheduler (DTS) dashboard. The dashboard backend reads the raw schedule entity state and deserializes i... |
| og:site_name | GitHub |
| og:type | object |
| hostname | github.com |
| expected-hostname | github.com |
| None | d70e31220a67f6376c108d2416fa8e7df854c1065b1672ab7a88ab6dc3a809e2 |
| turbo-cache-control | no-preview |
| diff-view | unified |
| go-import | github.com/microsoft/durabletask-python git https://github.com/microsoft/durabletask-python.git |
| octolytics-dimension-user_id | 6154722 |
| octolytics-dimension-user_login | microsoft |
| octolytics-dimension-repository_id | 627664515 |
| octolytics-dimension-repository_nwo | microsoft/durabletask-python |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 627664515 |
| octolytics-dimension-repository_network_root_nwo | microsoft/durabletask-python |
| turbo-body-classes | logged-out env-production page-responsive full-width |
| disable-turbo | true |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | ccb88d9c92abe69245b429398c8a57ae87070c7c |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width