Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added config-expand script in entrypoint to allow more control over o… #276

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

PCatinean
Copy link
Contributor

Whenever there's a parameter to change in the odoo config as of now if I'm not mistaken we have to add them one by one from ENV to the config. This is what I use in my deployments to k8s clusters to make it easier and flexible at the same time. Let me know if this is of any use in the general project.

@yajo yajo self-assigned this Jan 20, 2020
@yajo
Copy link
Contributor

yajo commented Jan 20, 2020

Hi there, thanks for the PR.

It seems a pretty intelligent way to handle an old problem.

What's missing:

  1. Add this logic into https://github.com/Tecnativa/doodba/blob/master/bin/config-generate directly.
  2. Provide a deprecation path to the old system where it's duplicated with the new one.

@PCatinean
Copy link
Contributor Author

Yeah I just uploaded mine from scaffolding first to see if it's of any use. I'll do my best to get to it this week

@PCatinean PCatinean force-pushed the master branch 2 times, most recently from aa723ae to ae209eb Compare March 1, 2020 20:25
@gdgellatly
Copy link
Contributor

Just a question, does this cause issues with non odoo options that would usually sit in different parts of the conf file? e.g. the old queue job settings.

@joao-p-marques
Copy link
Contributor

Just a question, does this cause issues with non odoo options that would usually sit in different parts of the conf file? e.g. the old queue job settings.

AFAICS it shouldn't cause any problem... All this does is append to the parser (or replace) the variables defined by environment, so you should still be able to add a custom config section to the file and use the variables for general Odoo settings at the same time.

Copy link
Contributor

@joao-p-marques joao-p-marques left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

However, maybe this deserves a test, possibly a small change to https://github.com/Tecnativa/doodba/tree/master/tests/scaffoldings/settings
@PCatinean can you do it, please?

Thanks for the nice improvement 😃

try:
from configparser import RawConfigParser

parser = RawConfigParser(strict=False)
except ImportError:
# Python 2, where strict=True doesn't exist
# Python 2, where strict=True doesn"t exist
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Also, could you change this back to doesn't?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants