Skip to content

Conversation

@Flamefire
Copy link
Contributor

Currently we get:

ERROR: Failed to process easyconfig foo.eb: No software-specific easyblock 'EB_UNKNOWN' found for UNKNOWN

That isn't exactly clear. So improve in 2 steps:

  1. Remove the UNKNOWN constant and just handle in the way we would if the class isn't found: Return None or error if error_on_missing_easyblock is set
  2. Check for a fully empty file and error with a clear message

Possible improvement: Pass error_on_missing_easyblock in the EasyConfig constructor and use an empty dict as extra_options if no easyblock_class was found, i.e. self.extra_options = easyblock_class.extra_options() if easyblock_class else {}
This will error later in the parser which doesn't find the required keys like "name".
Not sure if that error ("missing required keys: name, ...") is cleaner than "No easyblock found as neither name nor easyblock were specified" though.

The current "No software-specific easyblock 'EB_UNKNOWN' found for UNKNOWN"
is rather confusing. Don't use UNKNOWN and just error/handle it.
Provide a better error message in case the EassyConfig file doesn't
contain anything but whitespace.
Copy link
Member

@boegel boegel left a comment

Choose a reason for hiding this comment

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

lgtm

@boegel boegel added this to the release after 4.9.2 milestone Aug 13, 2024
@boegel
Copy link
Member

boegel commented Aug 13, 2024

I think "No easyblock found as neither name nor easyblock were specified" is a pretty clear error, it's more specific to me than letting it fail later because mandatory easyconfig parameters are not specified.

Thanks a lot for this enhancement @Flamefire!

@boegel boegel merged commit 20e4ce6 into easybuilders:develop Aug 13, 2024
@Flamefire Flamefire deleted the fix-empty-ec branch August 14, 2024 12:39
@boegel boegel changed the title improve error messages for empty EasyConfigs improve error messages for empty easyconfigs Sep 12, 2024
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.

2 participants