ion icon indicating copy to clipboard operation
ion copied to clipboard

Live workers do not work with RPC calls

Open Ernxst opened this issue 1 year ago • 4 comments

Relating to #321, it seems live workers do not work when calling other RPC workers (sst v0.0.330).

Steps to reproduce:

  1. Clone repo
  2. Set environment variables and install providers (with sst install)
  3. Run sst dev
  4. Add a log statement in the handler of packages/functions/src/workerA.ts
  5. Invoke the url of WorkerA

The corresponding log statement is not present in the terminal where sst dev is running, hence, I can only assume the request wasn't proxied to my machine and it invoked the deployed (now older) version instead. WorkerA calls WorkerB via workers RPC - I see live changes to my workers after removing the call to WorkerB. Assuming this is a bug and gets fixed, am I right in assuming that making a change in WorkerB will not be reflected when invoking WorkerA, since it's called over RPC, instead of HTTP?

Interestingly, when calling the fetch method of WorkerB instead, both workers are live (I observe changes made to either worker).

Ernxst avatar Apr 29 '24 19:04 Ernxst