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

Fix metric explorer metric and dimension display bug. #1046

Merged
merged 1 commit into from
Sep 17, 2019

Conversation

jpwhite4
Copy link
Member

The metric explorer uses a renderer to convert the internal ids to
the human readable values for many of the combo boxes. The lookup
function was incorrectly using the store.find() call which only
performs a substring match. In the observed case the defined metrics
were:

job_count_bad => 'Number of Inefficient Jobs'
job_count => 'Number of Jobs'

so when the code looked up the text for the job_count metric
the find() function would match the job_count_bad string
and the wrong text would be displayed.

This bug has been in the system forever. Why have we not noticed
it before. Well the backend code sorts the data
so that the human readable strings appear in alphabetical order. So
for example the resource / resource_type group by ends up sorted in the
following order:

resource => 'Resource'
resource_type => 'Resource Type'

therefore resource appears in the list first and a substring lookup
for resource returns the expected value. So, by luck most of the
cases do not happen. The only one I found is the SUPREMM Requested Wall
Hours Per Job and Requested Wall Hours: Total.

An even more curious reader might ask why updates to the JobEfficiency
realm would impact the job data. Well the code in the metric explorer
ignores the realm when building the list of statistics. So if two
different realms have the same metric then the text description for the
first one wins. In this case JobEfficiency is before Jobs in the
alphabet.

Before:
image

After:
image

The metric explorer uses a renderer to convert the internal ids to
the human readable values for many of the combo boxes. The lookup
function was incorrectly using the store.find() call which only
performs a substring match. In the observed case the defined metrics
were:

job_count_bad => 'Number of Inefficient Jobs'
job_count   => 'Number of Jobs'

so when the code looked up the text for the job_count metric
the find() function would match the job_count_bad string
and the wrong text would be displayed.

This bug has been in the system forever. Why have we not noticed
it before. Well the backend code sorts the data
so that the human readable strings appear in alphabetical order. So
for example the resource / resource_type group by ends up sorted in the
following order:

resource => 'Resource'
resource_type => 'Resource Type'

therefore resource appears in the list first and a substring lookup
for resource returns the expected value. So, by luck most of the
cases do not happen. The only one I found is the SUPREMM Requested Wall
Hours Per Job and Requested Wall Hours: Total.

An even more curious reader might ask why updates to the JobEfficiency
realm would impact the job data. Well the code in the metric explorer
ignores the realm when building the list of statistics. So if two
different realms have the same metric then the text description for the
first one wins. In this case JobEfficiency is before Jobs in the
alphabet.
@jpwhite4 jpwhite4 added this to the 8.5.0 milestone Sep 17, 2019
@jpwhite4 jpwhite4 added bug Bugfixes Category:Metric Explorer Metric Explorer / Usage labels Sep 17, 2019
@jpwhite4 jpwhite4 merged commit ed6dcf9 into ubccr:xdmod8.5 Sep 17, 2019
@jpwhite4 jpwhite4 deleted the metric_display branch September 17, 2019 15:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Bugfixes Category:Metric Explorer Metric Explorer / Usage
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants