Clean up task log entries by removing some configuration paths

Aperta
#1,317 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 2 giorni

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
2/5
Tempo stimato
1-3 ore
Idoneità per principianti
55/100
Tipo di issue
Refactoring
Chiarezza
Abbastanza chiara
Stato di attività
Ferma
Stack tecnologico
ruby
Ambito
backend

Direzione di ricerca

The logging override is addlog in BrainPortal/app/models/cbrain_task.rb, which the issue links around line 816. Read that method first, then find where the configured paths (gridshare, DP cache) are defined so the stripping can use them. Done means a log line such as the make_cluster_workdir() example comes out with the configured prefix removed, checked by running the task's log-related specs.

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

Descrizione

Admin Priority: Low

Whenever anything is logged in a task's log, we should remove the constant paths that match configuration settings, such as the gridshare path or the DP cache path.

So, a task log entry that now looks like:

[2023-03-27 18:42:27 EDT] make_cluster_workdir() Trying to create workdir '/scratch/prioux/BourreauBeluga/GridShare/224/06/57/blah-FMRIprepBidsSubject-T2240657'.

would instead be logged as:

[2023-03-27 18:42:27 EDT] make_cluster_workdir() Trying to create workdir '224/06/57/blah-FMRIprepBidsSubject-T2240657'.

Given the CbrainTask class already has an overriden version of hte method 'addlog', it should be an easy fix to zap these things before actually logging:

https://github.com/aces/cbrain/blob/431055c4a7fe97ecfdd9dfc1aed6c26bad44aa8f/BrainPortal/app/models/cbrain_task.rb#L816

Lingua principale
Ruby
Stelle
82
Fork
64
Merge medio
6g 13h
PR unite (30g)
36

Preparare l'ambiente

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di aces/cbrain

Tutte le issue di aces/cbrain

Issue simili

Altre issue su Ruby

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.