You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
By inserting a log statement into /var/www/ood/apps/sys/dashboard/app/lib/smart_attributes/attributes/auto_qos.rb, I got the list of options for the widget, and I see the issue:
These QOSes are available to my user from multiple slurm accounts. I'm not sure what is the significance of option-for-auto-accounts-*, but I would think that they can be combined into the same list.
--- /var/www/ood/apps/sys/dashboard.bak/app/lib/smart_attributes/attributes/auto_qos.rb 2024-10-22 20:29:51.000000000 +0000+++ /var/www/ood/apps/sys/dashboard/app/lib/smart_attributes/attributes/auto_qos.rb 2024-11-06 06:08:37.187317768 +0000@@ -12,11 +12,20 @@
# @param opts [Hash] attribute's options
# @return [Attributes::AutoQueues] the attribute object
def self.build_auto_qos(opts = {})
-+ # don't add the same QOS to options multiple times with different data options,+ # just combine the data options+ deduped_dynamic_qos = []+ dynamic_qos.each do |dynamic_qos_element|+ found = deduped_dynamic_qos.find { |x| x[0, 2] == dynamic_qos_element[0, 2] }+ if found+ found.concat(dynamic_qos_element[2..])+ else+ deduped_dynamic_qos.append(dynamic_qos_element)+ end+ end
static_opts = {
- options: dynamic_qos+ options: deduped_dynamic_qos
}.merge(opts.without(:options).to_h)
Attributes::AutoQos.new('auto_qos', static_opts)
end
end
Thanks for the issue. I think it should deduplciate here in OnDemand itself when it has to stitch it all together. I can't say for sure I can get this into 4.0, but I can try.
Thanks again for the ticket. I guess I missed your note about patching it. In any case, I updated the logic in dynamic_qos directly instead of modifying the smart attribute there.
At any rate, thanks for opening the ticket and providing a solution (even if I missed it)!
By inserting a log statement into
/var/www/ood/apps/sys/dashboard/app/lib/smart_attributes/attributes/auto_qos.rb
, I got the list of options for the widget, and I see the issue:{:options=>[[\"long\", \"long\", {\"data-option-for-auto-accounts-pi_tbernard_umass_edu\"=>false}], [\"normal\", \"normal\", {\"data-option-for-auto-accounts-pi_tbernard_umass_edu\"=>false}], [\"short\", \"short\", {\"data-option-for-auto-accounts-pi_tbernard_umass_edu\"=>false}], [\"long\", \"long\", {\"data-option-for-auto-accounts-pi_simonleary_umass_edu\"=>false}], [\"normal\", \"normal\", {\"data-option-for-auto-accounts-pi_simonleary_umass_edu\"=>false}], [\"short\", \"short\", {\"data-option-for-auto-accounts-pi_simonleary_umass_edu\"=>false}]]}
These QOSes are available to my user from multiple slurm accounts. I'm not sure what is the significance of
option-for-auto-accounts-*
, but I would think that they can be combined into the same list.looking good.
{:options=>[[\"long\", \"long\", {\"data-option-for-auto-accounts-pi_tbernard_umass_edu\"=>false}, {\"data-option-for-auto-accounts-pi_simonleary_umass_edu\"=>false}], [\"normal\", \"normal\", {\"data-option-for-auto-accounts-pi_tbernard_umass_edu\"=>false}, {\"data-option-for-auto-accounts-pi_simonleary_umass_edu\"=>false}], [\"short\", \"short\", {\"data-option-for-auto-accounts-pi_tbernard_umass_edu\"=>false}, {\"data-option-for-auto-accounts-pi_simonleary_umass_edu\"=>false}]]}"
I would submit this as a merge request but I feel like this deduplication should actually happen in OOD core.
The text was updated successfully, but these errors were encountered: