Skip to content

Require a creation start time for filtered purge requests - #616

Merged
andystaples merged 4 commits into
devfrom
andystaples-fix-purge-default-start-time
Jul 30, 2026
Merged

Require a creation start time for filtered purge requests#616
andystaples merged 4 commits into
devfrom
andystaples-fix-purge-default-start-time

Conversation

@andystaples

@andystaples andystaples commented Jul 29, 2026

Copy link
Copy Markdown
Collaborator

Summary

  • raise a clear ValueError when purge_instance_history_by is called without created_time_from
  • prevent the SDK from sending a request that the Durable extension rejects with HTTP 400
  • use terminal orchestration statuses in purge regression tests

The Durable extension intentionally requires createdTimeFrom so a bare collection DELETE cannot become an accidental unfiltered purge. The Python SDK previously exposed the argument as optional and forwarded its omission, resulting in an opaque HTTP 400 response. This change fails locally with an actionable message instead.

Fixes #560

Testing

  • python -m pytest -q tests\models\test_DurableOrchestrationClient.py tests\models\test_RpcManagementOptions.py
  • python -m flake8 azure\durable_functions\models\DurableOrchestrationClient.py azure\durable_functions\models\RpcManagementOptions.py

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Copilot-Session: ed5b5ae5-2c5e-4422-9786-a23ad1618634
Comment thread azure/durable_functions/models/DurableOrchestrationClient.py Outdated
Comment thread tests/models/test_DurableOrchestrationClient.py Outdated
Comment thread CHANGELOG.md Outdated
andystaples and others added 2 commits July 30, 2026 10:00
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Copilot-Session: ed5b5ae5-2c5e-4422-9786-a23ad1618634
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Copilot-Session: ed5b5ae5-2c5e-4422-9786-a23ad1618634
@andystaples andystaples changed the title Fix purge requests without a creation start time Require a creation start time for filtered purge requests Jul 30, 2026
Comment thread azure/durable_functions/models/DurableOrchestrationClient.py
@andystaples
andystaples merged commit 9795b61 into dev Jul 30, 2026
9 checks passed
@andystaples
andystaples deleted the andystaples-fix-purge-default-start-time branch July 30, 2026 17:09
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.

Calling client.purge_instance_history_by without created_time_from throws

2 participants