Make sure we don't check ".log.gz" files when looking for purgeable analyzes.
Make sure the "purgeable" projects really do have expired files in their runs/analyzes.
Indeed, the "Log Files" analyzes, containing ".log.gz" files, keeps the "stored" status and appear again and again in the purgeable projects list.
Some projects are shown as purgeable even though they only contain those logs.
We need a way to exclude "Log Files" analyzes from this search (not great), or to mark them as 'purged' even if we keep the files during the purge process (sounds better).
It looks like the "Log Files" analyzes should already be set as "purged" without removing the files. Hmmmm. (So why do the analyzes stay 'stored' after the purge?)
I thought the following ssh2_exec() returned an error when the only files found were excluded from the purge (then, no purge, and no analysis.data_state -> "purged").
Test sur "REPDEV" (7)Run "Wabsarf1-dil-1-4" (17801)Analyse "Log Files" (73007) /data/analyze/4176d30ee
And... Everything works fine. No file deleted, but analysis.data_state -> "purged".
2nd try:
Same thing, but analysis.hidden = 1.
And the problem occurs. Purge OK, but the analysis.data_state stays at 'stored'.
So the problem is not the ssh "find ... exec rm{}", it's that hidden analyzes are ignored when purging!
(This explains a lot.)
But why?
(We definitly need Gifs integration in forgemia!)
The purge only targets runs and analyzes listed in 'tx_nG6_purge_demand'. So, are the hidden analyzes in the demand, but excluded later? Or are they just absent from the demand?
The hidden analyses are just not added to the purge demand.
To close the subject, not only the hidden analyzes were impacted, but also hidden runs. We missed that bug, but the good news is that we'll free more space next month.