Open lunaris opened 1 week ago
Apologies, I completely missed pf
. This is interesting because currently we have ProviderWithContext
, but now that all the methods have been standardised to take a Context
, we might be able to do away with this entire concept, maybe?
Apologies, I completely missed
pf
. This is interesting because currently we haveProviderWithContext
, but now that all the methods have been standardised to take aContext
, we might be able to do away with this entire concept, maybe?
Making an internal thread public:
ProviderWithContext can and should be removed with the new signatures. I originally redid plugin.Provider because I was tired of plumbing changes through ProviderWithContext. The bridge actually has a fork of some of plugin (here), which I’m hoping we can now remove.
Any PR that you open which gets the bridge compiling against latest pu/pu would be welcome! That said, the more of the plugin folder you can remove from the bridge, the better.
I've made some progress on this, but probably still need a few pointers. I've removed pf/internal/plugin
and made provider
an instance of plugin.Provider
by tweaking the method signatures appropriately. This all appears to type check fine. However, the tests fail. I suspect this is down to two things:
configEncode
to handle unmarshalling in CheckConfig
/DiffConfig
. I don't know if there is a natural way to port this behaviour under plugin.Provider
-- if there is, can someone advise? If not, I guess we will be unable to use plugin.NewProviderServer
as-is and have to wrap it still?Of course it's possible there are other problems/things I've missed -- all input welcome!
This commit bumps the bridge to use the latest available version of Pulumi core. The most notable change here is that provider method signatures now accept a
context.Context
, meaning that we can deprecate the bridge's forkedProviderWithContext
interface and methods.