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

[BUG] analysis tool cannot handle a job with no tasks. #3364

Closed
revans2 opened this issue Sep 1, 2021 · 2 comments · Fixed by #3342
Closed

[BUG] analysis tool cannot handle a job with no tasks. #3364

revans2 opened this issue Sep 1, 2021 · 2 comments · Fixed by #3342
Labels
bug Something isn't working

Comments

@revans2
Copy link
Collaborator

revans2 commented Sep 1, 2021

Describe the bug
In Analysis.jobAndStageMetricsAggregation there is a bunch of code to do aggregations and they all have this Option pattern when doing the aggregations. But the problem is Option only becomes a None if a null is passed in. We are not passing in nulls in this case, we are passing in an empty ArrayBuffer if there are no tasks. For the sum aggregations it is not a problem and they still output 0 when summing an empty list. But for max it throws an error. We need an alternative way to compute the max and return 0 when there are no values. The Option code is doing nothing because there is no way to return a null from tasksInJob.map(_.SOMETHING) if tasksInJob is empty you get an empty list. If it is null you get an NPE from trying to call map on it.

@revans2 revans2 added bug Something isn't working ? - Needs Triage Need team to review and classify labels Sep 1, 2021
@tgravescs
Copy link
Collaborator

this is actually fixed in #3342.. well at least the option pattern thing.

We should test with that patch.

@revans2
Copy link
Collaborator Author

revans2 commented Sep 2, 2021

I just tested with #3342 and it does fix this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants