Skip to content
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

Support for passing from-pr in an easyconfig-based Easystack file [WIP] #4052

Closed

Conversation

casparvl
Copy link
Contributor

@casparvl casparvl commented Aug 3, 2022

Note that this PR builds on top of #4021 (because we need option parsing for EasyStack files, before we can do anything with the options...). Thus, that part might still change.

At this point in time, the behavior of this PR on the following example:

robot: true
easyconfigs:
  - ncurses-6.3-GCCcore-11.3.0.eb
  - expecttest-0.1.3-GCCcore-11.3.0.eb:
      options: {
        'from_pr': [15922,15923],
      }
  - FFmpeg-5.0.1-GCCcore-11.3.0.eb:
      options: {
        'from_pr': [15918],
      }

Is:

eb_github -D --easystack easystack_flat_ebs_from_pr.yaml -r --debug
== Temporary log file in case of crash /scratch/casparl/eb-xdu4273p/easybuild-uyvbixfc.log

WARNING: Specifying options in easystack files is not supported yet. They are parsed, but ignored.


WARNING: Using easyconfigs from closed PR #15923

Dry run: printing build status of easyconfigs and dependencies
 * [x] /home/casparl/.local/easybuild/Debian10/2022/software/EasyBuild/4.6.0-dev/easybuild/easyconfigs/m/M4/M4-1.4.19.eb (module: M4/1.4.19)
 * [x] /home/casparl/.local/easybuild/Debian10/2022/software/EasyBuild/4.6.0-dev/easybuild/easyconfigs/b/Bison/Bison-3.8.2.eb (module: Bison/3.8.2)
 * [x] /home/casparl/.local/easybuild/Debian10/2022/software/EasyBuild/4.6.0-dev/easybuild/easyconfigs/f/flex/flex-2.6.4.eb (module: flex/2.6.4)
 * [x] /home/casparl/.local/easybuild/Debian10/2022/software/EasyBuild/4.6.0-dev/easybuild/easyconfigs/z/zlib/zlib-1.2.12.eb (module: zlib/1.2.12)
 * [x] /home/casparl/.local/easybuild/Debian10/2022/software/EasyBuild/4.6.0-dev/easybuild/easyconfigs/b/binutils/binutils-2.38.eb (module: binutils/2.38)
 * [x] /home/casparl/.local/easybuild/Debian10/2022/software/EasyBuild/4.6.0-dev/easybuild/easyconfigs/g/GCCcore/GCCcore-11.3.0.eb (module: GCCcore/11.3.0)
 * [x] /home/casparl/.local/easybuild/Debian10/2022/software/EasyBuild/4.6.0-dev/easybuild/easyconfigs/z/zlib/zlib-1.2.12-GCCcore-11.3.0.eb (module: zlib/1.2.12-GCCcore-11.3.0)
 * [x] /home/casparl/.local/easybuild/Debian10/2022/software/EasyBuild/4.6.0-dev/easybuild/easyconfigs/h/help2man/help2man-1.49.2-GCCcore-11.3.0.eb (module: help2man/1.49.2-GCCcore-11.3.0)
 * [x] /home/casparl/.local/easybuild/Debian10/2022/software/EasyBuild/4.6.0-dev/easybuild/easyconfigs/m/M4/M4-1.4.19-GCCcore-11.3.0.eb (module: M4/1.4.19-GCCcore-11.3.0)
 * [x] /home/casparl/.local/easybuild/Debian10/2022/software/EasyBuild/4.6.0-dev/easybuild/easyconfigs/b/Bison/Bison-3.8.2-GCCcore-11.3.0.eb (module: Bison/3.8.2-GCCcore-11.3.0)
 * [x] /home/casparl/.local/easybuild/Debian10/2022/software/EasyBuild/4.6.0-dev/easybuild/easyconfigs/f/flex/flex-2.6.4-GCCcore-11.3.0.eb (module: flex/2.6.4-GCCcore-11.3.0)
 * [x] /home/casparl/.local/easybuild/Debian10/2022/software/EasyBuild/4.6.0-dev/easybuild/easyconfigs/b/binutils/binutils-2.38-GCCcore-11.3.0.eb (module: binutils/2.38-GCCcore-11.3.0)
 * [x] /home/casparl/.local/easybuild/Debian10/2022/software/EasyBuild/4.6.0-dev/easybuild/easyconfigs/p/pkgconf/pkgconf-1.8.0-GCCcore-11.3.0.eb (module: pkgconf/1.8.0-GCCcore-11.3.0)
 * [x] /home/casparl/.local/easybuild/Debian10/2022/software/EasyBuild/4.6.0-dev/easybuild/easyconfigs/n/NASM/NASM-2.15.05-GCCcore-11.3.0.eb (module: NASM/2.15.05-GCCcore-11.3.0)
 * [x] /home/casparl/.local/easybuild/Debian10/2022/software/EasyBuild/4.6.0-dev/easybuild/easyconfigs/b/bzip2/bzip2-1.0.8-GCCcore-11.3.0.eb (module: bzip2/1.0.8-GCCcore-11.3.0)
 * [x] /scratch/casparl/eb-xdu4273p/files_pr15918/x/x264/x264-20220620-GCCcore-11.3.0.eb (module: x264/20220620-GCCcore-11.3.0)
 * [x] /home/casparl/.local/easybuild/Debian10/2022/software/EasyBuild/4.6.0-dev/easybuild/easyconfigs/e/expat/expat-2.4.8-GCCcore-11.3.0.eb (module: expat/2.4.8-GCCcore-11.3.0)
 * [x] /home/casparl/.local/easybuild/Debian10/2022/software/EasyBuild/4.6.0-dev/easybuild/easyconfigs/n/ncurses/ncurses-6.3-GCCcore-11.3.0.eb (module: ncurses/6.3-GCCcore-11.3.0)
 * [x] /home/casparl/.local/easybuild/Debian10/2022/software/EasyBuild/4.6.0-dev/easybuild/easyconfigs/u/UnZip/UnZip-6.0-GCCcore-11.3.0.eb (module: UnZip/6.0-GCCcore-11.3.0)
 * [x] /home/casparl/.local/easybuild/Debian10/2022/software/EasyBuild/4.6.0-dev/easybuild/easyconfigs/l/libreadline/libreadline-8.1.2-GCCcore-11.3.0.eb (module: libreadline/8.1.2-GCCcore-11.3.0)
 * [x] /scratch/casparl/eb-xdu4273p/files_pr15918/y/Yasm/Yasm-1.3.0-GCCcore-11.3.0.eb (module: Yasm/1.3.0-GCCcore-11.3.0)
 * [x] /home/casparl/.local/easybuild/Debian10/2022/software/EasyBuild/4.6.0-dev/easybuild/easyconfigs/t/Tcl/Tcl-8.6.12-GCCcore-11.3.0.eb (module: Tcl/8.6.12-GCCcore-11.3.0)
 * [x] /home/casparl/.local/easybuild/Debian10/2022/software/EasyBuild/4.6.0-dev/easybuild/easyconfigs/p/pkgconf/pkgconf-1.8.0.eb (module: pkgconf/1.8.0)
 * [x] /home/casparl/.local/easybuild/Debian10/2022/software/EasyBuild/4.6.0-dev/easybuild/easyconfigs/s/SQLite/SQLite-3.38.3-GCCcore-11.3.0.eb (module: SQLite/3.38.3-GCCcore-11.3.0)
 * [x] /home/casparl/.local/easybuild/Debian10/2022/software/EasyBuild/4.6.0-dev/easybuild/easyconfigs/o/OpenSSL/OpenSSL-1.1.eb (module: OpenSSL/1.1)
 * [x] /home/casparl/.local/easybuild/Debian10/2022/software/EasyBuild/4.6.0-dev/easybuild/easyconfigs/c/cURL/cURL-7.83.0-GCCcore-11.3.0.eb (module: cURL/7.83.0-GCCcore-11.3.0)
 * [x] /home/casparl/.local/easybuild/Debian10/2022/software/EasyBuild/4.6.0-dev/easybuild/easyconfigs/l/libffi/libffi-3.4.2-GCCcore-11.3.0.eb (module: libffi/3.4.2-GCCcore-11.3.0)
 * [x] /home/casparl/.local/easybuild/Debian10/2022/software/EasyBuild/4.6.0-dev/easybuild/easyconfigs/l/libtool/libtool-2.4.7-GCCcore-11.3.0.eb (module: libtool/2.4.7-GCCcore-11.3.0)
 * [x] /home/casparl/.local/easybuild/Debian10/2022/software/EasyBuild/4.6.0-dev/easybuild/easyconfigs/g/groff/groff-1.22.4-GCCcore-11.3.0.eb (module: groff/1.22.4-GCCcore-11.3.0)
 * [x] /home/casparl/.local/easybuild/Debian10/2022/software/EasyBuild/4.6.0-dev/easybuild/easyconfigs/d/DB/DB-18.1.40-GCCcore-11.3.0.eb (module: DB/18.1.40-GCCcore-11.3.0)
 * [x] /home/casparl/.local/easybuild/Debian10/2022/software/EasyBuild/4.6.0-dev/easybuild/easyconfigs/l/libpng/libpng-1.6.37-GCCcore-11.3.0.eb (module: libpng/1.6.37-GCCcore-11.3.0)
 * [x] /home/casparl/.local/easybuild/Debian10/2022/software/EasyBuild/4.6.0-dev/easybuild/easyconfigs/n/ncurses/ncurses-6.2.eb (module: ncurses/6.2)
 * [x] /home/casparl/.local/easybuild/Debian10/2022/software/EasyBuild/4.6.0-dev/easybuild/easyconfigs/p/Perl/Perl-5.34.1-GCCcore-11.3.0.eb (module: Perl/5.34.1-GCCcore-11.3.0)
 * [x] /home/casparl/.local/easybuild/Debian10/2022/software/EasyBuild/4.6.0-dev/easybuild/easyconfigs/i/intltool/intltool-0.51.0-GCCcore-11.3.0.eb (module: intltool/0.51.0-GCCcore-11.3.0)
 * [x] /home/casparl/.local/easybuild/Debian10/2022/software/EasyBuild/4.6.0-dev/easybuild/easyconfigs/g/gettext/gettext-0.21.eb (module: gettext/0.21)
 * [x] /home/casparl/.local/easybuild/Debian10/2022/software/EasyBuild/4.6.0-dev/easybuild/easyconfigs/a/Autoconf/Autoconf-2.71-GCCcore-11.3.0.eb (module: Autoconf/2.71-GCCcore-11.3.0)
 * [x] /home/casparl/.local/easybuild/Debian10/2022/software/EasyBuild/4.6.0-dev/easybuild/easyconfigs/x/XZ/XZ-5.2.5-GCCcore-11.3.0.eb (module: XZ/5.2.5-GCCcore-11.3.0)
 * [x] /home/casparl/.local/easybuild/Debian10/2022/software/EasyBuild/4.6.0-dev/easybuild/easyconfigs/a/Automake/Automake-1.16.5-GCCcore-11.3.0.eb (module: Automake/1.16.5-GCCcore-11.3.0)
 * [x] /home/casparl/.local/easybuild/Debian10/2022/software/EasyBuild/4.6.0-dev/easybuild/easyconfigs/l/libxml2/libxml2-2.9.13-GCCcore-11.3.0.eb (module: libxml2/2.9.13-GCCcore-11.3.0)
 * [x] /home/casparl/.local/easybuild/Debian10/2022/software/EasyBuild/4.6.0-dev/easybuild/easyconfigs/p/Python/Python-3.10.4-GCCcore-11.3.0-bare.eb (module: Python/3.10.4-GCCcore-11.3.0-bare)
 * [x] /home/casparl/.local/easybuild/Debian10/2022/software/EasyBuild/4.6.0-dev/easybuild/easyconfigs/a/Autotools/Autotools-20220317-GCCcore-11.3.0.eb (module: Autotools/20220317-GCCcore-11.3.0)
 * [x] /home/casparl/.local/easybuild/Debian10/2022/software/EasyBuild/4.6.0-dev/easybuild/easyconfigs/l/libarchive/libarchive-3.6.1-GCCcore-11.3.0.eb (module: libarchive/3.6.1-GCCcore-11.3.0)
 * [x] /home/casparl/.local/easybuild/Debian10/2022/software/EasyBuild/4.6.0-dev/easybuild/easyconfigs/g/gettext/gettext-0.21-GCCcore-11.3.0.eb (module: gettext/0.21-GCCcore-11.3.0)
 * [x] /home/casparl/.local/easybuild/Debian10/2022/software/EasyBuild/4.6.0-dev/easybuild/easyconfigs/g/GMP/GMP-6.2.1-GCCcore-11.3.0.eb (module: GMP/6.2.1-GCCcore-11.3.0)
 * [x] /home/casparl/.local/easybuild/Debian10/2022/software/EasyBuild/4.6.0-dev/easybuild/easyconfigs/g/git/git-2.36.0-GCCcore-11.3.0-nodocs.eb (module: git/2.36.0-GCCcore-11.3.0-nodocs)
 * [x] /home/casparl/.local/easybuild/Debian10/2022/software/EasyBuild/4.6.0-dev/easybuild/easyconfigs/c/CMake/CMake-3.23.1-GCCcore-11.3.0.eb (module: CMake/3.23.1-GCCcore-11.3.0)
 * [x] /home/casparl/.local/easybuild/Debian10/2022/software/EasyBuild/4.6.0-dev/easybuild/easyconfigs/l/LAME/LAME-3.100-GCCcore-11.3.0.eb (module: LAME/3.100-GCCcore-11.3.0)
 * [x] /scratch/casparl/eb-xdu4273p/files_pr15918/x/x265/x265-3.5-GCCcore-11.3.0.eb (module: x265/3.5-GCCcore-11.3.0)
 * [x] /home/casparl/.local/easybuild/Debian10/2022/software/EasyBuild/4.6.0-dev/easybuild/easyconfigs/r/Rust/Rust-1.60.0-GCCcore-11.3.0.eb (module: Rust/1.60.0-GCCcore-11.3.0)
 * [x] /home/casparl/.local/easybuild/Debian10/2022/software/EasyBuild/4.6.0-dev/easybuild/easyconfigs/p/Python/Python-3.10.4-GCCcore-11.3.0.eb (module: Python/3.10.4-GCCcore-11.3.0)
 * [x] /scratch/casparl/eb-xdu4273p/files_pr15922/e/expecttest/expecttest-0.1.3-GCCcore-11.3.0.eb (module: expecttest/0.1.3-GCCcore-11.3.0)
 * [x] /home/casparl/.local/easybuild/Debian10/2022/software/EasyBuild/4.6.0-dev/easybuild/easyconfigs/f/FriBidi/FriBidi-1.0.12-GCCcore-11.3.0.eb (module: FriBidi/1.0.12-GCCcore-11.3.0)
 * [x] /home/casparl/.local/easybuild/Debian10/2022/software/EasyBuild/4.6.0-dev/easybuild/easyconfigs/n/Ninja/Ninja-1.10.2-GCCcore-11.3.0.eb (module: Ninja/1.10.2-GCCcore-11.3.0)
 * [x] /home/casparl/.local/easybuild/Debian10/2022/software/EasyBuild/4.6.0-dev/easybuild/easyconfigs/b/Brotli/Brotli-1.0.9-GCCcore-11.3.0.eb (module: Brotli/1.0.9-GCCcore-11.3.0)
 * [x] /home/casparl/.local/easybuild/Debian10/2022/software/EasyBuild/4.6.0-dev/easybuild/easyconfigs/g/gperf/gperf-3.1-GCCcore-11.3.0.eb (module: gperf/3.1-GCCcore-11.3.0)
 * [x] /home/casparl/.local/easybuild/Debian10/2022/software/EasyBuild/4.6.0-dev/easybuild/easyconfigs/f/freetype/freetype-2.12.1-GCCcore-11.3.0.eb (module: freetype/2.12.1-GCCcore-11.3.0)
 * [x] /home/casparl/.local/easybuild/Debian10/2022/software/EasyBuild/4.6.0-dev/easybuild/easyconfigs/m/Meson/Meson-0.62.1-GCCcore-11.3.0.eb (module: Meson/0.62.1-GCCcore-11.3.0)
 * [x] /home/casparl/.local/easybuild/Debian10/2022/software/EasyBuild/4.6.0-dev/easybuild/easyconfigs/x/xorg-macros/xorg-macros-1.19.3-GCCcore-11.3.0.eb (module: xorg-macros/1.19.3-GCCcore-11.3.0)
 * [x] /home/casparl/.local/easybuild/Debian10/2022/software/EasyBuild/4.6.0-dev/easybuild/easyconfigs/u/util-linux/util-linux-2.38-GCCcore-11.3.0.eb (module: util-linux/2.38-GCCcore-11.3.0)
 * [x] /home/casparl/.local/easybuild/Debian10/2022/software/EasyBuild/4.6.0-dev/easybuild/easyconfigs/f/fontconfig/fontconfig-2.14.0-GCCcore-11.3.0.eb (module: fontconfig/2.14.0-GCCcore-11.3.0)
 * [x] /home/casparl/.local/easybuild/Debian10/2022/software/EasyBuild/4.6.0-dev/easybuild/easyconfigs/l/libpciaccess/libpciaccess-0.16-GCCcore-11.3.0.eb (module: libpciaccess/0.16-GCCcore-11.3.0)
 * [x] /home/casparl/.local/easybuild/Debian10/2022/software/EasyBuild/4.6.0-dev/easybuild/easyconfigs/x/X11/X11-20220504-GCCcore-11.3.0.eb (module: X11/20220504-GCCcore-11.3.0)
 * [x] /scratch/casparl/eb-xdu4273p/files_pr15918/f/FFmpeg/FFmpeg-5.0.1-GCCcore-11.3.0.eb (module: FFmpeg/5.0.1-GCCcore-11.3.0)

