Skip to content
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

ClusterInfo v1.3 is not very wieldy and extendible #143

Closed
vogxn opened this issue Mar 11, 2016 · 1 comment
Closed

ClusterInfo v1.3 is not very wieldy and extendible #143

vogxn opened this issue Mar 11, 2016 · 1 comment

Comments

@vogxn
Copy link

vogxn commented Mar 11, 2016

As a part of this commit the ClusterInfoV13 class was introduced to deal with the newer version of the cluster API. The previous form ClusterInfo had setters for each property (spot, security settings, ec2 settings etc) to update the specific parts of the cluster. Eg: If I needed to update only the spot instance properties I had only to call set_spot_instance_settings(..). Now I have to call the long form set_cluster_info(..) on each update. I cannot call the double underscored __set_spot_instance_settings(..) anymore since these are changed into _ClusterInfoV13__set_spot_instance_settings(..) because of python's name mangling. This is supremely frustrating and breaks a lot of test code that we have built up which needs to be rewritten as __Cluster_set_spot_instance_settings(..) or the long form update Cluster.set_cluster_info(..) for each update call to a cluster object.

Is it possible to convert these setters to @property-ies because that's how setters are exposed in Python. Was there a strong reason to hide the v1.3 setters deviating from the norm that was in v1.2 where setters were public?

vogxn pushed a commit to vogxn/qds-sdk-py that referenced this issue Mar 21, 2016
double underscored names are mangled by python as they are seen as
private fields. this is not suitable when importing the sdk and writing
factories for various qubole resources as there is no easy way to update
specific parts of the cluster info object.
@vogxn
Copy link
Author

vogxn commented Sep 13, 2016

This was merged a while ago. Closing

@vogxn vogxn closed this as completed Sep 13, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant