CallbackService.run()/arun() should support a configurable timeout
Personne n'a encore pris cette issue.
Évaluation
- Difficulté
- 4/5
- Temps estimé
- 3-5 jours
- Accessibilité débutants
- 45/100
Piste de recherche
Start with CallbackService.run() and arun(), then inspect the pulp_workflow.app.tasks.run_callback dispatch path and the corresponding SigningService.sign()/asign() behavior in pulpcore. Determine how a configurable default timeout should apply to both subprocess paths and how it should align with the upstream signing-service pattern. Done means the timeout behavior and its tests cover synchronous and asynchronous callbacks without leaving a hung process.
Rédigé par le modèle d'indexation à partir du texte de l'issue.
Description
CallbackService.run() and arun() invoke a user-supplied script via
subprocess.run(...) / asyncio.create_subprocess_exec(...) with no timeout,
so a hung callback (e.g. a script that makes an HTTP call without its own
client-side timeout) will pin a Pulp worker indefinitely until the worker is
restarted or the process is killed externally.
Mitigations already in place:
- Callbacks are dispatched as their own Pulp tasks
(pulp_workflow.app.tasks.run_callback), so a hung callback ties up a worker
slot but does not stall the originating workflow's state machine. - Only admins (
callbackservice_admin) can register callback scripts, so this
is a self-inflicted-foot-gun rather than an unauthenticated DoS surface.
Notes:
- This mirrors
pulpcore.app.models.SigningService.sign()/asign()exactly,
which also have no timeout. Adding a timeout knob here without doing the
same forSigningServiceupstream would diverge from the established
pattern. - Suggested shape if/when this is addressed: a
WORKFLOW_CALLBACK_TIMEOUT
setting (default e.g. 300s), passed tosubprocess.run(..., timeout=...)in
run()and wrapped withasyncio.wait_for(process.communicate(), ...)plus
process.kill()onTimeoutErrorinarun(). Ideally pushed upstream into
SigningServiceas well so both inherit the same behavior.
Originally raised by the Copilot reviewer on #11.
- Langage dominant
- Python
- Étoiles
- 1
- Forks
- 3
- Merge moyen
- 2 j 2 h
- PR mergées (30 j)
- 7
Préparer son environnement
- Aucun Dockerfile ni fichier Docker Compose
- Propose un modèle de pull request
- Lire le guide de contribution
Par où commencer
- Lisez l'issue en entier, puis le guide de contribution du projet.
- Signalez en commentaire que vous la prenez — cela évite que deux personnes fassent le même travail.
- Forkez le dépôt et travaillez sur une branche.
- Ouvrez une pull request qui référence le numéro de l'issue.
Autres issues de pulp/pulp_workflow
-
Update the demo docsOuverte
Difficulté 1/5 Moins d'une heure Accessibilité débutants 72/100
pulp/pulp_workflow#78 ·
-
Difficulté 5/5 Plus d'une semaine Accessibilité débutants 25/100
pulp/pulp_workflow#79 ·
-
Add user docsOuverte
Difficulté 3/5 1-2 jours Accessibilité débutants 48/100
pulp/pulp_workflow#77 ·
-
Check callback securityOuverte
Difficulté 5/5 Plus d'une semaine Accessibilité débutants 25/100
pulp/pulp_workflow#76 ·
-
Speed up test suiteOuverte
Difficulté 4/5 3-5 jours Accessibilité débutants 45/100
pulp/pulp_workflow#49 ·
Toutes les issues de pulp/pulp_workflow
Issues similaires
-
bug(mcp): handle malformed and partial reranker responses safelyPeut-être pris @KamilEjaz890 l’a pris aujourd’hui. Ouverte
Difficulté 2/5 1-3 heures Accessibilité débutants 85/100
kubeflow/docs-agent#301 ·
Les mainteneurs répondent en général sous 4 jours
-
Invalid syntax in sshtunnelOuverteBug
Difficulté 2/5 1-3 heures Accessibilité débutants 62/100
pgadmin-org/pgadmin4#10797 ·
Les mainteneurs répondent en général sous 2 jours
-
Difficulté 2/5 1-3 heures Accessibilité débutants 66/100
gcivil-nyu-org/team5-mon-fall26#132 ·
Les mainteneurs répondent en général sous 1 jour
-
Difficulté 1/5 Moins d'une heure Accessibilité débutants 76/100
gcivil-nyu-org/team4-mon-fall26#291 ·
Les mainteneurs répondent en général sous 1 jour
-
Difficulté 2/5 1-3 heures Accessibilité débutants 73/100
gcivil-nyu-org/team3-mon-fall26#147 ·
Les mainteneurs répondent en général sous 2 jours