implement support for running interactive commands with run_shell_cmd#4453
Merged
branfosj merged 18 commits intoeasybuilders:5.0.xfrom Apr 6, 2024
Merged
implement support for running interactive commands with run_shell_cmd#4453branfosj merged 18 commits intoeasybuilders:5.0.xfrom
run_shell_cmd#4453branfosj merged 18 commits intoeasybuilders:5.0.xfrom
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
branfosj
requested changes
Apr 4, 2024
branfosj
reviewed
Apr 4, 2024
Comment on lines
283
to
284
| :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 |
Member
There was a problem hiding this comment.
Is this correct? Specifically the 'and number of iterations to allow these patterns to match with end out command output' part.
Member
Author
There was a problem hiding this comment.
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
Member
Author
There was a problem hiding this comment.
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...
branfosj
approved these changes
Apr 6, 2024
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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)