Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ics receives and returns second-precision timestamps #697

Merged
merged 4 commits into from
Jan 10, 2024

Conversation

jeffgrunewald
Copy link
Contributor

@jeffgrunewald jeffgrunewald commented Jan 3, 2024

per the iot-config service proto definitions comments, the expected input timestamps for rpc requests are in millisecond precision but the responses are in second precision. this pushes the two into alignment so responses are now also in millisecond second precision.

doesn't require helium/proto#383 as the data type from the perspective of the proto definitions is unchanged but should be aligned shortly to provide clarity for rpc consumers

@jeffgrunewald jeffgrunewald force-pushed the jg/fix-ics-timestamps branch from 15f28a8 to 7fba12a Compare January 9, 2024 14:36
@jeffgrunewald jeffgrunewald merged commit 0225ebf into main Jan 10, 2024
1 check passed
@jeffgrunewald jeffgrunewald deleted the jg/fix-ics-timestamps branch January 10, 2024 22:41
@jeffgrunewald jeffgrunewald changed the title ics returns responses with millisecond timestamps ics receives and returns second-level timestamps Jan 11, 2024
@jeffgrunewald jeffgrunewald changed the title ics receives and returns second-level timestamps ics receives and returns second-precision timestamps Jan 11, 2024
@ccall48
Copy link

ccall48 commented Jan 12, 2024

Sorry I missed this...

Just to clarify, second and millisecond precision will both be accepted or do I have to recode all the iot rpc's to be second precision now?

@jeffgrunewald
Copy link
Contributor Author

Sorry I missed this...

Just to clarify, second and millisecond precision will both be accepted or do I have to recode all the iot rpc's to be second precision now?

@ccall48 at the moment there's no change necessary on your end as the iot-config service is not validating the timestamps it's receiving with incoming rpc requests. They're still just uint64s. The only rpc that is changing how it interprets that timestamp uint64 is one that is only available to HPR.

That being said, I would advise putting it in your backlog to recode your IoT rpcs to second-level precision as we have it planned (as yet unprioritized) to validate timestamps on incoming requests are "fresh" (received within a minimal number of seconds of generation) to prevent replays or stale data populating the config service. That will have much bigger/earlier communication publicly since it would require changes by consumers of the api like yourself. Fair?

@ccall48
Copy link

ccall48 commented Jan 12, 2024

Ok thanks Jeff, i was already sending them with signed time as millisecond precision. if i can switch all these to be second precision before this is enforced on the iot side this should be fine.

Thank you for the clarification.

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.

4 participants