Test server sometimes fails to include signal in first WFT

Ouverte
#2,127 0 commentaires 0 réactions 0 personnes assignées Voir sur GitHub

Les mainteneurs répondent en général sous 1 jour

Personne n'a encore pris cette issue.

Évaluation

Difficulté
4/5
Temps estimé
3-5 jours
Accessibilité débutants
35/100
Type d'issue
Bug
Clarté
Plutôt claire
Activité
À l'abandon
Stack technique
python

Piste de recherche

Commencez par exécuter le test tests/worker/test_workflow.py::test_unfinished_signal_handler_with_workflow_failure en appliquant le job sous --workflow-environment=time-skipping, de manière répétée sur un runner macos-intel, et comparez les variantes ApplicationError et cancel. Lisez les échecs du sdk-python PR #556 lié et retracez pourquoi le premier WFT peut omettre le signal ; le travail est terminé lorsque le serveur de test inclut systématiquement le signal avant start_workflow.

Rédigé par le modèle d'indexation à partir du texte de l'issue.

Description

test server

Using the Python SDK, I did

  1. handle = await start_workflow()
  2. await handle.signal()
  3. run worker

Expected Behavior

I expect Python to process a signal_workflow job and then a start_workflow in the activation for the first WFT.

Actual Behavior

Nearly always, we see the expected behavior. Occasionally (on macos-intel builds) Python processes a start_workflow activation job first. Almost certainly this is because the first WFT has no signal in it, although I have not yet investigated further and actually proved that (the test in question exits immediately if it sees start_workflow before signal_workflow).

Steps to Reproduce the Problem

Run the sdk-python test tests/worker/test_workflow.py::test_unfinished_signal_handler_with_workflow_failure applying job under --workflow-environment=time-skipping multiple times on a GitHub macos-intel runner until you see this failure.

Note: There are two variants of the python test; one involves the workflow throwing ApplicationError, and the other involves the client sending a cancel request, again before starting the worker. Interestingly, I've only seen the error described in this ticket for the ApplicationError variant of the test, suggesting that handling the cancel request somehow causes the test server to include all of them in the first WFT, whereas without the cancel request sometimes the signal event is omitted.

See failures in build history of https://github.com/temporalio/sdk-python/pull/556

Langage dominant
Java
Étoiles
447
Forks
278
Merge moyen
3 j 22 h
PR mergées (30 j)
28

Préparer son environnement

Par où commencer

  1. Lisez l'issue en entier, puis le guide de contribution du projet.
  2. Signalez en commentaire que vous la prenez — cela évite que deux personnes fassent le même travail.
  3. Forkez le dépôt et travaillez sur une branche.
  4. Ouvrez une pull request qui référence le numéro de l'issue.

Autres issues de temporalio/sdk-java

Toutes les issues de temporalio/sdk-java

Issues similaires

Plus d'issues Java

Recevez les nouvelles issues par e-mail

Un résumé court des issues GitHub adaptées aux débutants.