konveyor / move2kube-api

HTTP REST API for move2kube
https://move2kube.konveyor.io/
Apache License 2.0
6 stars 18 forks source link

bug: referencing workspace inputs from a project doesn't work anymore. Start planning fails with a 500 error. #131

Closed HarikrishnanBalagopal closed 11 months ago

HarikrishnanBalagopal commented 1 year ago

Describe the bug

Bug added in commit

commit 4f31fe54f45b0eba426c58eb6ead7b09c2adbd72 (HEAD)
Author: Mehant Kammakomati <kmehant@gmail.com>
Date:   Tue Sep 27 02:28:40 2022 +0530

    feat: api support for invokedByDefault transformers (#122)

    Signed-off-by: Mehant Kammakomati <kmehant@gmail.com>
$ docker run --rm -it -p 8084:8080 quay.io/konveyor/move2kube-ui:v0.3.5-rc.0
....
INFO[0029] POST /api/v1/workspaces/13f0ee7e-2d6e-4039-a0a8-7dea4f1dd37f/projects/a47847a0-3320-45cb-bb87-83cfc4c68914/plan  request-id=60cfcc33-64a4-4546-8322-0071b09a01ff
ERRO[0029] failed to start plan generation. Error: "failed to create the sources directory at the path  . Error: \"mkdir : no such file or directory\""  request-id=60cfcc33-64a4-4546-8322-0071b09a01ff

To Reproduce Steps to reproduce the behavior:

  1. Run docker run --rm -it -p 8084:8080 quay.io/konveyor/move2kube-ui:v0.3.5-rc.0
  2. Create a workspace.
  3. Create a workspace input (example: language-platforms.zip)
  4. Create a project.
  5. Create a project input referencing the workspace input.
  6. Click Start Planning button

Expected behavior

In v0.3.4 and before the planning succeeds.

Screenshots

In v0.3.5-rc.0 and above the planning fails with a 500 error

ERRO[0029] failed to start plan generation. Error: "failed to create the sources directory at the path  . Error: \"mkdir : no such file or directory\""  request-id=60cfcc33-64a4-4546-8322-0071b09a01ff

Desktop (please complete the following information):

Additional context

Caused by removing important checks in this PR https://github.com/konveyor/move2kube-api/pull/122 Bug is not present in the previous commit c75ce35bf619f22f9cc0c6c7c61d45ed5b349db7

Specifically this change https://github.com/konveyor/move2kube-api/pull/122/files#diff-6525fa84f37be87e15da54e5e900efbbea70e2f9e75d6b21429f9bc11842ed8fL1263-R1241

HarikrishnanBalagopal commented 11 months ago

Fixed in #132