This repository has been archived by the owner on Jun 13, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 105
Remove module inheritance #36
Labels
Comments
The |
Akasurde
added a commit
to Akasurde/community.kubernetes
that referenced
this issue
Aug 20, 2020
Partially fix ansible-collections#36 Signed-off-by: Abhijeet Kasurde <[email protected]>
Akasurde
added a commit
to Akasurde/community.kubernetes
that referenced
this issue
Aug 24, 2020
Partially fix ansible-collections#36 Signed-off-by: Abhijeet Kasurde <[email protected]>
Akasurde
added a commit
to Akasurde/community.kubernetes
that referenced
this issue
Aug 24, 2020
Partially fix ansible-collections#36 Signed-off-by: Abhijeet Kasurde <[email protected]>
Akasurde
added a commit
to Akasurde/community.kubernetes
that referenced
this issue
Aug 26, 2020
Partially fix ansible-collections#36 Signed-off-by: Abhijeet Kasurde <[email protected]>
Akasurde
added a commit
to Akasurde/community.kubernetes
that referenced
this issue
Aug 26, 2020
Partially fix ansible-collections#36 Signed-off-by: Abhijeet Kasurde <[email protected]>
Akasurde
added a commit
to Akasurde/community.kubernetes
that referenced
this issue
Aug 26, 2020
Partially fix ansible-collections#36 Signed-off-by: Abhijeet Kasurde <[email protected]>
Akasurde
added a commit
that referenced
this issue
Aug 26, 2020
Partially fix #36 Signed-off-by: Abhijeet Kasurde <[email protected]>
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
SUMMARY
Currently we have the
KubernetesAnsibleModule
andKubernetesRawModule
that most of our modules inherit from, but this is a bad pattern and has already bitten us with thek8s_scale
module. We have anAnsibleMixin
that works fine, though we should remove the argspec from it.The main reason this pattern is harmful is that parameters are shared across modules, and adding or changing arguments in one will passively propagate to subclasses of that module.
k8s_scale
for example, inherits parameters fromk8s
, and has broken in the past when we added arguments to thek8s
module (issue here). Each module should own the arguments it accepts, and code sharing should be limited to shared utilities rather than module definitions.ISSUE TYPE
The text was updated successfully, but these errors were encountered: