Closed iwahbe closed 2 months ago
What's the test plan here?
What's the test plan here?
I'm trying to determine the correct behavior before adding tests. We will definitely need tests before merging.
Tests have been added. I think this is ready to merge.
Nit: I would rename the PR to drop "at the provider level", looks like this introduces support for the Call gRPC method which is great.
One important question is instance lifetime. When a client issues a series of Call methods against a resource with the same URN, is there a possibility for the provider author to rely on the retention of in-memory instance state across the series of calls?
const c = new Counter()
c.increment()
c.increment()
export const n = c.curentValue /// 2
To achieve the above UX would it be possible for the implementation to be equally simple?
Corner cases to think of (perhaps handled already in this codebase).
Does Call issue during preview. If so how are unknowns handled?
If there are schema-level or first-class secrets, does the implementation guarantee reasonable secret wrapping.
Corner cases to think of (perhaps handled already in this codebase).
- Does Call issue during preview. If so how are unknowns handled?
- If there are schema-level or first-class secrets, does the implementation guarantee reasonable secret wrapping.
pulumi.Output
), so it unknowns should just flow through.infer
).One important question is instance lifetime. When a client issues a series of Call methods against a resource with the same URN, is there a possibility for the provider author to rely on the retention of in-memory instance state across the series of calls?
const c = new Counter() c.increment() c.increment() export const n = c.curentValue /// 2
To achieve the above UX would it be possible for the implementation to be equally simple?
I believe that this is possible now, though I would discourage relying on it. AFAIK the protocol does not make any guarantees about number of provider instances, or the order of calls. In theory, both c.increment()
s could be called in parallel.
This PR has been shipped in release v0.22.0.
This PR has been shipped in release v0.23.0.
This PR adds support for the
Call
gRPC method at the top levelProvider
struct.