New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[WIP] safer task results #32480
base: devel
Are you sure you want to change the base?
[WIP] safer task results #32480
Conversation
The test
|
The test
|
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 |
|
||
|
||
class Chameleon(object): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These (Chameleon, data_object_shim) are kind of unusual classes and method. So the comments/commit msgs need to explain why they are needed and how they accomplish that and why normal approaches are not applicable.
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. |
The test
|
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. |
SUMMARY
Pass scaled down objects with needed data, but w/o methods
ISSUE TYPE
COMPONENT NAME
task result
ANSIBLE VERSION