konveyor / kantra

A CLI that unifies analysis and transformation capabilities of Konveyor
Apache License 2.0
9 stars 27 forks source link

[BUG] Containerless-Kantra : [Windows-Only - Java Project analysis] Fails to create static-report #362

Closed kthatipally closed 3 weeks ago

kthatipally commented 4 weeks ago

Is there an existing issue for this?

Konveyor version

https://github.com/konveyor/kantra/releases/tag/v0.6.0-alpha.2

Priority

Undefined (Default)

Current Behavior

I have run the analysis using the command:

.\windows-kantra.exe analyze-bin --input C:\testing\spring-petclinic\ --output .\output-spc --target cloud-readiness --overwrite

The files Dependencies.yaml and output.yaml have been successfully created. However, there's a problem with generating the static-report due to an issue with the cp command for the static-report. Let me know if you need any more info.

See the error below:

Image

Expected Behavior

Analysis is run successfully, and the static-report is generated.

How Reproducible

Always (Default)

Steps To Reproduce

  1. OS: Windows
  2. Run Command: .\windows-kantra.exe analyze-bin --input C:\testing\spring-petclinic\ --output .\output-spc --target cloud-readiness --overwrite
  3. Run via windows-powershell

Environment

Anything else?

No response

konveyor-ci-bot[bot] commented 4 weeks ago

This issue is currently awaiting triage. If contributors determine this is a relevant issue, they will accept it by applying the triage/accepted label and provide further guidance. The triage/accepted label can be added by org members.

eemcmullan commented 4 weeks ago

@kthatipally Thank you for finding this issue. This is interesting because the cp command for the static report is only (supposed) to be used by the container analyze command, as we don't use an executable for the containerless version. Do you have the analysis.log and kantra logs?

kthatipally commented 4 weeks ago

Hi @eemcmullan , Please find the attached analysis.log. static-report.log is empty. Let me know if you need more logs. analysis.log

This is the line that is causing the error: https://github.com/konveyor/kantra/blob/d91946dc73f973cec1baaa213da223ce1d723165/cmd/analyze-bin.go#L565

eemcmullan commented 3 weeks ago

@kthatipally Sorry, forgot we did that there. Is it fair to say xcopy would be the equivalent command?

kthatipally commented 3 weeks ago

@eemcmullan , Yes, the xcopy command works on Windows. Would it be worth considering a platform-agnostic approach? We might be able to use or adapt a function like (https://github.com/konveyor/kantra/blob/d91946dc73f973cec1baaa213da223ce1d723165/cmd/analyze.go#L1077) to ensure cross-platform compatibility.

eemcmullan commented 3 weeks ago

Fixed in https://github.com/konveyor/kantra/pull/366