temporalio / temporalio/sdk-python
[Bug] Prevent hot-reload of workflow definitions from disk
Nessuno ha ancora preso questa issue.
- Lingua principale
- Python
- Stelle
- 1.2k
- Fork
- 241
- Merge medio
- 3g 21h
- PR unite (30g)
- 55
Descrizione
A Python worker reloads the workflow definition from disk every time a new workflow run is started, i.e. without requiring the worker process to be shutdown and restarted. So for example, a long-running workflow that CANs will "hot reload" like this on every CAN, and a non-sticky worker will hot-reload on every WFT.
This is a side-effect of implementation (worker sandboxing involves disabling import cache which results in re-reading from disk) rather than being desired behavior, and isn't appropriate in production worker deployments since users are likely to expect that during deployments they can overwrite files without any modifications to running processes until process restart.
So, let's find a good way to prevent the behavior. For example, one possibility might involve permitting the re-read-from-disk to continue, but having the worker copy the relevant files somewhere private, and importing workflows from there.
Guida per i contributori
Apri la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Direzione di ricerca
Non sono indicati file o test. Inizia tracciando il sandboxing del worker Python e il comportamento della cache degli import descritti nell’issue, quindi valuta come vengono caricate le definizioni dei workflow nelle esecuzioni ripetute. Il lavoro è completato quando un worker in esecuzione mantiene invariato il proprio codice del workflow fino al riavvio del processo del worker, anche per i worker di lunga durata e i worker non sticky.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Valutazione
- Stack tecnologico
- python
- Ambito
- distributed-systems
- Tipo di issue
- Bug
- Difficoltà
- 5/5
- Tempo stimato
- Più di una settimana
- Stato di attività
- Tranquilla
- Chiarezza
- Da chiarire
- Idoneità per principianti
- 35/100