konveyor / kai

Konveyor AI - static code analysis driven migration to new targets via Generative AI
Apache License 2.0
23 stars 28 forks source link

Delination as to where Kai is retrieving code from is ambigious #310

Open JonahSussman opened 3 weeks ago

JonahSussman commented 3 weeks ago

In implementing the demo for the blog post, I'm coming across some issues with how we handle repositories in Kai.

For testability, I want to modify the /load_analysis_report route to take the same arguments as IncidentStore.load_report, namely an Application and a Report. However, this wouldn't make sense to do with the way we currently handle the git repos.

https://github.com/konveyor/kai/blob/d30ed691f1c6f5fa0bafa04efadb7a1fd22c1928/kai/service/incident_store/incident_store.py#L200-L206

We always load a report from the local URI, i.e. a git repo that is local to the server.

We should have something where we clone and reference the origin, pulling/fetching it as needed. The local URI should be deprecated IMO, or at least relegated to a performance optimization when you're running the Kai backend locally.