Repository navigation
Warn when Durable Functions dependencies allow major upgrades - #350
andystaples wants to merge 3 commits into
Conversation
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
There was a problem hiding this comment.
🟡 Changes recommended
The dependency check misses permitted future-major prereleases, allowing cross-major preview upgrades without triggering the replay warning.
1 open issue
What changed in this PR
Adds a best-effort dependency warning to the Azure Functions provider to help users avoid major-version upgrades that could break orchestration replay.
Changes:
- Checks requirements, supported local includes and constraints, and environment markers for permitted major upgrades.
- Schedules the check once per Python worker after an invocation, without blocking on dependency inspection.
- Documents major-version constraints and dependency locking, with unit and host-log tests.
| File | Description |
|---|---|
tests/azure-functions-durable/test_dependency_warning.py |
Tests requirement parsing, warning decisions, and background scheduling. |
tests/azure-functions-durable/e2e/test_logging_e2e.py |
Verifies the warning reaches host logs. |
azure-functions-durable/README.md |
Explains version constraints, locking, and warning behavior. |
azure-functions-durable/pyproject.toml |
Adds packaging for requirement and version parsing. |
azure-functions-durable/CHANGELOG.md |
Records the new background warning. |
azure-functions-durable/azure/durable_functions/internal/invocation.py |
Schedules the deferred, once-per-worker check. |
azure-functions-durable/azure/durable_functions/internal/dependency_warning.py |
Locates app requirements and checks for allowed major upgrades. |
Review effort: Balanced
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Bernd Verst (berndverst)
left a comment
There was a problem hiding this comment.
Useful safeguard, and deferring the check keeps dependency inspection out of indexing and invocation work. I found one missed warning in supported local includes: an explicit -r inside a -c file must reset constraint mode, as pip does; otherwise the installed package can upgrade to 3.x while the checker returns unknown. There is also a narrower false warning from forcing prereleases=True without preserving --pre. I reproduced both against pip using an offline wheel index. Please correct those parser/resolver mismatches and resolve the changelog conflict before merging.
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Bernd Verst (berndverst)
left a comment
There was a problem hiding this comment.
Both issues from my earlier review are fixed. I reran the offline pip reproductions and checked nested includes, prerelease opt-in, explicit preview bounds, and the once-per-worker nonblocking behavior. The changelog merge preserves main's entries, and the current-target unit suite passes. No remaining actionable findings; this is ready to merge.

Summary
azure-functions-durableto a later major version, since major releases may introduce replay-breaking changes.Scope
The check is best-effort: it follows supported local
-rand-cfiles and evaluates environment markers, but treats missing or unsupported requirements as unknown. A lockfile's presence alone does not establish that deployment uses it, so the warning describes the risk of installing requirements without a lock.