Duplicating Plugin

gblack686
gblack686 Partner, Registered Posts: 62 Partner

(Haven't connected git)

What are recommendations for duplicating a plugin?

I tried re-uploading with a new name, and encountered errors. Somehow, now I have a working plugin but it doesn't show up on the UI under installed plugins or dev plugins. Although I confirmed it is exists with contents at DATA_DIR/plugins/installed.

Best Answer

  • Alex_Combessie
    Alex_Combessie Alpha Tester, Dataiker Alumni Posts: 539 ✭✭✭✭✭✭✭✭✭
    Answer ✓

    Hi,

    No need to rename the parent folder. You just need to create a ZIP archive containing the plugin.json and the other folders at top level. From what you describe, it seems you have a "folder too far" inside your ZIP.

    Regarding the issue of edition, it is probably specific to the software you use for ZIP uncompressing/compressing. On macOS this works with the built-in compress feature. On Linux, the unzip command works. On a Windows machine you may need to install something specific such as 7zip.

    Hope it helps,

    Alex

Answers

  • Alex_Combessie
    Alex_Combessie Alpha Tester, Dataiker Alumni Posts: 539 ✭✭✭✭✭✭✭✭✭

    Hi,

    Could you detail the steps you took to reupload the plugin with a new name and what error message you received?

    The manual reupload procedure you describe should work provided:

    - you change the plugin id in plugin.json

    - you change the component folder named since they have to start with the plugin id

    You may need to refresh your browser after upload to have the plugin components appear.

    Let me know if this works,

    Alex

  • gblack686
    gblack686 Partner, Registered Posts: 62 Partner
    edited July 17

    I downloaded the plugin, unzipped, replaced the plugin-id in plugin.json, and renamed the parent folder. Yet, I get this error on upload

    Missing descriptor: plugin.json not found in /mnt1/dataiku/DATA_DIR/tmp/plugin-install/plugin.zip2891127732750005929/unzip

    I notice that on download that plugin.json, requirements.json, and state.json are in an unnamed folder of type 'Local Disk' and unable to edit. And when I unzip/rezip the folder is now of type 'File folder'. Am I doing something wrong with my zip?

  • gblack686
    gblack686 Partner, Registered Posts: 62 Partner

    I got the upload to work with all components loaded, but when I go to run it, I'm getting an error. "Recipe has no name."

    I did have to change the recipe name after upload because it was taken by the original plugin. But I changed it with no avail. Also re-uploaded with name already changed, and it still says recipe has no name.

  • Alex_Combessie
    Alex_Combessie Alpha Tester, Dataiker Alumni Posts: 539 ✭✭✭✭✭✭✭✭✭

    Hi,

    After changing the component name and reuploading, you will need to reload this plugin (Top right Actions button). Then, refresh your browser and navigate to your flow.

    Best regards,

    Alex

  • gblack686
    gblack686 Partner, Registered Posts: 62 Partner
    edited July 17

    Hi,

    I've retried this too many times to count now, not sure what I'm missing. I keep getting a "Recipe has no name" error. I've refreshed the browser, reloaded the plugins, tried renaming, deleted the state.json, re-uploaded again..

    I've attached some files. (The tree contains all contents of the uploaded zip)

    Recipe.json and recipe.py exist at

    /mnt1/dataiku/DATA_DIR/plugins/dev/plugin-duplicate/custom-recipes/plugin-duplicate/

    Also - I have a plugin that exists at the below path, yet won't show up in the installed plugins UI.

    /mnt1/dataiku/DATA_DIR/plugins/installed

  • Alex_Combessie
    Alex_Combessie Alpha Tester, Dataiker Alumni Posts: 539 ✭✭✭✭✭✭✭✭✭

    Hi,

    The fact that you have an existing plugin in the installed path which doesn't show up in the UI indicates a problem.

    First, I recommend manually removing this folder from the server and any leftovers from previous attempts. After doing so, restart DSS.

    Second, regarding the content of tree.txt,it seems that the folder containing your recipe is called "plugin-duplicate". I recommend to change it to "my-plugin-id-my-recipe-id".

    Third, try again by re-uploading the plugin (with new plugin id in plugin.json), reload and refresh your browser.

    If that doesn't work, please send us an instance diagnostic (see https://doc.dataiku.com/dss/latest/troubleshooting/diagnosing.html#getting-an-instance-diagnosis). If the file is too large for this website, upload it to dl.dataiku.com and send the resulting link to alexandre.combessie .at. dataiku.com.

    Cheers,

    Alex

  • gblack686
    gblack686 Partner, Registered Posts: 62 Partner
    edited July 17

    Hi,

    I realized the "Recipe has no name" error was due to role input/output config.

    Now I'm getting a new error

    recipe type CustomCode_first-plugin is unknown

    Do you know what custom code this could be referencing? I removed the first-plugin from plugins/installed. I'm working on approval to send the instance diagnostic.

  • Alex_Combessie
    Alex_Combessie Alpha Tester, Dataiker Alumni Posts: 539 ✭✭✭✭✭✭✭✭✭

    Hi,

    Indeed if you have missing elements in your input/output config, you will receive a "Recipe has no name" error before being able to run the recipe. I have logged a request to our product team to make this message more explicit.

    Regarding your new error, it indicates that your recipe identifier is not correctly registered. As stated previously, I recommend to rename the folder containing the recipe.py and recipe.json to "my-plugin-id_my-recipe-id". After doing so, you will need to reload the plugin (Top right Actions button), refresh your browser, and create the recipe again. If that works, the duplication operation can be considered as OK.

    Cheers,

    Alex

  • gblack686
    gblack686 Partner, Registered Posts: 62 Partner

    The custom_code error seems to be dependent on the output datasets. For example, if I create new datasets, the recipe loads correctly, but if I use existing datasets I get the error which seems to be referring to an old plugin code.

    Also, what are the requirements to "Use Existing Dataset", sometimes I am not given the option.

    I have logged a request to our product team to make this message more explicit. - This would be much appreciated; along with any other config error on the plugin UI.

  • Alex_Combessie
    Alex_Combessie Alpha Tester, Dataiker Alumni Posts: 539 ✭✭✭✭✭✭✭✭✭

    This indicates something wrong with the duplication. First, could you try a hard refresh of your browser (Cmd Shift R on macOS or Ctrl F5 on Windows/Linux)?

    If the same error persists, check on the server (DATADIR/plugins) that there are no duplicates leftover for both plugin-id and recipe-id. If you have, remove them manually and restart DSS.

Setup Info
    Tags
      Help me…