I’m going to try and create an open source library...
# general
f
I’m going to try and create an open source library of dynamic providers for interacting with Bitbucket. It’ll do what the GitHub provider does but for Bitbucket since BB isn’t in the pulumi registry. I’m not finding many thorough examples of testing using python/pytest, especially nothing with dynamic resources. Do you know of an example project I could look at with tests (unit, integration, functional) for dynamic resources in python? We’ll try to make the coverage and quality good so that the community can use this library.
b
@fierce-xylophone-92490 it’s almost certainly easier to bridge the bitbucket provider
f
The terraform one, you mean?
I and my team don’t know Go, so I worry that that would be far outside our skill set.
b
you actually don’t need to know a whole lot of go except module management, but that’s valid. I’ll see if I can try bridge one tomorrow
f
If you can make your work public I’d love to read through it.
Any thoughts on testing dynamic resources? I’m thinking I’ll start with functional tests and just try to create the resources with the automation API—then hit them with API calls to assert facts about them.
b
there are a bunch here: https://github.com/lbrlabs/
I generally try avoid dynamic resources personally, so not much I can help with there
f
Thanks! Do they have downsides besides not being language agnostic?
e
Do they have downsides besides not being language agnostic?
That's the big one, it limits your provider to only being used by python users, while a non-dynamic provider can generate SDKs for every language. They're also relying on closure serialisation to work, which when it works is awesome but is a nightmare to debug when it doesn't work (this isn't unique to Pulumi, we're just using cloudpickle internally). They're also highly coupled to the SDK version which makes it very hard for us to update them. We've been looking at doing new dynamic providers that would be a separate library with their own update cadence but it's not been deemed a high enough priority to commit to yet.