-
Notifications
You must be signed in to change notification settings - Fork 14
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
If command was not successful, exit with code 1, ENHANCEMENTS #97
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Tested it out and it works so far. As we're making the exit code more consistent right now, I raised some points that also fall under that umbrella. If the current behavior is intentional, you can just ignore that point.
StatusCommand::execute
is missing a return statement at the end of the function. this results in an incorrect exit code (this is also the cause for the job failure)stop.py::103
is stop unsuccessful if nothing was running? I would argue that stop is successful iff all running processes/containers of the current Qleverfile were stopped. If none are running, then stop is successful.- (unimportant)
LogCommand::excute::56
the exit code ofsubprocess.call
could be checked add_text_index.py::70
failure testing if the binary exists and works is ignoredclear_cache.py::79
the return of callingCacheStatsCommand
is ignoredexample_queries.py::233
return value ofClearCacheCommand
is ignored (though this seems intential due to the log muting)start.py::75
return of callingStopCommand
is ignoredstart.py::192
failure setting the index description is ignoredstart.py::203
failure setting the text description is ignoredstart.py::212
return callingWarmupCommand
is ignoredstop.py::76
failure getting process info is ignored (though this looks ok to me; the failure seems to not be critical)
src/qlever/commands/index_stats.py
Outdated
if not args.show: | ||
ret_value &= self.execute_space(args) | ||
|
||
return ret_value | ||
return True |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This breaks the command. The &=
no longer work, because the variable is not defined before. The return values of execute_space
and execute_time
are also ignored.
@Qup42 Thanks a lot for the very useful suggestions, I considered them all |
Enhancing the earlier (accidental) commit df63614 which already contained the core of this change