Harmony 1963 - data size change information in job status page#710
Merged
indiejames merged 10 commits intomainfrom Mar 10, 2025
Merged
Harmony 1963 - data size change information in job status page#710indiejames merged 10 commits intomainfrom
indiejames merged 10 commits intomainfrom
Conversation
ygliuvt
reviewed
Mar 6, 2025
| } else if (diff > 0) { | ||
| let percent = (diff / sizes.originalSize * 100.0).toFixed(precision); | ||
| // due to JS precision issues, big changes will appear to be 100% reduction, which is impossible | ||
| if (percent === '100.00') percent = '99.99'; |
Member
There was a problem hiding this comment.
nit: This will not work if the precision is not the default (2).
Contributor
Author
There was a problem hiding this comment.
Good catch. Fixed and test added.
chris-durbin
reviewed
Mar 6, 2025
Contributor
chris-durbin
left a comment
There was a problem hiding this comment.
My initial reaction is that I think we need to store these values and calculate them once.
- Work items are transient (they get cleaned up after a job completes based on a configuration interval).
- Calculating it on every call to get the job status for a completed request could be slow for something with a lot of granules.
| hookTransaction(); | ||
| before(async function () { | ||
| await aJob.save(this.trx); | ||
| console.log(`JOB ID: ${aJob.jobID}`); |
Contributor
Author
Done |
chris-durbin
approved these changes
Mar 10, 2025
Contributor
chris-durbin
left a comment
There was a problem hiding this comment.
Tested successfully locally.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Jira Issue ID
HARMONY-1963
Description
Adds information about data size change from original to output
Local Test Steps
Run a few queries and look at the job status pages. Verify that the size information is at the bottom. For example
Make sure the size change looks right.
PR Acceptance Checklist
Documentation updated (if needed)Harmony in a Box tested (if changes made to microservices or new dependencies added)