eu-digital-green-certificates / dgca-businessrule-service

Apache License 2.0
7 stars 24 forks source link

Disable Download of ValueSets, CountryLists, BusinessRules #27

Closed psavva closed 3 years ago

psavva commented 3 years ago

based on enabled flag within the application.yml configuration file

psavva commented 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

psavva commented 3 years ago

@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?

psavva commented 3 years ago

@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

SchulzeStTSI commented 3 years ago

@psavva Thanks for your pull request. Looks good. We review it now.

slaurenz commented 3 years ago

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.

psavva commented 3 years ago

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

psavva commented 3 years ago

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?

psavva commented 3 years ago

@slaurenz

Kind Reminder

psavva commented 3 years ago

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.

psavva commented 3 years ago

@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?

psavva commented 3 years ago

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?