ISISComputingGroup / ISISComputingGroup/IBEX

Pydev/nicos/ipython: warn against concurrent execution

Aperta
#8,696 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub
Lingua principale
Nessun dato sulla lingua
Stelle
6
Fork
2
Merge medio
16h 40m
PR unite (30g)
2

Descrizione

As an instrument scientist on HIFI I would like it to be harder to accidentally run two python scripts which are both trying to set magnets/temperatures/do runs concurrently, where one is in nicos, server-side, and the other is in pydev or a standalone python shell, client-side.

It's not necessarily obvious where to put this check if we want it to be robust, e.g. if my local client is executing a script locally in pydev, and some other client elsewhere (which would have no knowledge of my locally-running script) then schedules a script to execute via script server, where would a check catch that and which one would win?

### Notes

- We might be able to detect that pydev is "busy" (i.e. hasn't returned to prompt) and display a "running" icon on the perspective switcher if so - similar to what we do with nicos already. But not clear that there'll be a nice pydev api for this. And it still only really catches the single-client case - but that might be better than nothing.
- We may be able to warn on a best-effort basis in the client in the case where it happens to be the same client, on the same machine, running two scripts concurrently. Would a warning in some scenarios, but not all, lead to a false sense of security?
- Various beamlines have use-cases where two scripts run at the same time - usually this is one in a standalone python window and the other in pydev but could be different combinations. e.g. https://github.com/isiscomputinggroup/ibex/issues/6673 is one request to run multiple scripts concurrently _within_ nicos. We need to make sure we don't make running multiple scripts concurrently impossible, just more obvious.
- Baton-passing based on "who has control" - of the type suggested in https://github.com/isiscomputinggroup/ibex/issues/55 - is unlikely to _directly_ help here, as the client and server happen to be the same machine in some cases.

### Acceptance criteria

- It is more obvious when two scripts are running concurrently, one in pydev and the other in nicos
- It is still *possible* to run two scripts as above as some beamlines have use-cases for this.

Guida per i contributori

Nessuna guida per i contributori indicizzata per questo repository

Direzione di ricerca

Non vengono indicati file o test. Inizia tracciando l’esecuzione degli script in pydev e nicos, incluso il modo in cui un client potrebbe rilevare una sessione pydev occupata e come viene rappresentata l’esecuzione lato server. Il lavoro è completato quando l’esecuzione concorrente è più evidente e rimane possibile per i casi d’uso delle beamline.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Valutazione

Stack tecnologico
python
Ambito
full-stack
Tipo di issue
Funzionalità
Difficoltà
5/5
Tempo stimato
Più di una settimana
Stato di attività
Ferma
Chiarezza
Da chiarire
Idoneità per principianti
25/100

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.