Open Auratons opened 2 years ago
The issue seems to caused by the future = client.install_plugin_from_archive(args.zip_file)
line in library/dss_plugin.py :
The install_plugin_from_archive()
is called with the name of the file to upload instead of fileObj as described in python requests documentation. As a result, the name of the file is uploaded to the server instead of the zip file content.
The install_plugin_from_archive()
function of dataiku-api-client does not return any future object, which cause the result["job_results"].append(future.wait_for_result())
code line to fail
files – (optional) Dictionary of 'name': file-like-objects (or {'name': file-tuple}) for multipart encoding upload. file-tuple can be a 2-tuple ('filename', fileobj), 3-tuple ('filename', fileobj, 'content_type') or a 4-tuple ('filename', fileobj, 'content_type', custom_headers), where 'content-type' is a string defining the content type of the given file and custom_headers a dict-like object containing additional headers to add for the file.
@cstenac : PR https://github.com/dataiku/dataiku-ansible-modules/pull/16 is proposed to fix this issue. Would you mind to review this PR as this issue is quite annoying to fully automate DSS instance deployment with ansible ?
We were not able to install zipped plugins by the ansible module (checked even with guys from Dataiku).
We tried several ways of zipping our plugin (zip, tar, MacOS UI) -- all of them were installable from Dataiku UI by clicking, but none of them was installable by the Ansible module. It eventually ends with Java exception that says nothing.