Skip to content

replace spaces/line breaks in question/wait patterns with regex pattern that matches one or more spaces/line breaks in run_shell_cmd#4509

Merged
branfosj merged 2 commits intoeasybuilders:5.0.xfrom
boegel:run_shell_cmd_qa_line_breaks
Apr 17, 2024
Merged

replace spaces/line breaks in question/wait patterns with regex pattern that matches one or more spaces/line breaks in run_shell_cmd#4509
branfosj merged 2 commits intoeasybuilders:5.0.xfrom
boegel:run_shell_cmd_qa_line_breaks

Conversation

@boegel
Copy link
Copy Markdown
Member

@boegel boegel commented Apr 15, 2024

This makes question/wait patterns a bit more forgiving w.r.t. having line breaks rather than spaces in particular questions, which may be the case when running in a narrow terminal for example.

…rn that matches one or more spaces/line breaks in run_shell_cmd
@boegel boegel added this to the 5.0 milestone Apr 15, 2024
@boegel boegel requested a review from branfosj April 15, 2024 06:59
@branfosj
Copy link
Copy Markdown
Member

branfosj commented Apr 15, 2024

Broken:

  • WRF (WRF-3.9.1.1-foss-2020b-dmpar.eb WRF-4.4.1-foss-2022b-dmpar.eb)
FAILED: Installation ended unsuccessfully: No matching questions found for current command output,
giving up after 200 seconds!

Tested:

  • CUDA (CUDA-11.5.2.eb CUDA-12.2.2.eb CUDA-11.8.0.eb CUDA-11.6.0.eb)
  • RepeatMasker (RepeatMasker-4.1.2-p1-foss-2020b.eb RepeatMasker-4.1.4-foss-2022a.eb RepeatMasker-4.1.5-foss-2021a.eb RepeatMasker-4.1.5-foss-2022a.eb)
  • RepeatModeler (RepeatModeler-2.0.2a-foss-2020b.eb RepeatModeler-2.0.4-foss-2022a.eb)
  • Stata (Stata-17.rev2023-01-10.eb)
  • OpenFOAM (OpenFOAM-Extend-5.0-20230821-foss-2022a.eb)
  • Qt (Qt5-5.14.2-GCCcore-10.2.0.eb Qt5-5.15.2-GCCcore-10.3.0.eb Qt5-5.15.13-GCCcore-13.2.0.eb)
  • WPS (WPS-3.9.1-foss-2020b-dmpar.eb WPS-4.2-foss-2020b-dmpar.eb WPS-4.3.1-foss-2021a-dmpar.eb WPS-4.4-foss-2022a-dmpar.eb)

Not able to test:

  • CPLEX
  • Maple
  • Mathematica

@branfosj
Copy link
Copy Markdown
Member

Broken:

* WRF (`WRF-3.9.1.1-foss-2020b-dmpar.eb WRF-4.4.1-foss-2022b-dmpar.eb`)

The issue is that the WRF easyblock contains \ (slash followed by space). This gets changed to \[\s\n]+

Copy link
Copy Markdown
Member

@branfosj branfosj left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Options:

  1. Add question = question.replace("\ ", " ") (and the same for pattern).
  2. Detect the use of \ and error out.
  3. ?

@boegel
Copy link
Copy Markdown
Member Author

boegel commented Apr 15, 2024

Broken:

* WRF (`WRF-3.9.1.1-foss-2020b-dmpar.eb WRF-4.4.1-foss-2022b-dmpar.eb`)

The issue is that the WRF easyblock contains \ (slash followed by space). This gets changed to \[\s\n]+

I'd say that's something we should fix in the WRF easyblock?

@boegel
Copy link
Copy Markdown
Member Author

boegel commented Apr 17, 2024

@branfosj I've pushed an update that deals with hard spaces, I guess it makes sense to make sure that run_shell_cmd is robust against that (since run_cmd_qa was too, the hard space was there before we ported the WRF easyblock to run_shell_cmd)

@branfosj branfosj merged commit 07ceab3 into easybuilders:5.0.x Apr 17, 2024
@boegel boegel deleted the run_shell_cmd_qa_line_breaks branch April 17, 2024 08:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

No open projects
Status: No status

Development

Successfully merging this pull request may close these issues.

2 participants