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

feat(slurm_ops): add acct_gather.conf configuration file editor to SlurmctldManager #56

Merged

Conversation

NucciTheBoss
Copy link
Member

This PR adds an attribute for managing the acct_gather.conf configuration file to the SlurmctldManager class. This attribute can then be used to handle changes related to configuring an acct_gather plugin from within the slurmctld charm. Having the editor be available will be necessary for re-enabling InfluxDB support in the Slurm charms.

Bumps the version of slurm_ops to 0.9.

@NucciTheBoss NucciTheBoss added the enhancement New feature or request label Dec 4, 2024
Copy link

@dsloanm dsloanm left a comment

Choose a reason for hiding this comment

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

LGTM

contents=EXAMPLE_ACCT_GATHER_CONFIG,
)

def test_config(self) -> None:
Copy link

Choose a reason for hiding this comment

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

Might be cleaner to split this into multiple tests. There's a lot of asserts in this function.

Copy link
Member Author

Choose a reason for hiding this comment

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

I have it like this as slurmutils should be responsible for testing the nitty gritty of each editor/model with individual test functions. These unit tests are more or less for testing that we don't break the API for managing Slurm configs with slurm_ops.

If anything, we could probably make the tests shorter. The only thing is that we still have to be clever with mocking the uid and gid of the file as pyfakes doesn't provide any abstractions for doing that.

@NucciTheBoss NucciTheBoss merged commit 507cd5f into charmed-hpc:main Dec 5, 2024
4 checks passed
@NucciTheBoss NucciTheBoss deleted the nuccitheboss/feat/acctgatherconfig branch December 11, 2024 18:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants