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

enhance EasyBlock class to allow passing in logfile #4707

Conversation

Thyre
Copy link
Contributor

@Thyre Thyre commented Nov 14, 2024

In the case an EasyBlock creates another instance of an EasyBlock (for example when dealing with Bundles), each instance will create new log file, which may stay open and cause issues down the line. To prevent this, add an option to the EasyBlock constructor to disable logging to files.

Marked as draft until verified with QuantumESPRESSO and Bundle changes in respective PRs. I want to really make sure that all issues are resolved first.

Related: easybuilders/easybuild-easyconfigs#21841, easybuilders/easybuild-easyblocks#3505

@Thyre Thyre force-pushed the easyblock-allow-to-transfer-logger-on-init branch from 7119d9e to a1c36f1 Compare November 14, 2024 12:29
@Thyre Thyre force-pushed the easyblock-allow-to-transfer-logger-on-init branch from a1c36f1 to e3cb8f0 Compare November 14, 2024 13:52
@Thyre Thyre changed the title EasyBlock: Allow to disable logging to file EasyBlock: Allow to pass logfile from other EasyBlock Nov 14, 2024
In the case an EasyBlock creates another instance of an EasyBlock (for
example when dealing with Bundles), each instance will create new
log file, which may stay open and cause issues down the line. To
prevent this, add an option to the EasyBlock constructor to pass a
logfile from another EasyBlock.

Signed-off-by: Jan André Reuter <j.reuter@fz-juelich.de>
@Thyre
Copy link
Contributor Author

Thyre commented Nov 20, 2024

@boegel If you find any time for a short review, can you look over this PR?
I think the changes in the EasyBlocks are straight-forward, but the changes here (especially the tests) might require one or two revisions

@boegel boegel changed the title EasyBlock: Allow to pass logfile from other EasyBlock enhance EasyBlock class to allow passing in logfile Dec 3, 2024
@boegel boegel added this to the release after 4.9.4 milestone Dec 3, 2024
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 merged commit a0f8b99 into easybuilders:develop Dec 3, 2024
37 checks passed
@boegel
Copy link
Member

boegel commented Dec 3, 2024

@boegel If you find any time for a short review, can you look over this PR? I think the changes in the EasyBlocks are straight-forward, but the changes here (especially the tests) might require one or two revisions

Looks great to me, I didn't see anything that would need to be changed...

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