Closed tetchel closed 4 years ago
I'm unable to recreate this issue so far, continuing to investigate. I may need to add some extra debug lines to help track down the problem.
I've found the initial problem that was in the POST /api/v1/templates/repositories api. Writing a specific test for this has led me to another issue though, in that we are not accepting the 'enabled' option to the API which my test requires. Hope to deliver a fix for both tomorrow.
It looks like there's still a bug with this. Newly added sources initially report they are enabled, but the templates don't show up when the templates list is requested. If you disable the source and then enable it, then the templates show up as expected.
The original bug is fixed so i'll close this and opened https://github.com/eclipse/codewind/issues/2641
Master branch
When I GET
http://localhost:10000/api/v1/templates?showEnabledOnly=true
I get all the templates, even the ones from disabled sources. I see the same behaviour using thecwctl
templates commands (the kabanero source is disabled, but its templates are still listed).This means the user gets prompted with the entire list of templates every time they want to create a project, and disabling a source in the Source Manager has no effect.