chip-ingress: newevent - refactor timestamp to millisecond and add 0 check#1576
chip-ingress: newevent - refactor timestamp to millisecond and add 0 check#1576patrickhuie19 merged 3 commits intomainfrom
Conversation
|
👋 engnke, thanks for creating this pull request! To help reviewers, please consider creating future PRs as drafts first. This allows you to self-review and make any final changes before notifying the team. Once you're ready, you can mark it as "Ready for review" to request feedback. Thanks! |
apidiff results - no incompatible changes detected ✅(Full summary: https://github.com/smartcontractkit/chainlink-common/actions/runs/18168857811/#summary-51718230423) |
| "dataschema": "https://example.com/schema", | ||
| "subject": "example-subject", | ||
| "time": time.Now(), | ||
| "time": time.Now().Add(-5 * time.Second), |
There was a problem hiding this comment.
what does adding -5 seconds do?
There was a problem hiding this comment.
Its setting the time attribute to 5 seconds ago.
recordedtime is set by default to time.now and it should always occur after time
There was a problem hiding this comment.
with the change to milliseconds the difference has to be greater for the testcase to pass (line 90)
There was a problem hiding this comment.
ah, so truncating to millisecond causes the test to fail b/c in the older version the nano second difference in time.Now() took care of recordedtime occuring after time?
chip-ingress cloudevent
part of: https://smartcontract-it.atlassian.net/browse/INFOPLAT-3003?focusedCommentId=465270
ask to have timestamp in milliseconds and add nil check for 0 time values showing up