Profiler fails to stop and causes critical error
Hello @dbeltran and @bdepaula, I am forwarding an issue that @pgoitia noticed as he was travelling back to Cantabria.
MERGE REQUEST: !466 (merged)
Autosubmit Version
4.0.87
Summary
I had a flashback and realized that a last minute change I made this week produces an error when you run the "monitor" function with the profiler enabled.
The error occurs because the stop()
function throws an exception when the user tries to call stop()
twice. This is due to a _finished
flag that I introduced in this merge request: !372 (merged)
This was not happening before approving this MR, but I consider that the flag is still needed, so I propose the solution in MR !466 (merged)
Steps to reproduce
Just run a monitor
command for any experiment.
What is the current bug behavior?
It critically fails.
What is the expected correct behavior?
It should provide the profiler output and create the plot.
Relevant logs and/or screenshots
[CRITICAL] Cannot stop the profiler because was not running. [eCode=7074]
More info at https://autosubmit.readthedocs.io/en/master/troubleshooting/error-codes.html
Traceback (most recent call last):
File "/home/mgimenez/Documents/local/dev/autosubmit/bin/autosubmit", line 37, in main
Autosubmit.parse_args()
File "/home/mgimenez/Documents/local/dev/autosubmit/autosubmit/autosubmit.py", line 664, in parse_args
return Autosubmit.monitor(args.expid, args.output, args.list, args.filter_chunks, args.filter_status,
File "/home/mgimenez/Documents/local/dev/autosubmit/autosubmit/autosubmit.py", line 2528, in monitor
profiler.stop()
File "/home/mgimenez/Documents/local/dev/autosubmit/autosubmit/profiler/profiler.py", line 63, in stop
raise AutosubmitCritical('Cannot stop the profiler because was not running.', 7074)
log.log.AutosubmitCritical: