Closed psavva closed 3 years ago
@mschulte-tsi Please also see this PR, which aims to enable/disable the download of the business rules separately based on an enabled flag per scheduler
@SchulzeStTSI I have noticed one issue with my solution, where the startup of the application will cleardown the business rules (even though I have set them to disabled via this PR).
Any pointers on where the issue may be here? Is it correct that rules are deleted on restart of the service from the Database?
@a-trzewik Please can you also review, and let me know how to proceed, and if this PR can get accepted?
Best Regards Panayiotis Savva
@psavva Thanks for your pull request. Looks good. We review it now.
hi @psavva, First of all thanks for your contribution. One question with which profiles do you start the application, so we can check the problem with the deletion of the db.
Hi @slaurenz
I am running with the Cloud profile ( Postgres database). Upon restarting the service, I notice that the rules are emptied out.
Best Regards Panayiotis Savva
Hi @slaurenz
Do you think you could help me understanding the behavior of why the business rules are deleted from the database at startup? Do you also experience the same behavior in your services?
@slaurenz
Kind Reminder
There seems to be a bug in the Btp implementation. The Spring Profile is set to "cloud", however, it seems that the btp implementation is still being compiled, and runs the scheduler of the btp service updates to the rules.
This explains the issue we have seen when restarting the service, the business rules is deleted.
@SchulzeStTSI We can merge the same conditions we have in the non btp implementation into the btp implementation (changes in this PR).
Please let me know how to proceed?
A secondary issue has been found where data is also deleted upon startup.
jpa:
database-platform: org.hibernate.dialect.PostgreSQLDialect
hibernate:
ddl-auto: create
The ddl-auto: create is documented as "create: creates the schema, destroying previous data."
What are we doing this by default? Should this not be set to "update" by default?
based on enabled flag within the application.yml configuration file