Uh oh!
There was an error while loading. Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork 31
Add suspend and resume reasons#250
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base:main
Are you sure you want to change the base?
Uh oh!
There was an error while loading. Please reload this page.
Changes from all commits
5ce9e4953734c25f7ba5063db7775ab29ad54bd23cFile filter
Filter by extension
Conversations
Uh oh!
There was an error while loading. Please reload this page.
Jump to
Uh oh!
There was an error while loading. Please reload this page.
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -431,21 +431,13 @@ async def purge_instance_history(self, instance_id: str) -> PurgeHistoryResult: | ||
| @deprecated("suspend is deprecated; use suspend_orchestration instead.") | ||
| async def suspend(self, instance_id: str, reason: Optional[str] = None) -> None: | ||
| """Deprecated alias for :meth:`suspend_orchestration`. | ||
| The v1 ``reason`` argument has no equivalent in durabletask and is | ||
| ignored. | ||
| """ | ||
| await self.suspend_orchestration(instance_id) | ||
| """Deprecated alias for :meth:`suspend_orchestration`.""" | ||
| await self.suspend_orchestration(instance_id, reason=reason) | ||
Member There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This now always passes ContributorAuthor There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Documented the required coordinated release in the Azure Functions changelog and repository agent guidance. Per release policy, package versions and dependency minimums remain unchanged in this feature PR; a dedicated release PR must publish the core package first, then update provider minimums and versions. | ||
| @deprecated("resume is deprecated; use resume_orchestration instead.") | ||
| async def resume(self, instance_id: str, reason: Optional[str] = None) -> None: | ||
| """Deprecated alias for :meth:`resume_orchestration`. | ||
| The v1 ``reason`` argument has no equivalent in durabletask and is | ||
| ignored. | ||
| """ | ||
| await self.resume_orchestration(instance_id) | ||
| """Deprecated alias for :meth:`resume_orchestration`.""" | ||
| await self.resume_orchestration(instance_id, reason=reason) | ||
| @deprecated("restart is deprecated; use restart_orchestration instead.") | ||
| async def restart( | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -786,13 +786,21 @@ def terminate_orchestration(self, instance_id: str, *, | ||
| ) | ||
| self._stub.TerminateInstance(req) | ||
| def suspend_orchestration(self, instance_id: str) -> None: | ||
| req = pb.SuspendRequest(instanceId=instance_id) | ||
| def suspend_orchestration(self, instance_id: str, *, | ||
| reason: str | None = None) -> None: | ||
| req = pb.SuspendRequest( | ||
| instanceId=instance_id, | ||
| reason=helpers.get_string_value(reason), | ||
Member There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Please carry this reason through the public in-memory testing backend too. ContributorAuthor There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Passed the optional request reason into the in-memory suspend/resume history events and added an in-memory E2E regression that verifies both persisted history inputs. Fixed in 63db777. | ||
| ) | ||
| self._logger.info(f"Suspending instance '{instance_id}'.") | ||
| self._stub.SuspendInstance(req) | ||
| def resume_orchestration(self, instance_id: str) -> None: | ||
| req = pb.ResumeRequest(instanceId=instance_id) | ||
| def resume_orchestration(self, instance_id: str, *, | ||
| reason: str | None = None) -> None: | ||
| req = pb.ResumeRequest( | ||
| instanceId=instance_id, | ||
| reason=helpers.get_string_value(reason), | ||
| ) | ||
| self._logger.info(f"Resuming instance '{instance_id}'.") | ||
| self._stub.ResumeInstance(req) | ||
| @@ -1320,13 +1328,21 @@ async def terminate_orchestration(self, instance_id: str, *, | ||
| ) | ||
| await self._get_stub().TerminateInstance(req) | ||
| async def suspend_orchestration(self, instance_id: str) -> None: | ||
| req = pb.SuspendRequest(instanceId=instance_id) | ||
| async def suspend_orchestration(self, instance_id: str, *, | ||
| reason: str | None = None) -> None: | ||
| req = pb.SuspendRequest( | ||
| instanceId=instance_id, | ||
| reason=helpers.get_string_value(reason), | ||
| ) | ||
| self._logger.info(f"Suspending instance '{instance_id}'.") | ||
| await self._get_stub().SuspendInstance(req) | ||
| async def resume_orchestration(self, instance_id: str) -> None: | ||
| req = pb.ResumeRequest(instanceId=instance_id) | ||
| async def resume_orchestration(self, instance_id: str, *, | ||
| reason: str | None = None) -> None: | ||
| req = pb.ResumeRequest( | ||
| instanceId=instance_id, | ||
| reason=helpers.get_string_value(reason), | ||
| ) | ||
| self._logger.info(f"Resuming instance '{instance_id}'.") | ||
| await self._get_stub().ResumeInstance(req) | ||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These new parameters are also inherited by
DurableTaskSchedulerClientandAsyncDurableTaskSchedulerClient, butdurabletask-azuremanaged/CHANGELOG.mdstill has an emptyUnreleasedsection. Repository policy requires each affected package changelog, and the prior inherited rewind API was documented there. Please add anADDEDentry for suspend/resume reasons.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Added the inherited suspend/resume reason API entry under
durabletask-azuremanaged/CHANGELOG.mdUnreleased. Fixed in 63db777.