Skip to content

[Bug] Updating worker's client does not update the client exposed to activities #1346

@haimgel

Description

@haimgel

What are you really trying to do?

Our current approach to mTLS certificate rotation for workers is detecting changed certificate on disk, constructing a new client and re-assigning it to worker.client. This mostly works. However, the client exposed to Activities through activity.client() returns the original client and not the one later assigned to the worker.

Describe the bug

Worker._activity_worker is constructed upon worker initialization, holds into the original client, and that client is not changed when worker.client is updated later.

Environment/Versions

  • OS and processor: M1 MacOS workers.
  • Temporal Version: Python SDK 1.15.0

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions