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

added option --dump-tweaked-easyconfig to dump the easyconfig tweaked… #2636

Conversation

mboisson
Copy link
Contributor

… by the --try-* options to the current working directory

… by the --try-* options to the current working directory
easybuild/tools/options.py Outdated Show resolved Hide resolved
easybuild/main.py Outdated Show resolved Hide resolved
@mboisson
Copy link
Contributor Author

Tagging @ocaisa

@@ -409,6 +410,8 @@ def main(args=None, logfile=None, do_build=None, testing=False, modtool=None):
# don't try and tweak anything if easyconfigs were generated, since building a full dep graph will fail
# if easyconfig files for the dependencies are not available
if try_to_generate and build_specs and not generated_ecs:
if options.dump_tweaked_easyconfig:
tweaked_ecs_paths = [os.getcwd(), os.getcwd()]
Copy link
Member

Choose a reason for hiding this comment

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

Please add a comment to explain why you need to pass the same path twice, looks a bit weird.

Also, please only do a single os.getcwd call.

And if you're up for it: add a wrapper for os.getcwd in filetools that does it in a try/except OSError, so we have proper error reporting for this in case this goes horribly wrong...

Copy link
Member

Choose a reason for hiding this comment

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

I was about to consider a PR related to this, I have a few problems with this approach. It's greedy, it will copy over all the tweaked easyconfigs and place them indiscriminately in the current directory. This is not what happens behind the scenes though, and that is why we use two paths. The first is prepended to the robot path, the second appended, by setting them to be equal you are giving precedence to the tweaked easyconfigs and this is not what you want.
It's also pretty complicated for a user to reproduce that search hierarchy (you must explicitly set the robot path and the config value needs to be sandwiched in the middle), you'd need to advise them how to do that.
What I was considering was doing this copy once the dependencies have been resolved. At that point you can check for tweaked_easyconfigs and tweaked_dep_easyconfigs in the paths of the final ec's and only dump those. This would remove the need to worry about setting the robot path.

Copy link
Contributor Author

@mboisson mboisson May 7, 2020

Choose a reason for hiding this comment

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

I trust you on that. To be honest, this has been opened for so long, I don't even know if the problem I was trying to address is still there. I was just trying to kick it up by merging develop, to see if tests would pass.

Copy link
Member

Choose a reason for hiding this comment

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

I totally see the use case, you want easy access to the tweaked easyconfigs, there are a couple of quirks to that though.

Copy link
Member

Choose a reason for hiding this comment

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

I think I have something that works in #3332

Copy link
Contributor Author

Choose a reason for hiding this comment

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

How does it compare to @boegel's #2665 ?

Copy link
Member

Choose a reason for hiding this comment

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

I think he better answer that...

Copy link
Contributor Author

Choose a reason for hiding this comment

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

You can just close this current PR if you want.

@boegel
Copy link
Member

boegel commented Oct 23, 2018

@mboisson A test for this new CLI option should be added too.... :)

@boegel boegel added this to the 3.8.0 milestone Oct 23, 2018
@boegel
Copy link
Member

boegel commented Nov 20, 2018

@mboisson Rather than adding a dedicated --dump-tweaked-easyconfig option, we should leverage the --copy support that is added in #2665?

@boegel boegel modified the milestones: 3.8.0, 3.8.1 Nov 20, 2018
@mboisson
Copy link
Contributor Author

Mmm, I'm not sure what these options do ? Do they apply after hooks/try-... are done ? Is there something that stops the build when those options are called ?

@boegel boegel modified the milestones: 3.8.1, 3.9.0 Jan 16, 2019
@boegel boegel modified the milestones: next release (3.9.1), 3.x May 14, 2019
@akesandgren
Copy link
Contributor

@mboisson Status of this one?

@mboisson
Copy link
Contributor Author

mboisson commented Sep 9, 2019

Status is I don't remember what was discussed a year ago :)

@boegel boegel modified the milestones: 3.x, 4.x Feb 20, 2020
@ocaisa
Copy link
Member

ocaisa commented May 19, 2020

As @mboisson suggested, closing this one since #3332 has been merged

@ocaisa ocaisa closed this May 19, 2020
@boegel boegel modified the milestones: 4.x, 4.2.1 May 19, 2020
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.

5 participants