OCA / server-env

Tools to manage environment-dependent configuration
GNU Affero General Public License v3.0
57 stars 157 forks source link

[14.0][server_environment_data_encryption] Avoid raising error when config is missing #111

Closed florian-dacosta closed 2 years ago

florian-dacosta commented 2 years ago

Instead we fallback on standard server_environment behavior and display a warning to the user.

Aims to solve https://github.com/OCA/server-env/issues/110

reviews welcome @sebastienbeau @simahawk @ivantodorovich

florian-dacosta commented 2 years ago

LG. Although, it's worth to add a line in the README wink

Not sure what to add. "If the minimal configuration is not done, the module has no effect" but is seems pretty obvious no?

simahawk commented 2 years ago

You are right. We should probably log a warning instead. What do you think?

florian-dacosta commented 2 years ago

@simahawk I've added the warning

florian-dacosta commented 2 years ago

@simahawk Done

simahawk commented 2 years ago

works on runboat:

2022-05-10 08:25:27,951 77 WARNING b029161ab-bf0c-4bbb-ad91-211e2b9c46d4 root: The minimal configuration is missing. You need at least to add an encryption key for the current environment  : test. While the configuration is missing, the module has no effect 

/ocabot merge patch

Thanks!

OCA-git-bot commented 2 years ago

This PR looks fantastic, let's merge it! Prepared branch 14.0-ocabot-merge-pr-111-by-simahawk-bump-patch, awaiting test results.

OCA-git-bot commented 2 years ago

Congratulations, your PR was merged at cd3e1e12efa30b41385960e35940d5cb208ba6d7. Thanks a lot for contributing to OCA. ❤️