https://pulumi.com logo
#general
Title
# general
f

fierce-xylophone-92490

10/07/2022, 2:24 AM
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

billowy-army-68599

10/07/2022, 2:46 AM
@fierce-xylophone-92490 it’s almost certainly easier to bridge the bitbucket provider
f

fierce-xylophone-92490

10/07/2022, 2:47 AM
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

billowy-army-68599

10/07/2022, 2:54 AM
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

fierce-xylophone-92490

10/07/2022, 2:57 AM
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

billowy-army-68599

10/07/2022, 3:03 AM
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

fierce-xylophone-92490

10/07/2022, 3:04 AM
Thanks! Do they have downsides besides not being language agnostic?
e

echoing-dinner-19531

10/07/2022, 9:02 AM
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.