Archive easyblocks along with easyconfig#2653
Conversation
Fix broken check for generic easyblock
Be more strict on where to stop easyblock dumping
| errormsg = "build failed (first %d chars): %s" % (first_n, err.msg[:first_n]) | ||
| _log.warning(errormsg) | ||
| result = False | ||
| app.close_log() |
There was a problem hiding this comment.
Logging was being shut down too early, meaning all logging below this was lost
|
@boegel Cleaned up and good to go now |
| return (success, application_log, errormsg) | ||
|
|
||
|
|
||
| def reproduce_build(app, reprod_dir_root): |
There was a problem hiding this comment.
@boegel I need some help with how to unit test this, not sure what's required to get a proper app instance
There was a problem hiding this comment.
...or perhaps what is already tested is good enough?
There was a problem hiding this comment.
@ocaisa Once you have a parsed easyconfig (for example for toy-0.0.eb in the tests, you can just create an easyblock instance like MyEasyBlock(parsed_easyconfig) (e.g. Toy(toy_ec)).
But I guess there's no strong need to test this function in isolation, since it's always being called. Just make sure whatever it produces it being checked, which you're already doing I think.
|
@ocaisa I'll check why @boegelbot isn't picking up on this, but there's a failing test: |
|
To address easybuilders/easybuild-easyblocks#1574 , should I be doing the reproducability dump before |
|
@boegel After a quick test, the approach in the last comment looks like it would solve easybuilders/easybuild-easyblocks#1574 but I would like your opinion before I implement. |
…d then copy it over after success
|
Ok, I've implemented the move. This covers the case where modifications come from the command line (or configuration) and dependency resolution but doesn't cover what hooks might do. I think I'd also like to archive those but I don't know how to access them. |
|
Urgh, I already see a problem with the hook example https://easybuild.readthedocs.io/en/latest/Hooks.html?highlight=hooks#example-hook-to-inject-a-custom-patch-file |
|
I've reverted this back to simply also dumping the used easyblocks. Fixing the deeper problems of this approach (as in easybuilders/easybuild-easyblocks#1574) is for another PR. |
|
lgtm, thanks @ocaisa! |
Fixes #2633