Skip to content

Conversation

@Flamefire
Copy link
Contributor

@Flamefire Flamefire commented Oct 2, 2025

Currently those are silently ignored leading to success where it should fail.

The only official easyconfig affected by this so far is MDAnalysis-2.4.2-foss-2021a.eb but I ran into this while creating an easyconfig

Includes

@Flamefire Flamefire force-pushed the extension-sanity-check-commands branch from 8743828 to 5943e1d Compare October 2, 2025 14:20
@Flamefire Flamefire force-pushed the extension-sanity-check-commands branch 2 times, most recently from e1fd987 to 4b556af Compare October 6, 2025 13:16
@boegel boegel added this to the next release (5.2.0?) milestone Oct 8, 2025
@boegel
Copy link
Member

boegel commented Nov 19, 2025

I would really like to see #5015 merged first so we can more easily review this...

@Flamefire Flamefire force-pushed the extension-sanity-check-commands branch from f4b578f to 18417ad Compare November 21, 2025 12:01
@Flamefire
Copy link
Contributor Author

Rebased after merge of that PR

'6.0',
)
if extension != self.is_extension:
raise EasyBuildError('Unexpected value for `extension` argument. '
Copy link
Member

Choose a reason for hiding this comment

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

This isn't exactly ignoring it, as is stated above...

What's the point of raising an error for an incorrect value being passed that's going to be ignored?!

Copy link
Contributor Author

@Flamefire Flamefire Dec 3, 2025

Choose a reason for hiding this comment

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

Because if we have different values it is an error somewhere.

So a) it doesn't need to be passed but b) if it is it should match the expected value

We can remove that check in EB 6 but I'd better play it safe until then

Copy link
Member

Choose a reason for hiding this comment

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

But why care if the value is different, if we're going to ignore the value anyway?

I sort of see your point, but we can't log a deprecation message claiming we stop caring about extension, only to raise an error based on its value immediately afterwards...

Copy link
Contributor Author

Choose a reason for hiding this comment

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

we can't log a deprecation message claiming we stop caring about extension, only to raise an error based on its value immediately afterwards...

Because these are 2 separate checks:

  1. Passing extension is allowed, but deprecated
  2. Passing a wrong extension is an error

What would you suggest for the wording? Just remove "and will be ignored"?

# (only relevant when this extension is installed stand-alone via ExtensionEasyBlock)
self.sanity_check_fail_msgs.append(fail_msg)

return res
Copy link
Member

Choose a reason for hiding this comment

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

Drive-by partial review: why is it OK to change this, and make Extension.sanity_check_step not return anything anymore? This is an API change...

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I misunderstood part of the EasyBlock code because ExtensionEasyBlock got complicated as we now call sanity_check_step from Extension and EasyBlock and the most straight forward way to combine those was to just check sanity_check_fail_msgs because EasyBlock.sanity_check_step doesn't return anything.

But in any case Extension.sanity_check_step and hence ExtensionEasyBlock needs to return this tuple (or actually True/False would be enough)

@Flamefire Flamefire force-pushed the extension-sanity-check-commands branch from 724bf28 to 6da2c63 Compare December 15, 2025 10:10
@Flamefire
Copy link
Contributor Author

Flamefire commented Dec 15, 2025

Rebased on develop to investigate and fix prior CI failure

@Flamefire Flamefire force-pushed the extension-sanity-check-commands branch from 6da2c63 to eda13d6 Compare December 15, 2025 14:28
This now calls the inherited `EasyBlock.sanity_check_step` that handles
the `sanity_check_commands` & `sanity_check_paths` for extensions too.
It is redundant as `self.is_extension` provides that information already.
@Flamefire Flamefire force-pushed the extension-sanity-check-commands branch from eda13d6 to 46eee7d Compare December 15, 2025 14:56
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