Skip to content

convert all generic easyblocks to run_shell_cmd#3046

Merged
SebastianAchilles merged 31 commits intoeasybuilders:5.0.xfrom
bartoldeman:generic-run-cmd
Jan 6, 2024
Merged

convert all generic easyblocks to run_shell_cmd#3046
SebastianAchilles merged 31 commits intoeasybuilders:5.0.xfrom
bartoldeman:generic-run-cmd

Conversation

@bartoldeman
Copy link
Copy Markdown
Contributor

For ConfigureMake the default for the verbose= parameter for build_step is reversed in line with the default for run_shell_cmd.

The default for the verbose= parameter for build_step is reversed
in line with the default for run_shell_cmd.
@bartoldeman bartoldeman marked this pull request as draft December 6, 2023 13:02
@bartoldeman bartoldeman added the EasyBuild-5.0 EasyBuild 5.0 label Dec 6, 2023
@bartoldeman bartoldeman added this to the 5.0 milestone Dec 6, 2023
boegel
boegel previously requested changes Dec 6, 2023
Comment thread easybuild/easyblocks/generic/configuremake.py Outdated
@boegelbot
Copy link
Copy Markdown

@bartoldeman: Tests failed in GitHub Actions, see https://github.com/easybuilders/easybuild-easyblocks/actions/runs/7115210289
Output from first failing test suite run:

ERROR: test_det_cmake_version (test.easyblocks.easyblock_specific.EasyBlockSpecificTest)
Tests for det_cmake_version function provided along with CMakeMake generic easyblock.
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/runner/work/easybuild-easyblocks/easybuild-easyblocks/test/easyblocks/easyblock_specific.py", line 231, in test_det_cmake_version
    self.assertErrorRegex(EasyBuildError, "Failed to determine CMake version", det_cmake_version)
  File "/opt/hostedtoolcache/Python/3.6.15/x64/lib/python3.6/site-packages/easybuild/base/testing.py", line 164, in assertErrorRegex
    call(*args, **kwargs)
  File "/home/runner/work/easybuild-easyblocks/easybuild-easyblocks/easybuild/easyblocks/generic/cmakemake.py", line 66, in det_cmake_version
    cmd_res = run_shell_cmd(cmd, hidden=True)
  File "/opt/hostedtoolcache/Python/3.6.15/x64/lib/python3.6/site-packages/easybuild/tools/run.py", line 166, in cache_aware_func
    res = func(cmd, *args, **kwargs)
  File "/opt/hostedtoolcache/Python/3.6.15/x64/lib/python3.6/site-packages/easybuild/tools/run.py", line 323, in run_shell_cmd
    raise_run_shell_cmd_error(res)
  File "/opt/hostedtoolcache/Python/3.6.15/x64/lib/python3.6/site-packages/easybuild/tools/run.py", line 149, in raise_run_shell_cmd_error
    raise RunShellCmdError(cmd_res, caller_info)
easybuild.tools.run.RunShellCmdError: Shell command 'cmake' failed!

----------------------------------------------------------------------
Ran 597 tests in 52.171s

FAILED (errors=1)
ERROR: Not all tests were successful.

bleep, bloop, I'm just a bot (boegelbot v20200716.01)
Please talk to my owner @boegel if you notice me acting stupid),
or submit a pull request to https://github.com/boegel/boegelbot fix the problem.

@boegel boegel changed the title Convert generic easyblocks to run_shell_cmd. Convert generic easyblocks to run_shell_cmd Dec 6, 2023
@bartoldeman
Copy link
Copy Markdown
Contributor Author

All generic easyblocks have been converted. Time for testing...

@bartoldeman bartoldeman marked this pull request as ready for review December 12, 2023 16:17
@boegel
Copy link
Copy Markdown
Member

boegel commented Jan 3, 2024

@SebastianAchilles Can you look into testing this a bit, as soon as easybuilders/easybuild-framework#4423 is merged?

@SebastianAchilles
Copy link
Copy Markdown
Member

Yes, I will test this PR, as soon as easybuilders/easybuild-framework#4423 is merged.

@SebastianAchilles
Copy link
Copy Markdown
Member

Test report by @SebastianAchilles

Overview of tested easyconfigs (in order)

  • SUCCESS GCC-system.eb

Build succeeded for 1 out of 1 (1 easyconfigs in total)
jscclxl1.int.jsc-clx.fz-juelich.de - Linux Rocky Linux 9.3, x86_64, Intel Xeon Processor (Cascadelake) (cascadelake), Python 3.9.18
See https://gist.github.com/SebastianAchilles/4d8f88f630344f13ce8be3286e6a10fe for a full test report.

@SebastianAchilles SebastianAchilles self-assigned this Jan 5, 2024
@SebastianAchilles
Copy link
Copy Markdown
Member

I think it makes sense to test, if possible, one EasyConfig per modified EasyBlock. To find recent EasyConfigs for an EasyBlock <EasyBlock> I used:

find . -type f | xargs grep -l "easyblock = '<EasyBlock>'" | xargs ls -rt | tail -20

I intend to test the following EasyConfigs:

