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

--module-only --force messes with the reprod folder #2658

Closed
mboisson opened this issue Nov 12, 2018 · 11 comments
Closed

--module-only --force messes with the reprod folder #2658

mboisson opened this issue Nov 12, 2018 · 11 comments
Milestone

Comments

@mboisson
Copy link
Contributor

When running eb with the options --module-only --force, it recreates the easyconfig stored in the reprod folder. Unfortunately, this means that this easyconfig may actually no longer be reproducible.

This happened to me with GDAL, when the start_dir that is listed in the EasyConfig in the reprod folder went from

start_dir = '%(builddir)s/%(namelower)s-%(version)s/'

to

start_dir = '%(builddir)s/'

This is because the EasyBlock updates its config, and the full EasyBlock is not being run.

@mboisson
Copy link
Contributor Author

mboisson commented Nov 12, 2018

@boegel would it make sense to you to not over-write the reprod/*.eb if --module-only is used ?

@boegel
Copy link
Member

boegel commented Nov 13, 2018

@mboisson It probably does, but I guess it also depends: you may have made a change in the easyconfig file to make the sanity check pass for example. Not including that in the easyconfig file in reprod is also problematic...

cc @ocaisa

@mboisson
Copy link
Contributor Author

Investigating more related problems, I am thinking that saving start_dir in the reprod file is in itself problematic, independent of --modules-only.

Grepping start_dir through easyconfigs, they are always relative paths. Yet, when saving the easyconfig into the reprod folder, this has become an absolute path. This is bound to cause trouble.

I think the concept of start_dir needs to be split into two :

  1. The easyconfig, relative start directory
  2. The absolute start directory where things are starting to get built from

The two concepts should be saved separately in the easyconfig.

@mboisson
Copy link
Contributor Author

mboisson commented Nov 14, 2018

I would say we should also avoid dumping exts_filter

When installing Platypus, I get the following error :

== sanity checking...
ERROR: Traceback (most recent call last):
  File "/cvmfs/soft.computecanada.ca/easybuild/lib/python2.7/site-packages/easybuild-framework/easybuild/main.py", line 126, in build_and_install_software
    (ec_res['success'], app_log, err) = build_and_install_one(ec, init_env)
  File "/cvmfs/soft.computecanada.ca/easybuild/lib/python2.7/site-packages/easybuild-framework/easybuild/framework/easyblock.py", line 2860, in build_and_install_one
    result = app.run_all_steps(run_test_cases=run_test_cases)
  File "/cvmfs/soft.computecanada.ca/easybuild/lib/python2.7/site-packages/easybuild-framework/easybuild/framework/easyblock.py", line 2776, in run_all_steps
    self.run_step(step_name, step_methods)
  File "/cvmfs/soft.computecanada.ca/easybuild/lib/python2.7/site-packages/easybuild-framework/easybuild/framework/easyblock.py", line 2642, in run_step
    step_method(self)()
  File "/cvmfs/soft.computecanada.ca/easybuild/lib/python2.7/site-packages/easybuild-easyblocks/easybuild/easyblocks/generic/pythonpackage.py", line 538, in sanity_check_step
    (success, fail_msg) = super(PythonPackage, self).sanity_check_step(*args, **kwargs)
  File "/cvmfs/soft.computecanada.ca/easybuild/lib/python2.7/site-packages/easybuild-framework/easybuild/framework/extensioneasyblock.py", line 131, in sanity_check_step
    (sanity_check_ok, fail_msg) = Extension.sanity_check_step(self)
  File "/cvmfs/soft.computecanada.ca/easybuild/lib/python2.7/site-packages/easybuild-framework/easybuild/framework/extension.py", line 173, in sanity_check_step
    cmd = cmd % template
KeyError: 'pyver'

on this bit :

exts_filter = (
    '/cvmfs/soft.computecanada.ca/easybuild/software/2017/Core/python/%(pyver)s/bin/python -c "import %(ext_name)s"',
    '',
)

@boegel
Copy link
Member

boegel commented Nov 16, 2018

If I'm not mistaken #2664 takes care of these issues... Is that right @ocaisa?

@ocaisa
Copy link
Member

ocaisa commented Nov 19, 2018

Yes #2664 will address all of these problems by dumping the easyconfig after any modifications from the configuration but before any of the easyblock steps. It will also dump the easyblocks and the hooks alongside it.

@ocaisa
Copy link
Member

ocaisa commented Nov 22, 2018

@mboisson Can you clarify this:

Grepping start_dir through easyconfigs, they are always relative paths. Yet, when saving the easyconfig into the reprod folder, this has become an absolute path. This is bound to cause trouble.

In my case I'm not seeing any absolute paths in the reprod easyconfigs, they are still relative. Is there a case where they are not?

@boegel
Copy link
Member

boegel commented Nov 22, 2018

@ocaisa See guess_start_dir in easyblock.py, when --module-only is used, start_dir is set to '' initially, which eventually lead to it being set to self.builddir which is an absolute path.

@mboisson
Copy link
Contributor Author

As Kenneth said, this is when you use --module-only. This happened to me with GDAL.

@ocaisa
Copy link
Member

ocaisa commented Nov 22, 2018

Ok, understood, after cleaning up a develop branch merge in #2664 this should now be fixed there.

@boegel boegel modified the milestones: 3.x, 3.8.0 Nov 22, 2018
@boegel
Copy link
Member

boegel commented Dec 6, 2018

Closing this since #2664 is merged, should be fixed (I checked quickly myself with --module-only, worked fine).

@boegel boegel closed this as completed Dec 6, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants