-
Notifications
You must be signed in to change notification settings - Fork 202
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
add support for using 'sources' and 'git_config' for extensions in 'exts_list' #3294
Conversation
I've successfully tested this feature with one of our internal Git packages. In my EasyConfig file, I have an extensions block:
When I run with the production
but when I run with my personal checkout, it succeeds:
Is there documentation for how to create a new unit test? I'd love to exercise this in some way as part of the pull request. |
@boegel Suggested that a unit test could be added to either the easyblock.py or toy_build.py tests. I think I can do this, but neither one appears to actually perform a download of sources. What I would want to test is a dictionary entry like
and see that either the download actually occurs (ideal) or at least that the contents of 'git_config' is seen and is validated. |
I don't think I need to actually " see that ... the download actually occurs (ideal)." The filetools.py tests already include For this situation, I just need to test whether having a 'git_config' dictionary in Update. Well, that didn't go so well. The test failed (which I expected), but then spewed hundreds of lines of DEBUG output. I'm sure an explanation for the failure is in there somewhere... |
I just noticed that |
@akesandgren That's a good question! The allowed content of In the code of this PR, I didn't want to try to change how The EasyConfigs which make use of My write up of |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@kelseymh Great job on figuring this out, I'm sure that took a fair amount of effort...
An enhanced test for obtain_file
to cover the use of git_config
makes sense too, but that can also be tackled in a separate PR I think, up to you...
I agree with @akesandgren's remark w.r.t. git_config
vs sources
(only read his comment after I wrote up mine, so I'll leave it in place).
…, as well as for tarball itself. Suggested by @boegel.
@boegel wrote:
No need. I got most of the way through writing it, and discovered that |
…ks done in fetch_source and fetch_sources.
…f extension name.
allow single-element list as 'sources' value in exts_list
Close & re-open to try and get Travis to wake up... You're running on fumes here Travis, seriously... |
Modify
fetch_extension_sources()
so that when a source dictionary is included in anexts_list
entry, it looks forgit_config
, and passes the latter through toobtain_file()
. This allows us to pull extensions from Git the same way we pull regular sources, including creating a local tar-ball on the fly.I plan to make this a "draft" (WIP) PR initially, because I haven't been able to explicitly test my code changes.edit (@boegel): fixes #3251