EasyBlock Corresponding EasyConfig to test
Binary Nextflow-23.10.0.eb
Cargo cryptography-41.0.1-GCCcore-12.3.0.eb
Cargo Evcxr-REPL-0.14.2-GCCcore-12.2.0-Rust-1.65.0.eb
CMakeMake RapidJSON-1.1.0-20230928-GCCcore-12.3.0.eb
CmdCp Ninja-1.11.1-GCCcore-13.2.0.eb
Conda TRUST4-1.0.5.1.eb
ConfigureMake strace-6.6-GCCcore-12.2.0.eb
ConfigureMakePythonPackage MUSCLE3-0.7.0-foss-2022b.eb
FortranPythonPackage using derived EasyBlock numpy SciPy-bundle-2023.11-gfbf-2023b.eb
GoPackage SeqKit-2.3.1.eb
IntelBase using derived EasyBlock Advisor Advisor-2023.2.0.eb
JuliaPackage ResistanceGA-4.2-5-foss-2022a-R-4.2.1-Julia-1.9.2.eb
MesonNinja libGLU-9.0.3-GCCcore-13.2.0.eb
OCamlPackage no easyconfig found
OctavePackage Octave-7.1.0-foss-2021b.eb
PerlModule Bio-SearchIO-hmmer-1.7.3-GCC-11.2.0.eb
PythonPackage Pillow-10.0.0-GCCcore-12.3.0.eb
RPackage castor-1.7.11-foss-2022a.eb
RPM no easyconfig found
RubyGem Ruby-3.2.2-GCCcore-12.2.0.eb
SCons Cantera-3.0.0-foss-2023a.eb
SystemCompiler GCC-system.eb
SystemMPI dependencies not installed
Tarball VSCode-1.85.0.eb
VersionIndependentPythonPackage JUBE-2.4.1.eb
Waf no easyconfig found

@SebastianAchilles
Copy link
Copy Markdown
Member

Test report by @SebastianAchilles

Overview of tested easyconfigs (in order)

  • SUCCESS Nextflow-23.10.0.eb
  • SUCCESS cryptography-41.0.1-GCCcore-12.3.0.eb
  • SUCCESS Evcxr-REPL-0.14.2-GCCcore-12.2.0-Rust-1.65.0.eb
  • SUCCESS RapidJSON-1.1.0-20230928-GCCcore-12.3.0.eb
  • SUCCESS Ninja-1.11.1-GCCcore-13.2.0.eb
  • SUCCESS TRUST4-1.0.5.1.eb
  • SUCCESS strace-6.6-GCCcore-12.2.0.eb
  • SUCCESS MUSCLE3-0.7.0-foss-2022b.eb
  • SUCCESS SciPy-bundle-2023.11-gfbf-2023b.eb
  • SUCCESS SeqKit-2.3.1.eb
  • SUCCESS Advisor-2023.2.0.eb
  • SUCCESS ResistanceGA-4.2-5-foss-2022a-R-4.2.1-Julia-1.9.2.eb
  • SUCCESS libGLU-9.0.3-GCCcore-13.2.0.eb
  • SUCCESS Bio-SearchIO-hmmer-1.7.3-GCC-11.2.0.eb
  • SUCCESS Pillow-10.0.0-GCCcore-12.3.0.eb
  • SUCCESS castor-1.7.11-foss-2022a.eb
  • SUCCESS Ruby-3.2.2-GCCcore-12.2.0.eb
  • SUCCESS Cantera-3.0.0-foss-2023a.eb
  • SUCCESS GCC-system.eb
  • SUCCESS VSCode-1.85.0.eb
  • SUCCESS JUBE-2.4.1.eb

Build succeeded for 21 out of 21 (21 easyconfigs in total)
jscclxc1.int.jsc-clx.fz-juelich.de - Linux Rocky Linux 9.3, x86_64, Intel Xeon Processor (Cascadelake) (cascadelake), Python 3.9.18
See https://gist.github.com/SebastianAchilles/d676bcc8bde9132013cb2c0d11476d3e for a full test report.

Copy link
Copy Markdown
Member

@SebastianAchilles SebastianAchilles left a comment

Choose a reason for hiding this comment

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

lgtm

@SebastianAchilles SebastianAchilles dismissed boegel’s stale review January 6, 2024 09:24

Requested changes have been implemented.

@SebastianAchilles
Copy link
Copy Markdown
Member

Going in, thanks @bartoldeman!

@SebastianAchilles SebastianAchilles merged commit 437a74c into easybuilders:5.0.x Jan 6, 2024
@easybuilders easybuilders deleted a comment from boegelbot Jan 7, 2024

cmd = self.compose_install_command(test_installdir, extrapath=extrapath)
run_cmd(cmd, log_all=True, simple=True, verbose=False)
run_shell_cmd(cmd, hidden=True)
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

@bartoldeman Did you intentionally hide the installation command before running the tests in PythonPackage.test_step?

Just wondering, not opposing it, sort of makes sense, but it is different from what we had before (verbose=False in run_cmd is not equivalent with hidden=True in run_shell_cmd)

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

This looks like an oversight, since trace=False (now hidden=True) was used in many other places in this easyblock. I'll file a new PR for consistency.

bartoldeman added a commit to bartoldeman/easybuild-easyblocks that referenced this pull request Jan 15, 2024
@boegel boegel changed the title Convert generic easyblocks to run_shell_cmd convert all generic easyblocks to run_shell_cmd Jan 17, 2024
bartoldeman added a commit to ComputeCanada/easybuild-easyblocks that referenced this pull request Apr 3, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

EasyBuild-5.0 EasyBuild 5.0

Projects

No open projects
Status: No status

Development

Successfully merging this pull request may close these issues.

4 participants