When a module-file is uploaded, check for matching deployments which are using the module and deploy to the devices (again).
There seemed to be no need to alter supervisor for this, as redeploying this way replaces the instructions with the same ones, but fetches new files from orchestrator as usual.
Tested by:
Set up two supervisor devices s1 and s2
Create two "different" fibo modules m1 and m2 uploading the fibo.wasm file to them like normal
Create three deployments (d1, d2, d3):
d1 deploys to s1 with m1 fibo
d2 deploys to s1 with m2 fibo
d3 deploys to s2 with m2 fibo
Deploy all three
s1 and s2 now share the module m2
Check that all deployments execute fibo function succesfully
Upload e.g. camera.wasm which does not contain fibo function to m1
Check that d2 and d3 still succeed with fibo, but d1 fails (because the newly updated .wasm does not contain fibo)
Result is, that the module m1 was replaced at the correct device on the correct deployment when m1 was "updated" at the orchestrator
When a module-file is uploaded, check for matching deployments which are using the module and deploy to the devices (again).
There seemed to be no need to alter supervisor for this, as redeploying this way replaces the instructions with the same ones, but fetches new files from orchestrator as usual.
Tested by:
fibo.wasm
file to them like normalcamera.wasm
which does not contain fibo function to m1.wasm
does not contain fibo)