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

edit-user: make fairshare an editable field for an association #569

Merged
merged 3 commits into from
Jan 29, 2025

Conversation

cmoussa1
Copy link
Member

Problem

Since admins are the only ones who have privileges to run the edit-user command, they should be able to edit the fairshare column for an association manually if they so choose, but there is currently no way to do so via edit-user; they have to connect to a SQLite shell and create and execute a SQL statement to update the column manually.


This PR makes the fairshare column an optional argument in the edit-user command. I've updated the fairshare column in the association_table to match the other editable fields, as well as added a unit and sharness test.

@cmoussa1 cmoussa1 added improvement Upgrades to an already existing feature commands related to the flux-accounting commands/bindings database related to the flux-accounting database labels Jan 28, 2025
Copy link
Member

@jameshcorbett jameshcorbett left a comment

Choose a reason for hiding this comment

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

👍

Problem: The "fairshare" column in the association_table should be made
an editable column by admins, but right now it doesn't have the right
infrastructure in the database to do so because there is no reset of a
value in the case where a 'NOT NULL' constraint fails, similar to the
other editable fields in the association_table.

Add a "ON CONFLICT" clause to the fairshare column in the
association_table to match the other editable fields. Update the DB
schema to reflect the update to the association_table.
Problem: Since admins are the only ones who have privileges to run the
edit-user command, they should be able to edit the fairshare column for
an association manually if they so choose, but there is currently no
way to do so via flux-accounting command; they have to connect to a
SQLite shell and create and execute a SQL statement to update the
column manually.

Add the fairshare column as an editable field in the edit-user command.
Problem: There exists no tests for editing the fairshare column for an
association.

Add some basic unit and sharness tests.
@cmoussa1 cmoussa1 force-pushed the add.edit.fair-share branch from 0290841 to c291557 Compare January 29, 2025 02:00
@cmoussa1
Copy link
Member Author

Thanks @jameshcorbett! Rebased to catch up after #570; setting MWP here

@mergify mergify bot merged commit 3a250a0 into flux-framework:master Jan 29, 2025
13 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
commands related to the flux-accounting commands/bindings database related to the flux-accounting database improvement Upgrades to an already existing feature merge-when-passing
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants