Uploaded image for project: 'AppFormer'
  1. AppFormer
  2. AF-1042

[Project Oriented] Kie WB REST clone operation does not do migration

XMLWordPrintable

    • Hide

      Run Workbench with rest user. Then run REST command to clone repository e.g.

      curl -X POST -H 'Content-Type: application/json' -H 'Accept: application/json' -H 'Authorization: Basic cmVzdEFsbDpyZXN0QWxsMTIzNDs=' -i http://localhost:8080/kie-wb/rest/spaces/space/git/clone --data '{ "name":"REST clone", "gitURL":"https://github.com/kiegroup/jbpm-playground.git" }'
      
      Show
      Run Workbench with rest user. Then run REST command to clone repository e.g. curl -X POST -H 'Content-Type: application/json' -H 'Accept: application/json' -H 'Authorization: Basic cmVzdEFsbDpyZXN0QWxsMTIzNDs=' -i http: //localhost:8080/kie-wb/ rest /spaces/space/git/clone --data '{ "name" : "REST clone" , "gitURL" : "https://github.com/kiegroup/jbpm-playground.git" }'
    • NEW
    • NEW

      Repository can be cloned to workbench via UI or REST. When you clone a repository in old format with multiple projects via REST endpoint, then this repository is cloned to workbench, but it is not migrated to new format. This leads to error shown in the workbench and the assets from the cloned repo are not visible. So the UI does the migration (lets you choose which projects from given repo to import), but the REST doesn't.

      So if there is no pom.xml file in the root of the repository that is migrated, then that repository needs to be migrated before cloning. Or optionally you clone everything in and then migrate.

      We can do migration when we clone. Also we should notify users, that by cloning and migrating from old format can be changed their repo structure and they need to migrate their repositories too (or they can commit new one from migrated repos in Workbench).

      Another option can be parent pom for repositories with more projects, but with this option we do NOT follow Project Oriented changes. (Not tested yet)

      Actual result:
      via REST call are projects indexed and cloned, but in the workbench aren't any project created
      Expected result:
      via REST call are all projects from repository created in Workbench

              trikkola Toni Rikkola
              jakubschwan Jakub Schwan
              Jakub Schwan Jakub Schwan
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

                Created:
                Updated:
                Resolved: