Issue with dataiku-api client v11.4.0

matthieu
matthieu Registered Posts: 11
edited July 16 in Setup & Configuration

The Could not find imported module support code for ansible.modules.dss_general_settings. Looked for (['ansible.module_utils.dataikuapi.dss.webapp.DSSWebApp', 'ansible.module_utils.dataikuapi.dss.webapp']) error is encountered when using https://github.com/dataiku/dataiku-api-client-python release/11.4 version in an ansible module

- name: Configure K8S settings
when: configure_k8s
dss_general_settings:
connect_to: "{{ dss_connection_info }}"
settings:
containerSettings:
executionConfigs: "{{ k8s_executionconfigs }}"

Everything work fine with **release/11.1** and previous versions.

~/ansible-dss-k8sconfig$ ansible-galaxy install git+https://github.com/dataiku/dataiku-api-client-python,release/11.1 --force
Starting galaxy role install process
- extracting dataiku-api-client-python to /home/matthieu/ansible-dss-k8sconfig/roles/dataiku-api-client-python
- dataiku-api-client-python (release/11.1) was installed successfully

TASK [Configure K8S settings] *********************************************************************************************************************************
task path: /home/matthieu/ansible-dss-k8sconfig/config_dss.yml:8
<localhost> ESTABLISH LOCAL CONNECTION FOR USER: matthieu
<localhost> EXEC /bin/sh -c 'echo ~matthieu && sleep 0'
<localhost> EXEC /bin/sh -c '( umask 77 && mkdir -p "` echo /home/matthieu/.ansible/tmp `"&& mkdir "` echo /home/matthieu/.ansible/tmp/ansible-tmp-1680157531.0316403-2491-43528231463604 `" && echo ansible-tmp-1680157531.0316403-2491-43528231463604="` echo /home/matthieu/.ansible/tmp/ansible-tmp-1680157531.0316403-2491-43528231463604 `" ) && sleep 0'
Including module_utils file ansible/__init__.py
Including module_utils file ansible/module_utils/__init__.py
Including module_utils file ansible/module_utils/basic.py
Including module_utils file ansible/module_utils/_text.py
Including module_utils file ansible/module_utils/common/_collections_compat.py
Including module_utils file ansible/module_utils/common/__init__.py
Including module_utils file ansible/module_utils/common/_json_compat.py
Including module_utils file ansible/module_utils/common/_utils.py
Including module_utils file ansible/module_utils/common/arg_spec.py
Including module_utils file ansible/module_utils/common/file.py
Including module_utils file ansible/module_utils/common/locale.py
Including module_utils file ansible/module_utils/common/parameters.py
Including module_utils file ansible/module_utils/common/collections.py
Including module_utils file ansible/module_utils/common/process.py
Including module_utils file ansible/module_utils/common/sys_info.py
Including module_utils file ansible/module_utils/common/text/converters.py
Including module_utils file ansible/module_utils/common/text/__init__.py
Including module_utils file ansible/module_utils/common/text/formatters.py
Including module_utils file ansible/module_utils/common/validation.py
Including module_utils file ansible/module_utils/common/warnings.py
Including module_utils file ansible/module_utils/compat/selectors.py
Including module_utils file ansible/module_utils/compat/__init__.py
Including module_utils file ansible/module_utils/compat/_selectors2.py
Including module_utils file ansible/module_utils/compat/selinux.py
Including module_utils file ansible/module_utils/dataiku_api_preload_imports.py
Including module_utils file ansible/module_utils/dataiku_utils.py
Including module_utils file ansible/module_utils/dataikuapi/apinode_admin/auth.py
Including module_utils file ansible/module_utils/dataikuapi/__init__.py
Including module_utils file ansible/module_utils/dataikuapi/apinode_admin/__init__.py
Including module_utils file ansible/module_utils/dataikuapi/apinode_admin/service.py
Including module_utils file ansible/module_utils/dataikuapi/apinode_admin_client.py
Including module_utils file ansible/module_utils/dataikuapi/apinode_client.py
Including module_utils file ansible/module_utils/dataikuapi/base_client.py
Including module_utils file ansible/module_utils/dataikuapi/dss/admin.py
Including module_utils file ansible/module_utils/dataikuapi/dss/__init__.py
Including module_utils file ansible/module_utils/dataikuapi/dss/analysis.py
Including module_utils file ansible/module_utils/dataikuapi/dss/apideployer.py
Including module_utils file ansible/module_utils/dataikuapi/dss/apiservice.py
Including module_utils file ansible/module_utils/dataikuapi/dss/dataset.py
Including module_utils file ansible/module_utils/dataikuapi/dss/discussion.py
Including module_utils file ansible/module_utils/dataikuapi/dss/future.py
Including module_utils file ansible/module_utils/dataikuapi/dss/job.py
Including module_utils file ansible/module_utils/dataikuapi/dss/macro.py
Including module_utils file ansible/module_utils/dataikuapi/dss/managedfolder.py
Including module_utils file ansible/module_utils/dataikuapi/dss/meaning.py
Including module_utils file ansible/module_utils/dataikuapi/dss/metrics.py
Including module_utils file ansible/module_utils/dataikuapi/dss/ml.py
Including module_utils file ansible/module_utils/dataikuapi/dss/notebook.py
Including module_utils file ansible/module_utils/dataikuapi/dss/plugin.py
Including module_utils file ansible/module_utils/dataikuapi/dss/project.py
Including module_utils file ansible/module_utils/dataikuapi/dss/app.py
Including module_utils file ansible/module_utils/dataikuapi/dss/codestudio.py
Including module_utils file ansible/module_utils/dataikuapi/dss/continuousactivity.py
Including module_utils file ansible/module_utils/dataikuapi/dss/flow.py
Including module_utils file ansible/module_utils/dataikuapi/dss/jupyternotebook.py
Including module_utils file ansible/module_utils/dataikuapi/dss/mlflow.py
Including module_utils file ansible/module_utils/dataikuapi/dss/modelcomparison.py
Including module_utils file ansible/module_utils/dataikuapi/dss/modelevaluationstore.py
Including module_utils file ansible/module_utils/dataikuapi/dss/projectfolder.py
Including module_utils file ansible/module_utils/dataikuapi/dss/projectlibrary.py
Including module_utils file ansible/module_utils/dataikuapi/dss/recipe.py
Including module_utils file ansible/module_utils/dataikuapi/dss/savedmodel.py
Including module_utils file ansible/module_utils/dataikuapi/dss/scenario.py
Including module_utils file ansible/module_utils/dataikuapi/dss/sqlquery.py
Including module_utils file ansible/module_utils/dataikuapi/dss/statistics.py
Including module_utils file ansible/module_utils/dataikuapi/dss/streaming_endpoint.py
Including module_utils file ansible/module_utils/dataikuapi/dss/utils.py
Including module_utils file ansible/module_utils/dataikuapi/dss/wiki.py
Including module_utils file ansible/module_utils/dataikuapi/dss_plugin_mlflow/__init__.py
Including module_utils file ansible/module_utils/dataikuapi/dss_plugin_mlflow/utils.py
Including module_utils file ansible/module_utils/dataikuapi/dssclient.py
Including module_utils file ansible/module_utils/dataikuapi/dss/feature_store.py
Including module_utils file ansible/module_utils/dataikuapi/dss/projectdeployer.py
Including module_utils file ansible/module_utils/dataikuapi/fmclient.py
Including module_utils file ansible/module_utils/dataikuapi/fm/instances.py
Including module_utils file ansible/module_utils/dataikuapi/fm/__init__.py
Including module_utils file ansible/module_utils/dataikuapi/fm/future.py
Including module_utils file ansible/module_utils/dataikuapi/fm/instancesettingstemplates.py
Including module_utils file ansible/module_utils/dataikuapi/fm/tenant.py
Including module_utils file ansible/module_utils/dataikuapi/fm/virtualnetworks.py
Including module_utils file ansible/module_utils/dataikuapi/utils.py
Including module_utils file ansible/module_utils/distro/__init__.py
Including module_utils file ansible/module_utils/distro/_distro.py
Including module_utils file ansible/module_utils/errors.py
Including module_utils file ansible/module_utils/parsing/convert_bool.py
Including module_utils file ansible/module_utils/parsing/__init__.py
Including module_utils file ansible/module_utils/pycompat24.py
Including module_utils file ansible/module_utils/six/__init__.py

Error encountered after an uptating to **release/11.4**

:~/ansible-dss-k8sconfig$ ansible-galaxy install git+https://github.com/dataiku/dataiku-api-client-python,release/11.4 --force
Starting galaxy role install process
- changing role dataiku-api-client-python from release/11.1 to release/11.4
- extracting dataiku-api-client-python to /home/matthieu/ansible-dss-k8sconfig/roles/dataiku-api-client-python
- dataiku-api-client-python (release/11.4) was installed successfully

TASK [Configure K8S settings] *********************************************************************************************************************************
task path: /home/matthieu/ansible-dss-k8sconfig/config_dss.yml:8
<localhost> ESTABLISH LOCAL CONNECTION FOR USER: matthieu
<localhost> EXEC /bin/sh -c 'echo ~matthieu && sleep 0'
<localhost> EXEC /bin/sh -c '( umask 77 && mkdir -p "` echo /home/matthieu/.ansible/tmp `"&& mkdir "` echo /home/matthieu/.ansible/tmp/ansible-tmp-1680157621.6201165-2590-237838050100479 `" && echo ansible-tmp-1680157621.6201165-2590-237838050100479="` echo /home/matthieu/.ansible/tmp/ansible-tmp-1680157621.6201165-2590-237838050100479 `" ) && sleep 0'
<localhost> EXEC /bin/sh -c 'rm -f -r /home/matthieu/.ansible/tmp/ansible-tmp-1680157621.6201165-2590-237838050100479/ > /dev/null 2>&1 && sleep 0'
fatal: [localhost]: FAILED! => {
"msg": "Could not find imported module support code for ansible.modules.dss_general_settings. Looked for (['ansible.module_utils.dataikuapi.dss.webapp.DSSWebApp', 'ansible.module_utils.dataikuapi.dss.webapp'])"
}

Issue seems to be linked with the following code added in last 11.4 commit :

  • from .govern_client import GovernClient in init.py, fm/instances.py,
  • from .dss.workspace import DSSWorkspace in dssclient.py
  • from .webapp import DSSWebApp, DSSWebAppListItemin project.py

The webapp.py, workspace.py, govern_client.py files are missing in release/11.4

Everything works with release/11.4 after commenting out the lines containing the faulty imports.


Operating system used: Debian

Best Answer

Answers

  • gnaldi62
    gnaldi62 Partner, L2 Designer, Dataiku DSS Core Designer, Dataiku DSS & SQL, Dataiku DSS ML Practitioner, Dataiku DSS Core Concepts, Neuron, Dataiku DSS Adv Designer, Registered, Neuron 2022, Frontrunner 2022 Finalist, Frontrunner 2022 Winner, Frontrunner 2022 Participant, Neuron 2023 Posts: 79 Neuron

    Hi,

    I've got a similar problem but I'm not able to install at all dataiku-api-client.

    Take into account that we're using Nexus as a proxy to the pypi repository; the message we get is

    "No matching distribution found for dataiku-api-client" (we haven't specified any version and are using

    python3.6). Do you have any idea of why this is happening ? Is that due to the cache of Nexus ?

    Thanks in advance. Rgds

    Giuseppe

Setup Info
    Tags
      Help me…