Fix unixtime() E notation issue caused by protobuf float64 conversion#158
Merged
Fix unixtime() E notation issue caused by protobuf float64 conversion#158
Conversation
This comment has been minimized.
This comment has been minimized.
1 similar comment
This comment has been minimized.
This comment has been minimized.
protobuf.Struct converts all numbers to float64, which causes large integers like Unix timestamps to display in E notation (1.767851301e+09). Add convertFloatToInt function to restore integer types after AsMap() conversion from protobuf.Struct. Also update parseExitStatus and retry logic to handle int64 type, which is now returned by convertFloatToInt instead of float64. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
7694cb5 to
0529ecc
Compare
This comment has been minimized.
This comment has been minimized.
Code Metrics Report
Details | | main (b2c67ea) | #158 (d1409e6) | +/- |
|---------------------|----------------|----------------|-------|
+ | Coverage | 55.1% | 55.3% | +0.1% |
| Files | 65 | 65 | 0 |
| Lines | 6536 | 6563 | +27 |
+ | Covered | 3607 | 3633 | +26 |
+ | Code to Test Ratio | 1:1.0 | 1:1.0 | +0.0 |
| Code | 12846 | 12892 | +46 |
+ | Test | 13180 | 13267 | +87 |
+ | Test Execution Time | 24s | 23s | -1s |Code coverage of files in pull request scope (58.2% → 60.5%)
Reported by octocov |
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.
This is for #157
unixtime()and other large integers displaying as E notation (e.g.,1.767851301e+09instead of1767851301)FlattenInterfacetostructpb.NewStruct, which converts all numbers tofloat64per protobuf specconvertFloatToIntfunction to restore integer types afterAsMap()conversionTest plan
convertFloatToIntfunctionunixtime()in HTTP body🤖 Generated with Claude Code