Skip to content

Warn when Durable Functions dependencies allow major upgrades - #350

Open
andystaples wants to merge 3 commits into
mainfrom
andystaples-functions-dependency-version-warning
Open

andystaples wants to merge 3 commits into
mainfrom
andystaples-functions-dependency-version-warning

Conversation

@andystaples

Copy link
Copy Markdown
Contributor

Summary

  • Warn when a Function App's requirements permit upgrading azure-functions-durable to a later major version, since major releases may introduce replay-breaking changes.
  • Run the check asynchronously once per Python worker after a durable-client, orchestrator, or entity invocation, without reading requirements during app indexing or waiting for the check before returning.
  • Document a major-version constraint and recommend locking the complete dependency graph for reproducible deployments.

Scope

The check is best-effort: it follows supported local -r and -c files 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.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Copilot AI balanced review requested due to automatic review settings November 10, 2026 18:33

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 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>

@berndverst Bernd Verst (berndverst) left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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>

@berndverst Bernd Verst (berndverst) left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

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.

3 participants