Skip to content

Add support for Libraries API#74

Merged
andrewmchen merged 1 commit intodatabricks:masterfrom
andrewmchen:libraries
Feb 20, 2018
Merged

Add support for Libraries API#74
andrewmchen merged 1 commit intodatabricks:masterfrom
andrewmchen:libraries

Conversation

@andrewmchen
Copy link
Contributor

Copy link
Collaborator

@mengxr mengxr left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Made one pass. We should check the gist license issue and if uninstall requires maven-exclusion/.... Other comments are minor.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  • First sentence should describe the class.
  • It doesn't have a license. We might need to remove the code if there is no default license for gist.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Don't quite understand why we need even if ....

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

need to update doc: Get the status of all libraries on all clusters.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ditto

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not exactly an alias. Shall we say 'shortcut`?

"""
if all:
library_statuses = _cluster_status(cluster_id).get('library_statuses', [])
libraries = [l_status['library'] for l_status in library_statuses]
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we want to filter by LibraryInstallStatus? Curious what users see if this tries to uninstall a library that is in "FAILED" state.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think anything will happen, like the documentation says Uninstalling libraries that are not installed on the cluster will have no impact but is not an error.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is duplicate code. Should do some refactoring.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

with libraries

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

TEST_CLUSTER_ID

tests/utils.py Outdated
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  • The method doesn't do what it claims. We can call it assert_cli_output and document the expected behavior.
  • It is better to combine assert and output_equals into a single method so you can output the actual and expected if they don't match. Currently, you only get a boolean output.

@andrewmchen
Copy link
Contributor Author

I've checked the uninstall requires maven-exclusion concerns you had. Unfortunately, we need to include all options like --maven-repo and --maven-exclusion to uninstall.

I still have to check the gist license issue with Justin.

'jar': 'dbfs:/test.jar',
}
}],
'cluster_id': '0213-212348-veeps379'
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: TEST_CLUSTER_ID

@mengxr
Copy link
Collaborator

mengxr commented Feb 20, 2018

LGTM pending the gist license discussion

address xiangrui

fix
@andrewmchen andrewmchen merged commit c8d194e into databricks:master Feb 20, 2018
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

Successfully merging this pull request may close these issues.

2 participants

Comments