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

add support for --sources-url to fetch sources from additional URLs #4079

Open
wants to merge 1 commit into
base: develop
Choose a base branch
from

Conversation

joeydumont
Copy link

@joeydumont joeydumont commented Sep 15, 2022

This PR adds a --sources-url CLI option. It is a comma separated list of URLs that EasyBuild will fetch sources from. It replaces the hard-coded EASYBUILD_SOURCES_URL, but keeps it as a default value. The --sources-url-priority option is used to determine if these URLs are to be queried first, or last, i.e. as a fallback.

Unfortunately, this breaks 3 tests related to downloading the file, and I'm unsure of exactly why. It seems that build_option('sources_url') might return None when the function is run through the test harness, rather than getting populated with the default value. I've tried adding a init_config(args=["--sources-url=https://sources.easybuild.io"]), but that didn't work either.

If the feature is of interest, could you give me a hand in fixing the tests?

EDIT: After some discussion on Slack, I was able to fix the tests. I also renamed the options to --extra-source-urls and --extra-source-urls-priority. I changed the commit mesage to be imperative.

@joeydumont joeydumont force-pushed the source_url_cli_option branch 2 times, most recently from b5a6182 to de9ed77 Compare September 29, 2022 11:49
@boegel boegel added this to the 4.x milestone Oct 12, 2022
@boegel boegel changed the title Adds a --sources-url CLI option to fetch sources from additional URLs. add support for --sources-url to fetch sources from additional URLs Oct 12, 2022
easybuild/tools/options.py Outdated Show resolved Hide resolved
Add an --extra-source-urls CLI option to fetch sources from additional URLs.

Add the --extra-source-urls CLI option, a comma separated list of
URLs that EasyBuild will fetch sources from. It replaces the hard-coded
EASYBUILD_SOURCES_URL, but keeps it as a default value. Also add --extra-source-urls-priority
CLI option is used to determine if these URLs are to be queried first or last. Possible
options are "primary" and "backup".

Co-authored-by: Alexander Grund <Flamefire@users.noreply.github.com>
@joeydumont
Copy link
Author

I see there are now merge conflicts for this. Let me know when you're ready for me to rebase, or if you prefer to handle that.

@jfgrimm
Copy link
Member

jfgrimm commented Feb 23, 2023

I see there are now merge conflicts for this. Let me know when you're ready for me to rebase, or if you prefer to handle that.

go for it; if you have any issues/questions just ping me

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.

None yet

4 participants