Open marcopiraccini opened 5 months ago
HI @mcollina @marcopiraccini
I have added the following video. I created an app with 3 services:
then I select terzo as entrypoint. As you can see terzo is the first selected service because is the entrypoint
Here the PR to put this behavior (https://github.com/platformatic/meraki/pull/428). I personally agree with the PR from @leorossi, also @Fmusso94 reported that during tests on meraki.
However there is a bug instead on the update of the application. Changing the entrypoint is not considered (I found that the possible bug could be here https://github.com/platformatic/meraki/blob/main/src/main/generate.mjs#L158, I've already checked that the UI passed the new desired entrypoint name).
Note that the entry point is not updated at all when updating an application
Note that the entry point is not updated at all when updating an application
Yep I noticed during tests today, I've already checked were the problem could be. is a problem to have the entrypoint as first service?
HI @mcollina @leorossi
the problem is on generator inside platformatic (https://github.com/platformatic/platformatic/blob/main/packages/runtime/lib/generator/runtime-generator.js#L335)
1) I tried to
this cause the following problem
Error: Error invoking remote method 'open-app': FastifyError [PLT_CONFIG_CANNOT_PARSE_CONFIG_FILE]: Cannot parse config file. Invalid entrypoint: 'terzo' does not exist
2) also setting a different entrypoint doesn't work https://github.com/platformatic/meraki/blob/main/src/main/generate.mjs#L158
(I tried to use the following code in the following )
if (!isUpdate) {
// Creation
generator.setEntryPoint(entrypoint)
await generator.prepare()
await generator.writeFiles()
} else {
await generator.loadFromDir()
generator.setEntryPoint(entrypoint)
generator.update({ services })
}
But the application was not updated.
It's a bug on the generator that does not support this feature.
I opened an issue: https://github.com/platformatic/platformatic/issues/2601 assigned to me
It always sets the first one