flux-framework / flux-core

core services for the Flux resource management framework
GNU Lesser General Public License v3.0
167 stars 50 forks source link

python/job: support `unit` key conversions in `Jobspec.resource_counts` method #2576

Open SteVwonder opened 4 years ago

SteVwonder commented 4 years ago

As noted in https://github.com/flux-framework/flux-core/pull/2534#discussion_r356903483, the Jobspec.resource_counts method just ignores the unit and sums the counts as-is.

An initial first improvement could be to convert between B, KB, MB, GB, etc. and log a warning/throw an exception if an unknown unit is encountered.

There is a broader discussion about the valid values of the key in the RFC repo: https://github.com/flux-framework/rfc/issues/218

stale[bot] commented 3 years ago

This issue has been automatically marked as stale because it has not had activity for 365 days. It will be closed if no further activity occurs within 14 days. Thank you for your contributions.