-
Notifications
You must be signed in to change notification settings - Fork 217
implement support for running interactive commands with run_shell_cmd
#4453
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
Conversation
0199a9d to
8d4e59e
Compare
…ut or running interactive commands
a3ad6c9 to
1115e3b
Compare
…erns + fix output for hooks triggered for interactive shell commands run with run_shell_cmd
…ted from question
…estions for interactive commands in run_shell_cmd function
… command from run_shell_cmd into private helper function _answer_question
run_shell_cmd (WIP)run_shell_cmd
easybuild/tools/run.py
Outdated
| :param qa_wait_patterns: list of 2-tuples with patterns for non-questions | ||
| and number of iterations to allow these patterns to match with end out command output |
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.
Is this correct? Specifically the 'and number of iterations to allow these patterns to match with end out command output' part.
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.
No it doesn't, but that does hint towards something in run_cmd_qa that some easyblocks may be using but is not supported yet in run_shell_cmd.
I can look into implementing that when we hit it, we should get this PR merged ASAP.
Fixed docstring in 204f328
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.
Looks like that feature isn't used in the current easyblocks that use the no_qa option of run_cmd_qa, so we can reimplement it if/when the need arises...
Currently sits on top of #4444, which should definitely get merged first - I'll sync with PR with
5.0.xbranch once that's done.WIP because:(ready for review)more tests for(done)run_cmd_qashould also be implemented forrun_shell_cmdusingqa_patternsuse of(now implemented)qa_wait_patternsnot supported yet;probably need to add a(implemented)qa_timeoutoption (equivalent tomaxhitsinrun_cmd_qa);maybe some refactoring should be done, like moving code to actually answer questions to a dedicated (private)(done, see_handle_cmd_qafunction, to avoid makingrun_shell_cmdeven bigger than it already is_answer_questionhelper function);testing with actual easyblocks not done yet(see userun_shell_cmdin custom easyblock for WRF easybuild-easyblocks#3270)