Hello! In developing some custom python Components...
# general
Hello! In developing some custom python Components, I realized
does very little for sharing outputs of the Component. As discussed here: https://github.com/pulumi/pulumi/issues/2653. That’s fine and makes sense (kind of lol). My question is, is there actually anything wrong/dangerous with calling
within a Component, instead of in the main program, other than the Component consumer may not actually want that export?
It breaks all hope of unit testing the component..
export is really for stack outputs, so you probably don't want to be calling that in components.
That’s what I figured. thanks. Would it be helpful or is there any interest in somehow making that preventable?
Linting tools help with that, if it's important to you. And code reviews. I have a code standard that no external interfaces (config, stack references, other components, etc.) are allowed in components we write, other than the component's core purpose and logging. We rely only on code reviews to enforce this. It's working fine so far.