Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
[WIP] safer task results #32480
What is this trying to fix?
Does TaskResult need to return the same class types?
Task/Host classes seem like they should be responsible for providing
I'm trying to avoid having callbacks influence play behaviour, currently they can alter the actual play objects in ways that user would not be able to easily audit, those behaviors should be apparent in playbook itself. This also can be a security issue once callbacks are easier to install, it is better to have the locks in the engine than the callbacks themselves.
As for class types, this is due to some checks in callbacks, not sure if we can/should support that though, i'm still trying to figure out the happy medium.
That is what taskresult itself does, but I was looking for 'shorter' approach than having to create 'data only' shims for every class.
I've been thinking about this and I'm no longer sure that we should do this because it is a backwards incompatible change. In our tree we only use callbacks for display but 3rd parties could be using those objects to make changes or other introspection that needs the original objects. We need to decide if this is something we feel we can break backwards compatibility on immediately or if we should take a different strategy.