You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
As observered in this runs, these jobs run until they are killed by Jenkins or Abroted by the user. Even thou gemeni finished it's work(by error or success) it was left in a state of running. This is due to stopFlag not exiting the program for some reason. There are two wasy to tackle this issue:
Fix stopFlag package
Remove it in favour of context.Context
context is Go package used mainly to signal cancelation. stopFlag inside of gemini is used the same way. It contains concept of HARD KILL which is used to signal the immadiet stoppage for gemini, without pritting the results. There is no reason to have HARD kill in the application, if we need hard kill, SIGKILL can be sent and everything will stop. stopFlag only adds testing burden, and by the looks of it, it is just a wrapper to context.Context with signal handling. All of that can be replaces with one line:
This issue is really hard to replicated locally. It happens randomly (after many runs, can be caught). It cannot be discovered throught the debugger (debugger works without optimizations, and the case is never caught)
The text was updated successfully, but these errors were encountered:
Yet again, what's wrong with the stopFlag ?
If it's a thin wrapper on the same thing you're gonna replace it with, how can we know the issue with it getting stuck won't happen regardless?
As observed in the following
gemini
runs:As observered in this runs, these jobs run until they are killed by
Jenkins
or Abroted by the user. Even thougemeni
finished it's work(by error or success) it was left in a state of running. This is due tostopFlag
not exiting the program for some reason. There are two wasy to tackle this issue:stopFlag
packagecontext.Context
context
is Go package used mainly to signal cancelation.stopFlag
inside of gemini is used the same way. It contains concept ofHARD KILL
which is used to signal the immadiet stoppage for gemini, without pritting the results. There is no reason to have HARD kill in the application, if we need hard kill,SIGKILL
can be sent and everything will stop.stopFlag
only adds testing burden, and by the looks of it, it is just a wrapper tocontext.Context
withsignal
handling. All of that can be replaces with one line:This issue is really hard to replicated locally. It happens randomly (after many runs, can be caught). It cannot be discovered throught the debugger (debugger works without optimizations, and the case is never caught)
The text was updated successfully, but these errors were encountered: