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

Setting checksums to [None] logs an error and continues #4260

Closed
PetrKralCZ opened this issue May 18, 2023 · 3 comments
Closed

Setting checksums to [None] logs an error and continues #4260

PetrKralCZ opened this issue May 18, 2023 · 3 comments
Milestone

Comments

@PetrKralCZ
Copy link
Contributor

When using

checksums = [None]

Easybuild logs an error

ERROR EasyBuild crashed with an error (at easybuild/easybuild-framework/easybuild/base/exceptions.py:126 in __init__): Couldn't find file checksums.json anywhere, and downloading it is disabled

but the build process continues and eventually finishes successfully.

@PetrKralCZ
Copy link
Contributor Author

related to #4142

@boegel boegel added this to the 4.x milestone May 18, 2023
@boegel
Copy link
Member

boegel commented May 18, 2023

This is caused by the try/except setup here:

try:
path = self.obtain_file("checksums.json", no_download=True)
self.log.info("Loading checksums from file %s", path)
json_txt = read_file(path)
self.json_checksums = json.loads(json_txt)
# if the file can't be found, return an empty dict
except EasyBuildError:
self.json_checksums = {}

obtain_file raises an error if the file can't be found, which is caught there

We should instead somehow specify that obtain_file should try to find the file, and just log a warning if it's not found, and returns None.

@PetrKralCZ Are you up for taking a look at that yourself?

@PetrKralCZ
Copy link
Contributor Author

PetrKralCZ commented May 19, 2023

@boegel boegel modified the milestones: 4.x, 4.8.1 Sep 19, 2023
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

2 participants