ds-wizard / dsw-tdk

Data Stewardship Wizard Template Development Kit
Apache License 2.0
3 stars 1 forks source link

put results in an error #18

Closed froggypaule closed 3 years ago

froggypaule commented 3 years ago

Hello!

I am slowly teaching myself dsw-tdk. I am following the video https://www.youtube.com/watch?v=FFElv-e24NE. I create a new template, and when sending the put command, I get

(env) paule@kame:~/ifb_sandbox/dsw-tdk$ dsw-tdk put global_test_0.1.0/ INFO: Loading local template project INFO: Connecting to http://localhost:3000 INFO: Successfully authenticated as paulette.lieby@france-bioinformatique.fr INFO: Creating remote template FAILURE: Could not upload template

Error response status Server responded with error HTTP status 400: Bad Request Probably incorrect API URL or template already exists...

template.json is

{ "templateId": "test", "organizationId": "global", "version": "0.1.0", "name": "test", "description": "My custom template", "license": "CC0", "metamodelVersion": 2, "recommendedPackageId": "global:bioimage-structure-2021-02-12T11-11-52CET:0.0.0", "allowedPackages": [ { "orgId": "global", "kmId": "bioimage-structure-2021-02-12T11-11-52CET", "minVersion": "0.0.0", "maxVersion": null } ], "formats": [ { "uuid": "e3e23216-00b6-4dd1-953d-c1252cc15eb9", "name": "HTML", "shortName": "html", "icon": "fas fa-file", "color": "#f15722", "steps": [ { "name": "jinja", "options": { "template": "src/template.html.j2", "content-type": "text/html", "extension": "html" } } ] } ], "_tdk": { "version": "2.12.0", "readmeFile": "README.md", "files": [ "*", "src/template.html.j2" ] } }

the docker log file shows:

dsw_server_1 | 2021-03-22T16:01:41.979657060Z [Info ] [I:06472138-4b46-4981-8c73-812ffd2daf93] [T:4bdd212b-88c4-4594-8308-1a872e0ee5e7] [API ] 200 OK GET /packages/global:bioimage-structure-2021-02-12T11-11-52CET:0.0.0 dsw_server_1 | 2021-03-22T16:02:09.584790149Z [Info ] [I:------------------------------------] [T:7b63e743-f699-4e35-9533-22e2f1ba7d5b] [API ] 200 OK GET / dsw_server_1 | 2021-03-22T16:07:09.678593482Z [Info ] [I:------------------------------------] [T:bcc87718-678d-479a-a58e-5a847c1c48a5] [API ] 200 OK GET / dsw_server_1 | 2021-03-22T16:09:14.097885510Z [Info ] [I:------------------------------------] [T:00d358e6-237a-45ce-9597-b9482ffbaf21] [API ] 201 Created POST /tokens dsw_server_1 | 2021-03-22T16:09:14.099176363Z [Warn ] [I:06472138-4b46-4981-8c73-812ffd2daf93] [T:------------------------------------] [API ] 404 Not Found GET /templates/global:test:0.1.0 dsw_server_1 | 2021-03-22T16:09:14.100715405Z [Warn ] [I:06472138-4b46-4981-8c73-812ffd2daf93] [T:------------------------------------] [API ] 400 Bad Request POST /templates dsw_server_1 | 2021-03-22T16:12:09.815734014Z [Info ] [I:------------------------------------] [T:b2777225-eefd-49c2-b98c-067ff8873e17] [API ] 200 OK GET /

no idea why it tells me " 404 Not Found GET /templates/global:test:0.1.0"

MarekSuchanek commented 3 years ago

Hello Paulette,

The issue is that the new DSW has metamodelVersion 3... you need to update previous according to the: https://docs.ds-wizard.org/en/latest/admin/upgrade.html#x-to-2-12-x

There is indeed an issue that newly created template with TDK still have version 2. I will fix that during this week.

froggypaule commented 3 years ago

success!!! :)