Skip to content

[GOBBLIN-2187] Fix NaN issue while generating size summary#4090

Merged
phet merged 2 commits intoapache:masterfrom
Blazer-007:virai_nan_fix
Jan 6, 2025
Merged

[GOBBLIN-2187] Fix NaN issue while generating size summary#4090
phet merged 2 commits intoapache:masterfrom
Blazer-007:virai_nan_fix

Conversation

@Blazer-007
Copy link
Member

@Blazer-007 Blazer-007 commented Jan 6, 2025

Dear Gobblin maintainers,

Please accept this PR. I understand that it will not be reviewed until I have checked off all the steps below!

JIRA

Description

  • Here are some details about my PR, including screenshots (if applicable):
    when workunit is empty then while serializing wusizesummary GSON throws below exception NaN is not a valid double value as per JSON specification. To override this behavior, use GsonBuilder.serializeSpecialFloatingPointValues() method
    this is coming due to not handling when values are zeros which generates NaN while generating wusizesummary

Tests

  • My PR adds the following unit tests OR does not need testing for this extremely good reason:
    added testDigestWorkUnitsSizeWithEmptyWorkUnits

Commits

  • My commits all reference JIRA issues in their subject lines, and I have squashed multiple commits if they address the same issue. In addition, my commits follow the guidelines from "How to write a good git commit message":
    1. Subject is separated from body by a blank line
    2. Subject is limited to 50 characters
    3. Subject does not end with a period
    4. Subject uses the imperative mood ("add", not "adding")
    5. Body wraps at 72 characters
    6. Body explains "what" and "why", not "how"

@Blazer-007 Blazer-007 changed the title fix nan issue while generating size summary [GOBBLIN-2187] Fix NaN issue while generating size summary Jan 6, 2025
Copy link
Contributor

@phet phet left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nice work - thank you vivek!

@phet phet merged commit 87c8ab4 into apache:master Jan 6, 2025
6 checks passed
@Blazer-007 Blazer-007 deleted the virai_nan_fix branch January 6, 2025 14:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants