René's URL Explorer Experiment


Title: Possible bug in exception behaviour of `WhenAllTask` · Issue #33 · microsoft/durabletask-python · GitHub

Open Graph Title: Possible bug in exception behaviour of `WhenAllTask` · Issue #33 · microsoft/durabletask-python

X Title: Possible bug in exception behaviour of `WhenAllTask` · Issue #33 · microsoft/durabletask-python

Description: Just to preface this with I'm coming from using the library in Dapr Workflows. I'm a bit confused with what the intended behaviour should be with the WhenAllTask and what happens when one of the tasks raises an exception. As I'm having t...

Open Graph Description: Just to preface this with I'm coming from using the library in Dapr Workflows. I'm a bit confused with what the intended behaviour should be with the WhenAllTask and what happens when one of the ta...

X Description: Just to preface this with I'm coming from using the library in Dapr Workflows. I'm a bit confused with what the intended behaviour should be with the WhenAllTask and what happens when one o...

Opengraph URL: https://github.com/microsoft/durabletask-python/issues/33

X: @github

direct link

Domain: github.com


Hey, it has json ld scripts:
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Possible bug in exception behaviour of `WhenAllTask`","articleBody":"Just to preface this with I'm coming from using the library in Dapr Workflows.\n\nI'm a bit confused with what the intended behaviour should be with the `WhenAllTask` and what happens when one of the tasks raises an exception. As I'm having trouble catching an exception when using `when_all()` - the trouble being I can't.\n\nI've narrowed it down to the fact that there are a couple of instances in this code here:\nhttps://github.com/microsoft/durabletask-python/blob/8598f6b634780bbb8396dbc09ce6515d2f094efd/durabletask/task.py#L276-L302\n\nWhere an Exception is raised directly:\n\n1. https://github.com/microsoft/durabletask-python/blob/8598f6b634780bbb8396dbc09ce6515d2f094efd/durabletask/task.py#L291\n2. https://github.com/microsoft/durabletask-python/blob/8598f6b634780bbb8396dbc09ce6515d2f094efd/durabletask/task.py#L298\n\nNumber 2. is raised as `get_result()` for a task raises an associated exception if present as far as I can see.\n\nWhen either of these are raised directly then the workflow immediately transitions to a `FAILED` status with no chance to catch.\n\nWhile I can see that having the workflow just raise the exception is probably by design, I've come across a use case where I wanted to be able to handle a fan out failure as I need to do a clean up step before failing the workflow.\n\nHowever if you allow for the `_exception` to be set and avoid raising these errors directly with something like:\n\n```python\ndef on_child_completed(self, task: Task[T]):\n        if self.is_complete:\n            if self._exception is None:\n                self._exception = ValueError('The task has already completed.')\n\n            self._result = []  # I don't know what this should be\n\n        self._completed_tasks += 1\n        if task.is_failed and self._exception is None:\n            self._failed_tasks += 1\n            self._exception = task.get_exception()\n            self._is_complete = True\n        if self._completed_tasks == len(self._tasks):\n            # The order of the result MUST match the order of the tasks provided to the constructor.\n            self._result = [task.get_result() if not task.is_failed else task.get_exception() for task in self._tasks]\n            self._is_complete = True\n```\n\nI am able to get the behaviour I expect where the workflow task then raises the exception that has been assigned to it and I can catch it and do what I need to do following the failure.\n\nThough I'm not sure about that first `is_complete` check, is it necessary? I'm not sure if all tasks should be allowed to complete and just give the user the choice of whether to have the exception raised or have the exceptions included in the result (a bit like asyncio gather tasks I suppose).\n\nI would be happy to open a PR for this but I'm not sure what would be wanted here?\n","author":{"url":"https://github.com/ajstewart","@type":"Person","name":"ajstewart"},"datePublished":"2024-10-29T10:56:25Z","url":"https://github.com/microsoft/durabletask-python/issues/33"}

