Title: [Question] Had some queries around the context propagation example · Issue #176 · temporalio/samples-python · GitHub
Open Graph Title: [Question] Had some queries around the context propagation example · Issue #176 · temporalio/samples-python
X Title: [Question] Had some queries around the context propagation example · Issue #176 · temporalio/samples-python
Description: Hi, was just implementing a context propagation interceptor based on this sample: https://github.com/temporalio/samples-python/blob/main/context_propagation/README.md After a bit of experimentation, it seems like the the contextvar value...
Open Graph Description: Hi, was just implementing a context propagation interceptor based on this sample: https://github.com/temporalio/samples-python/blob/main/context_propagation/README.md After a bit of experimentation...
X Description: Hi, was just implementing a context propagation interceptor based on this sample: https://github.com/temporalio/samples-python/blob/main/context_propagation/README.md After a bit of experimentation...
Opengraph URL: https://github.com/temporalio/samples-python/issues/176
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"[Question] Had some queries around the context propagation example","articleBody":"Hi, was just implementing a context propagation interceptor based on this sample: https://github.com/temporalio/samples-python/blob/main/context_propagation/README.md \n\nAfter a bit of experimentation, it seems like the the contextvar value is automatically restored to the previous value during multiple concurrent workflow runs and even after an activity finishes executing (if the var was updated inside the activity).\n\nI was wondering if the ContextVar.reset() usage in the sample is redundant? or are there scenarios where it might have an effect? \n\nI'm using a thread pool executor for my worker, so perhaps thats why it seems like ContextVar.reset() does not do anything? https://github.com/temporalio/sdk-python/issues/263\n\nWould it be safe to remove the resetting part when using a thread pool executor for activity tasks? And for workflows in general if I don't want the context vars state to leak between them?\n\n ","author":{"url":"https://github.com/Daanial11","@type":"Person","name":"Daanial11"},"datePublished":"2025-04-11T16:05:40.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":1},"url":"https://github.com/176/samples-python/issues/176"}
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:ff799cfb-f6a0-d0a4-7ec0-738e6e8153b0 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | 8EC4:16DD22:16A6FE4:1F80731:6A4DF5D4 |
| html-safe-nonce | 7b7ba597b445aaf8ebb19e0d7793c88f76418b30f4e7c1be753bbbf363de5082 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI4RUM0OjE2REQyMjoxNkE2RkU0OjFGODA3MzE6NkE0REY1RDQiLCJ2aXNpdG9yX2lkIjoiMTYxMzA3MTYxOTQ0NTM1NTk4OCIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | de60d3c0c6c536ad5695f79f4100ff913e45a2d1d3cad20c7892c9305f2b363f |
| hovercard-subject-tag | issue:2989089206 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/temporalio/samples-python/176/issue_layout |
| twitter:image | https://opengraph.githubassets.com/cdbbb474ce88ce413877b8f04d5dd2681c13c3f53546068e9e4b1e369bfbc6e4/temporalio/samples-python/issues/176 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/cdbbb474ce88ce413877b8f04d5dd2681c13c3f53546068e9e4b1e369bfbc6e4/temporalio/samples-python/issues/176 |
| og:image:alt | Hi, was just implementing a context propagation interceptor based on this sample: https://github.com/temporalio/samples-python/blob/main/context_propagation/README.md After a bit of experimentation... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | Daanial11 |
| hostname | github.com |
| expected-hostname | github.com |
| None | 5818716c93c6a2925b815402541a32814e43a7b1261c322b0c2df75224289566 |
| turbo-cache-control | no-preview |
| go-import | github.com/temporalio/samples-python git https://github.com/temporalio/samples-python.git |
| octolytics-dimension-user_id | 56493103 |
| octolytics-dimension-user_login | temporalio |
| octolytics-dimension-repository_id | 454557884 |
| octolytics-dimension-repository_nwo | temporalio/samples-python |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 454557884 |
| octolytics-dimension-repository_network_root_nwo | temporalio/samples-python |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | f4bb89367ca678f057d79b1abc45d6675b1bd5b2 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width