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

plugin: improve callback for job.new #421

Merged
merged 2 commits into from
Feb 20, 2024

Conversation

cmoussa1
Copy link
Member

Background

Continuing the cleanup and abstraction of the code within the priority plugin, this time for the job.new callback.


This PR cleans up the callback for job.new by using the new external functions that perform lookups of an association. It removes unused variables from the function. It also adds a function description at the top and some additional comments within the function. Finally, it fixes some misaligned and extra whitespace.

Fixes #419

Problem: The callback for job.new still performs a manual lookup of an
Association, but there now exists external functions defined in
accounting.cpp that the callback should make use of. It is also lacking
a function description and has some leftover variables that are
unutilized.

Clean up this function by using the new external functions that perform
lookups of an association. Remove unused variables from the function.
Add a function description at the top.
Problem: The job.new callback has some extra whitespace and misaligned
indention.

Remove the extra whitespace and fix the misaligned indentation.
@cmoussa1 cmoussa1 added improvement Upgrades to an already existing feature plugin related to the multi-factor priority plugin labels Feb 20, 2024
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.

LGTM!

@cmoussa1
Copy link
Member Author

Appreciate it thanks! Setting MWP here

Copy link

codecov bot commented Feb 20, 2024

Codecov Report

Merging #421 (b0995b8) into master (72b0c1a) will increase coverage by 0.05%.
The diff coverage is 100.00%.

Additional details and impacted files
@@            Coverage Diff             @@
##           master     #421      +/-   ##
==========================================
+ Coverage   82.42%   82.48%   +0.05%     
==========================================
  Files          23       23              
  Lines        1457     1439      -18     
==========================================
- Hits         1201     1187      -14     
+ Misses        256      252       -4     
Files Coverage Δ
src/plugins/mf_priority.cpp 82.50% <100.00%> (+0.22%) ⬆️

@mergify mergify bot merged commit b673799 into flux-framework:master Feb 20, 2024
13 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
improvement Upgrades to an already existing feature merge-when-passing plugin related to the multi-factor priority plugin
Projects
None yet
Development

Successfully merging this pull request may close these issues.

job.new: use new external functions for user/bank lookups
2 participants