enonic / lib-guillotine

Apache License 2.0
3 stars 0 forks source link

Generate headless schema based on site configuration (available apps) and redeployment of any of these apps #166

Closed anatol-sialitski closed 3 years ago

anatol-sialitski commented 3 years ago

@alansemenov commented on Wed May 05 2021

As of now, headless schema is generated once (on app startup) so any changes done to types in the app won't be reflected after the app is redeployed. The same issue happens whenever user adds application(s) to or removes application(s) from the site - the schema will not be updated with the new changes. To solve this we should regenerate schema on app redeploy and whenever site config is updated.


@sigdestad commented on Wed May 05 2021

This is strange, app redeploy == stop and start? How does this not trigger rebuild of the schema?


@anatol-sialitski commented on Thu May 06 2021

Yes, you are right. If app is redeployed a schema will be updated. In this task we should focus on update/re-create a schema when any app was added or removed from the site and to generate types based on apps from site configs, not only current app.


@alansemenov commented on Thu May 06 2021

How will we handle a case when one of the apps (with new schema changes) assigned to the site was redeployed? If we only track when apps are added/removed then this will not solve this case.


@anatol-sialitski commented on Thu May 06 2021

Ah, we are talking about an app which added to site, not about an app which based on headless-starter. Then a description of the issue is correct. Sorry for confusing.


@sigdestad commented on Thu May 06 2021

Ok, maybe the title should be updated then.

However, currently we don't load CTY's from any other apps at all - using the headless starter. So I don't see how this task is relevant at all?


@sigdestad commented on Thu May 06 2021

Oh.. maybe this actually is the task about generally being able to pickup changes from other apps? PLS consider the task titles more carefully in the future.


@alansemenov commented on Thu May 06 2021

We might separate this into two different tasks if that's the problem, but I think the two problems are very related. In both cases you regenerate schema on event.


@sigdestad commented on Thu May 06 2021

Sure, as many tasks as you like. My point is essentially that this task title does not make any sense?


@alansemenov commented on Thu May 06 2021

Feel free to update :)