react-profiling0
react-import-mapreact,react-dom,react-dom/client,react-dom/profiling,react-is,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@b8488ee2c322
route-pattern/_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format)
route-controllervoltron_issues_fragments
route-actionissue_layout
fetch-noncev2:950eaaa4-3aa7-4cfe-cef1-81878c29120d
current-catalog-service-hash81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114
request-id954A:24FA46:802FF3:ADF5E3:6AFE58AC
html-safe-nonce47916deb1b944dbef675f49e4aa22c64eb05062c0a85bbb8e5ee46edabb3db36
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI5NTRBOjI0RkE0Njo4MDJGRjM6QURGNUUzOjZBRkU1OEFDIiwidmlzaXRvcl9pZCI6IjEzNjE0MDU5MTkwOTg3MjI0NzYiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ==
visitor-hmacf3f5a73402a1a4d42c9319d9ac56b885002378cffe27b902864bad674bd2d7f0
hovercard-subject-tagissue:2620884750
github-keyboard-shortcutsrepository,issues,copilot
google-site-verificationApib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I
octolytics-urlhttps://collector.github.com/github/collect
analytics-location///voltron/issues_fragments/issue_layout
fb:app_id1401488693436528
apple-itunes-appapp-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/microsoft/durabletask-python/33/issue_layout
twitter:imagehttps://opengraph.githubassets.com/47723008f046f5a996ac1d238759fd8d5ea0af881b595a44be3572244174e8be/microsoft/durabletask-python/issues/33
twitter:cardsummary_large_image
og:imagehttps://opengraph.githubassets.com/47723008f046f5a996ac1d238759fd8d5ea0af881b595a44be3572244174e8be/microsoft/durabletask-python/issues/33
og:image:altJust to preface this with I'm coming from using the library in Dapr Workflows. I'm a bit confused with what the intended behaviour should be with the WhenAllTask and what happens when one of the ta...
og:image:width1200
og:image:height600
og:site_nameGitHub
og:typeobject
og:author:usernameajstewart
hostnamegithub.com
expected-hostnamegithub.com
Noneb3c0f155eafc27e60db6e254d1ffff0e072e9ab3b4018a5ee518797c19d89f86
turbo-cache-controlno-preview
go-importgithub.com/microsoft/durabletask-python git https://github.com/microsoft/durabletask-python.git
octolytics-dimension-user_id6154722
octolytics-dimension-user_loginmicrosoft
octolytics-dimension-repository_id627664515
octolytics-dimension-repository_nwomicrosoft/durabletask-python
octolytics-dimension-repository_publictrue
octolytics-dimension-repository_is_forkfalse
octolytics-dimension-repository_network_root_id627664515
octolytics-dimension-repository_network_root_nwomicrosoft/durabletask-python
turbo-body-classeslogged-out env-production page-responsive
disable-turbofalse
browser-stats-urlhttps://api.github.com/_private/browser/stats
browser-errors-urlhttps://api.github.com/_private/browser/errors
release4a10310af51a1bfffbedc4fd81cb582acf0cb0ff
ui-targetfull
theme-color#1e2327
color-schemelight dark
react-app-nameissues

Links:

Skip to contenthttps://github.com/microsoft/durabletask-python/issues/33#start-of-content
https://github.com/
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fmicrosoft%2Fdurabletask-python%2Fissues%2F33
GitHubRepository hosting, code review, and collaborationhttps://github.com/platform
CopilotAI coding agent for tasks, projects, and automated workhttps://github.com/features/copilot
ActionsCI/CD and automationhttps://github.com/features/actions
Code QualityQuality analysis, fixes, and enforcementhttps://github.com/features/code-quality
CodespacesCloud development environmentshttps://github.com/features/codespaces
Code SecurityVulnerability detection and remediationhttps://github.com/security/advanced-security/code-security
Secret ProtectionSecret scanning and leak preventionhttps://github.com/security/advanced-security/secret-protection
All Featureshttps://github.com/features
Documentationhttps://docs.github.com/en
Traininghttps://learn.github.com/skills
Certificationshttps://learn.github.com/credentials
Build with Copilothttps://github.com/features/ai
Customize Copilothttps://docs.github.com/en/copilot/how-tos/copilot-on-github/customize-copilot/customize-copilot-overview
Integrationshttps://github.com/marketplace
Trending reposhttps://github.com/trending
GitHub Sponsorshttps://github.com/open-source/sponsors
Developer articleshttps://github.com/resources/articles
ChangelogYour source for the latest features, improvements, and fixes across GitHub products, all in one place.https://github.blog/changelog/
Enterpriseshttps://github.com/enterprise
Teamhttps://github.com/team
Startupshttps://github.com/enterprise/startups
Nonprofitshttps://github.com/solutions/industry/nonprofits
Healthcarehttps://github.com/solutions/industry/healthcare
Financial serviceshttps://github.com/solutions/industry/financial-services
Manufacturinghttps://github.com/solutions/industry/manufacturing
Governmenthttps://github.com/solutions/industry/government
See all industrieshttps://github.com/solutions/industry
Why GitHubhttps://github.com/why-github
Customer Storieshttps://github.com/customer-stories
Business insightshttps://github.com/solutions/executive-insights
Trust Centerhttps://github.com/trust-center
GitHub Advanced SecurityEnterprise-grade code securityhttps://github.com/security/advanced-security
Copilot for businessEnterprise-grade AI featureshttps://github.com/features/copilot/copilot-business
Premium SupportEnterprise-grade 24/7 supporthttps://github.com/enterprise/premium-support
Documentationhttps://docs.github.com/en
Resource centerhttps://github.com/resources
Bloghttps://github.blog/
Events & webinarshttps://github.com/resources/events
Community Forumhttps://github.com/orgs/community/discussions
Customer Storieshttps://github.com/customer-stories
Integrationshttps://github.com/marketplace
Customer supporthttps://help.github.com/
Traininghttps://learn.github.com/skills
GitHub Statushttps://www.githubstatus.com/
Abouthttps://github.com/about
Partnershttps://github.com/partners
Changeloghttps://github.blog/changelog/
GitHub UniverseThe event for developers, by developers — talks, workshops, and what’s next for GitHub.https://githubuniverse.com/
Pricinghttps://github.com/pricing
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fmicrosoft%2Fdurabletask-python%2Fissues%2F33
Sign uphttps://github.com/signup?ref_cta=Sign+up&ref_loc=header+logged+out&ref_page=%2F%3Cuser-name%3E%2F%3Crepo-name%3E%2Fvoltron%2Fissues_fragments%2Fissue_layout&source=header-repo&source_repo=microsoft%2Fdurabletask-python
Reloadhttps://github.com/microsoft/durabletask-python/issues/33
Reloadhttps://github.com/microsoft/durabletask-python/issues/33
Reloadhttps://github.com/microsoft/durabletask-python/issues/33
microsofthttps://github.com/microsoft
durabletask-pythonhttps://github.com/microsoft/durabletask-python
Codehttps://github.com/microsoft/durabletask-python
Issues15 (15)https://github.com/microsoft/durabletask-python/issues
Pull requests12 (12)https://github.com/microsoft/durabletask-python/pulls
Actionshttps://github.com/microsoft/durabletask-python/actions
Projectshttps://github.com/microsoft/durabletask-python/projects
Security and qualityhttps://github.com/microsoft/durabletask-python/security
Insightshttps://github.com/microsoft/durabletask-python/insights
https://github.com/microsoft/durabletask-python
New issuehttps://github.com/login?return_to=https://github.com/microsoft/durabletask-python/issues/33
New issuehttps://github.com/login?return_to=https://github.com/microsoft/durabletask-python/issues/33
Possible bug in exception behaviour of WhenAllTaskhttps://github.com/microsoft/durabletask-python/issues/33#top
https://github.com/ajstewart
Adam Stewart (ajstewart)https://github.com/ajstewart
on Oct 29, 2024https://github.com/microsoft/durabletask-python/issues/33#issue-2620884750
durabletask-python/durabletask/task.pyhttps://github.com/microsoft/durabletask-python/blob/8598f6b634780bbb8396dbc09ce6515d2f094efd/durabletask/task.py#L276-L302
8598f6bhttps://github.com/microsoft/durabletask-python/commit/8598f6b634780bbb8396dbc09ce6515d2f094efd
durabletask-python/durabletask/task.pyhttps://github.com/microsoft/durabletask-python/blob/8598f6b634780bbb8396dbc09ce6515d2f094efd/durabletask/task.py#L291
8598f6bhttps://github.com/microsoft/durabletask-python/commit/8598f6b634780bbb8396dbc09ce6515d2f094efd
durabletask-python/durabletask/task.pyhttps://github.com/microsoft/durabletask-python/blob/8598f6b634780bbb8396dbc09ce6515d2f094efd/durabletask/task.py#L298
8598f6bhttps://github.com/microsoft/durabletask-python/commit/8598f6b634780bbb8396dbc09ce6515d2f094efd
https://github.com/yaron2
Yaron Schneider (yaron2)https://github.com/yaron2
on Nov 20, 2024https://github.com/microsoft/durabletask-python/issues/33#issuecomment-2489498139
Fabian Martinez (@famarting)https://github.com/famarting
Elena Kolevska (@elena-kolevska)https://github.com/elena-kolevska
Patrick Assuied (passuied)https://github.com/passuied
on Nov 16, 2025https://github.com/microsoft/durabletask-python/issues/33#event-20973736221
Merge pull request microsoft#33 from filintod/filinto/asyncio-p1https://github.com/passuied/durabletask-python/commit/9e8b34ba80c9c245fe1e5077229ec71b01254c67
microsoft#33https://github.com/microsoft/durabletask-python/issues/33
9e8b34bhttps://github.com/passuied/durabletask-python/commit/9e8b34ba80c9c245fe1e5077229ec71b01254c67
https://github.com/andystaples
andystapleshttps://github.com/andystaples
on Jul 16, 2026https://github.com/microsoft/durabletask-python/issues/33#issuecomment-4994352909
Adam Stewart (@ajstewart)https://github.com/ajstewart
#173https://github.com/microsoft/durabletask-python/pull/173
andystapleshttps://github.com/andystaples
completedhttps://github.com/microsoft/durabletask-python/issues?q=is%3Aissue%20state%3Aclosed%20archived%3Afalse%20reason%3Acompleted
on Jul 16, 2026https://github.com/microsoft/durabletask-python/issues/33#event-28081370044
https://github.com/ajstewart
Adam Stewart (ajstewart)https://github.com/ajstewart
on Jul 16, 2026https://github.com/microsoft/durabletask-python/issues/33#issuecomment-4995573265
Sign up for freehttps://github.com/signup?return_to=https://github.com/microsoft/durabletask-python/issues/33
Sign in to commenthttps://github.com/login?return_to=https://github.com/microsoft/durabletask-python/issues/33
https://github.com
Termshttps://docs.github.com/site-policy/github-terms/github-terms-of-service
Privacyhttps://docs.github.com/site-policy/privacy-policies/github-privacy-statement
Securityhttps://github.com/security
Statushttps://www.githubstatus.com/
Communityhttps://github.community/
Docshttps://docs.github.com/
Contacthttps://support.github.com?tags=dotcom-footer

Viewport: width=device-width


URLs of crawlers that visited me.