In this, Yasm, is a dependency of x265, which is a dependency of FFmpeg. As we can see, all are properly resolved from the right tempdir .../files_pr15918/.... Essentially, this is as expected.

In terms of the 'challenges' discussed in issue #4050, behaviour would/should now be that for

# my_easystack.yaml
easyconfigs:
  - A.eb
    options: {
      'from_pr': 1235,
    }
  - B.eb

With C.eb being a dependency of both A.eb and B.eb, this should resolve C.eb to the version from from_pr.

boegel and others added 16 commits June 7, 2022 14:27
…ck files based on the 'easyconfig' top level keyword
… det_easyconfig_paths. WIP, so still with lots of debugging print statements. It works for the top level EasyConfigs, but dependencies are resolved elsewhere I guess.
…ic --from-pr statements that may be included in easystack files. Note that this is really a first attempt, with lots of debugging prints still in there and a pretty horrible type of code duplication from easybuild/tools/options.py to easybuild/tools/robot.py to re-configure the robot_path build option. It's extremely ugly, but appears to work on a test EasyStack file that specifies some EasyConfig-specific --from-pr's... Now we need to decide if this is even the wanted behaviour...
if opts_current_ec is not None:
_log.debug("Applying easyconfig-specific build options %s to %s" % (opts_current_ec, path))
orig_build_options = update_build_options(opts_current_ec)
# TODO: we should probably also update the pr_path (?) since process_easyconfig calls EasyConfig(...)
Copy link
Contributor Author

Choose a reason for hiding this comment

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

We should probably update pr_path here as well, in a similar way as we do in resolve_dependencies (and we should probably grab that code snipped and make a function out of it, rather than duplicating that code everywhere)

if custom_build_opts is not None:
_log.debug("Applying easyconfig specific options %s" % str(custom_build_opts))
orig_build_opts = update_build_options(custom_build_opts)
# Re-determine robot-path from options (borrowed from easybuild/tools/options)
Copy link
Contributor Author

Choose a reason for hiding this comment

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

We should probably make a function out of this, rather than copying the code. That function could then be called whenever we need to calculate an updated robot_path (it could even update the build_option for us, but I'm not sure if we'd like that)

@casparvl
Copy link
Contributor Author

Closed in favor of #4057

@casparvl casparvl closed this Aug 10, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants