-
Notifications
You must be signed in to change notification settings - Fork 203
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
Deprecate use of parallel
easyconfig parameter and fix updating the template value
#4580
base: 5.0.x
Are you sure you want to change the base?
Conversation
f714fb3
to
8a76544
Compare
ec['parallel']
and fix updating the template value
8a76544
to
81a2649
Compare
81a2649
to
9e11b40
Compare
ec['parallel'] currently doubles as an EC option and as the storage for the calculated parallelism set by the EasyBlock. This makes it hard to reason about especially as maxparallel has pretty much the same effect. Also changes to ec['parallel'] done by e.g. easyblocks (or the set_parallel method) are not reflected by the template `%(parallel)s` Solution: Introduce a property which on write updates the template and some magic to mirror the effect of the now deprecated ec['parallel']
Migrate from `self.cfg['parallel']` to `self.cfg.parallel`
We need to fix our own easyblocks first but that requires this change. So allow until 5.1 or remove after updating the easyblocks.
The EC parameter is deprecated so the tests fail.
9e11b40
to
1554bd4
Compare
ec['parallel']
and fix updating the template valueparallel
easyconfig parameter and fix updating the template value
@@ -1212,6 +1229,22 @@ def all_dependencies(self): | |||
|
|||
return self._all_dependencies | |||
|
|||
@property | |||
def parallel(self): |
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.
@Flamefire Introducing this makes sense, but it means that easyblocks will need to be updated accordingly, right?
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.
Correct. Should be pretty easy to search for self.cfg['parallel']
. I mentioned the need to update the easyblocks in the description which we can only do after merging this PR.
Rebase of #3842 to 5.0x
ec['parallel'] currently doubles as an EC option and as the storage for the calculated parallelism set by the EasyBlock.
This makes it hard to reason about especially as maxparallel has pretty much the same effect. Also changes to ec['parallel'] done by e.g. easyblocks (or the set_parallel method) are not reflected by the template
%(parallel)s
Solution: Introduce a property which on write updates the template and some magic to mirror the effect of the now deprecated ec['parallel']
Additional change I'd like to do: Treat
parallel = False
(legacy) asmaxparallel =1
socfg.parallel
is always a numberSee #3811 (comment) for the motivation
Requires easybuilders/easybuild-easyconfigs#19375 to avoid deprecation warnings
Compared to #3842 I had to move the deprecation to 5.1 as easyblocks need updating but that requires this PR. So either we keep 5.1 as the target or merge this, update the easyblocks, then remove the deprecation (and fail hard) for 5.0