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

Deprecate use of parallel easyconfig parameter and fix updating the template value #4580

Open
wants to merge 5 commits into
base: 5.0.x
Choose a base branch
from

Conversation

Flamefire
Copy link
Contributor

@Flamefire Flamefire commented Jul 17, 2024

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) as maxparallel =1 so cfg.parallel is always a number

See #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

@Flamefire Flamefire changed the title Deprecate parallel 5 Deprecate use of ec['parallel'] and fix updating the template value - 5.0x Jul 17, 2024
@boegel boegel added change EasyBuild-5.0 EasyBuild 5.0 labels Jul 31, 2024
@boegel boegel added this to the 5.0 milestone Jul 31, 2024
@boegel boegel changed the title Deprecate use of ec['parallel'] and fix updating the template value - 5.0x Deprecate use of ec['parallel'] and fix updating the template value Jul 31, 2024
@boegel boegel changed the title Deprecate use of ec['parallel'] and fix updating the template value Deprecate use of ec['parallel'] and fix updating the template value Jul 31, 2024
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.
@boegel boegel changed the title Deprecate use of ec['parallel'] and fix updating the template value Deprecate use of parallel easyconfig parameter and fix updating the template value Oct 8, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants