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

[8.17] [ML] Trained Models: fix NaN in a progress bar during the download task initialization (#201221) #201342

Merged
merged 1 commit into from
Nov 22, 2024

Conversation

kibanamachine
Copy link
Contributor

Backport

This will backport the following commits from main to 8.17:

Questions ?

Please refer to the Backport tool documentation

…task initialization (elastic#201221)

## Summary

When we request a status of the download task right after initializing a
download, `total_parts` might be returned with a `0` value, hence
dividing by 0 for the progress bar causing in `NaN%` value rendered.
This PR adds a fallback to `-1` for that, to make sure we render 0%.

### Checklist

- [ ] [Unit or functional
tests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)
were updated or added to match the most common scenarios

(cherry picked from commit 639c9b7)
@peteharverson peteharverson changed the title [8.17] [ML] Trained Models: fix `NaN` in a progress bar during the download task initialization (#201221) [8.17] [ML] Trained Models: fix NaN in a progress bar during the download task initialization (#201221) Nov 22, 2024
@kibanamachine kibanamachine merged commit e3c75d1 into elastic:8.17 Nov 22, 2024
24 checks passed
@elasticmachine
Copy link
Contributor

💚 Build Succeeded

Metrics [docs]

Async chunks

Total size of all lazy-loaded chunks that will be downloaded as the user navigates the app

id before after diff
ml 4.7MB 4.7MB +6.0B

cc @darnautov

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants