Undesirable Behaviour in functions.status_print #36

Closed
opened 2022-11-11 03:19:54 +00:00 by ZAdamMac · 1 comment
ZAdamMac commented 2022-11-11 03:19:54 +00:00 (Migrated from github.com)

Describe the bug
Status print currently contains a bug where it is rounding up the completion percentage. While this may initially be desirable for very lengthy operations to get as soon as possible to 1%, it causes an issue where the percentage can become 100% well before the round is actually complete.

When this happens the console is spammed repeatedly with DONE! messages even though the operation is not done, each on its own new line.

To Reproduce
Steps to reproduce the behavior:

  1. Perform a backup against a sufficiently large (say, 300 item) number of files.
  2. Observe.

Expected behavior
The 100% - Done message should only be shown on the final operation in the queue.

Log/Console Output
Packing: [###############] 100% - Done!
Packing: [###############] 100% - Done!
Packing: [###############] 100% - Done!
Packing: [###############] 100% - Done!
Packing: [###############] 100% - Done!
Packing: [###############] 100% - Done!
Packing: [###############] 100% - Done!
Packing: [###############] 100% - Done!
Packing: [###############] 100% - Done!
Packing: [###############] 100% - Done!

Desktop (please complete the following information):

  • OS: Ubuntu 22.04.1 LTS
  • Tapestry Version: 2.1.1 and later.

Additional context
This is probably a minor fix along with the other issues described here, which came from working with production data. Its own minor release is not required if all of the open tickets can be closed reasonably close together.

**Describe the bug** Status print currently contains a bug where it is rounding *up* the completion percentage. While this may initially be desirable for very lengthy operations to get as soon as possible to 1%, it causes an issue where the percentage can become `100%` well before the round is actually complete. When this happens the console is spammed repeatedly with `DONE!` messages even though the operation is not done, each on its own new line. **To Reproduce** Steps to reproduce the behavior: 1. Perform a backup against a sufficiently large (say, 300 item) number of files. 2. Observe. **Expected behavior** The 100% - Done message should only be shown on the final operation in the queue. **Log/Console Output** Packing: [###############] 100% - Done! Packing: [###############] 100% - Done! Packing: [###############] 100% - Done! Packing: [###############] 100% - Done! Packing: [###############] 100% - Done! Packing: [###############] 100% - Done! Packing: [###############] 100% - Done! Packing: [###############] 100% - Done! Packing: [###############] 100% - Done! Packing: [###############] 100% - Done! **Desktop (please complete the following information):** - OS: Ubuntu 22.04.1 LTS - Tapestry Version: 2.1.1 `and later`. **Additional context** This is probably a minor fix along with the other issues described here, which came from working with production data. Its own minor release is not required if all of the open tickets can be closed reasonably close together.
ZAdamMac commented 2023-06-02 16:31:27 +00:00 (Migrated from github.com)

corrected in commit 3d85d48

corrected in commit 3d85d48
This discussion has been locked. Commenting is limited to contributors.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
zadammac/Tapestry#36
No description provided.