Open reubenmiller opened 5 months ago
The PR introducing support for log and config operation workflows, also introduced a regression bypassing file cache for config update.
We must re-introduce this ability:
Introduce a new file_cache
operation:
te/<entity-id>/cmd/file_cache/<request-id>
with a payload { "status": "init", "remote_url": "<remote-url>" }
{ "status": "successful", "remote_url": "<remote-url>", "local_url": "<local-url>" }
.Pros:
file_cache
operation can be triggered as a sub-operation from a workflowCons:
Alternatives:
te/device/main///req/file-cache
and te/device/main///res/file-cache
202 (Accepted)
and polling?202 (Accepted)
and MQTT messaging ?This is not a true command: there is no capability message and its execution model is unusual (handled by the main agent whatever the requesting device).
Technically, there is nothing stopping the component from publishing a capability message, as that would have the benefit of formerly declaring the ability to provide a caching functionality, so that components know whether they should try to create the operation message or not
Is your feature improvement request related to a problem? Please describe.
Installing firmware/software/configuration on child devices requires the child device to download the given url directly from the internet, or via the c8y proxy service (which requires internet). Both of these downloads means that the child device needs to support retries and resuming of the download which is sometimes not feasible for devices such as microcontrollers.
Describe the solution you'd like
thin-edge.io should support a mechanism where the child device can request thin-edge.io to download and cache the artifact so that the child device only has to download the artifact via a local cache.
The caching mechanism should be supported on any of the commands (e.g. firmware/software/configuration).
Describe alternatives you've considered
Additional context