astarte-platform / astarte

Core Astarte Repository
https://docs.astarte-platform.org/
Apache License 2.0
240 stars 46 forks source link

Payload for server owned interfaces missing the timestamp #785

Open sorru94 opened 1 year ago

sorru94 commented 1 year ago

The timestamp seems missing in the payload for a publish on a server-owned interface.

This has been observed in the end-to-end tests for the Astarte device SDK python. Report from this run could be helpful. The interface org.astarte-platform.python.e2etest.ServerDatastream contains half of the endpoints with explicit_timestamp set to true and half with it set to false.

rbino commented 1 year ago

I think the actual underlying issue is that we're accepting explicit_timestamp for server-owned interfaces while there's no actual way of sending an explicit timestamp to them from AppEngine API. explicit_timestamp was designed to provide devices a way to provide an application-specific timestamp to attach to a piece of data, which could possibly be different from the clock timestamp. Does this make sense for server-owned interfaces too? It's open to discussion, but since in the current state there's no actual way to send explicit timestamps for them, I'd suggest to refute explicit_timestamp on server-owned interfaces so we don't provide false hopes to the users. We can always start accepting it if and when we actually have support for it.