Skip to content

[IMP] support customization of the custom conf path.#512

Merged
josep-tecnativa merged 3 commits intoTecnativa:masterfrom
ForgeFlow:custom-conf-dir
Mar 17, 2026
Merged

[IMP] support customization of the custom conf path.#512
josep-tecnativa merged 3 commits intoTecnativa:masterfrom
ForgeFlow:custom-conf-dir

Conversation

@LoisRForgeFlow
Copy link
Copy Markdown
Contributor

This allow you to potentially build different configuration files
based on the enviroment you are using.

@ForgeFlow

@LoisRForgeFlow LoisRForgeFlow force-pushed the custom-conf-dir branch 2 times, most recently from e52ff69 to 0c53693 Compare July 14, 2022 14:35
Copy link
Copy Markdown
Contributor

@ap-wtioit ap-wtioit left a comment

Choose a reason for hiding this comment

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

A test would be nice (test_dotd has a fragment that tests custom/conf.d maybe we could expand this)

                # ``custom/conf.d`` was properly concatenated
                ("grep", "test-conf", "auto/odoo.conf"),

./custom is copied onbuild into /opt/odoo/custom and is chowned to root:odoo. In dev adding additional directories should be fine (if one exports UID, GID properly). but in other environments there could be permission issues with reading custom conf.d that do not belong to odoo uid inside the container.

Can we ignore such permission issues?

LoisRForgeFlow and others added 2 commits March 16, 2026 11:31
This allow you to potentially build different configuration files
based on the environment you are using.
Add assertions to verify that both `custom/conf.d` and `CUSTOM_CONF_DIR`
directories are properly merged into `auto/odoo.conf`:

- Move `test-conf` from `conf.d/` to `conf-test.d/` so it is only
  reachable via `CUSTOM_CONF_DIR`
- Add `conf` to `conf.d/` with a unique key (`conf_d_test`)
- Add `CUSTOM_CONF_DIR=/opt/odoo/custom/conf-test.d` to the test
  docker-compose environment
- Assert both `conf_d_test` and `custom_conf_dir_test` appear in the
  generated `auto/odoo.conf`

Using real key-value pairs inside `[options]` sections (rather than
empty custom sections) ensures configparser reliably writes them to
the output file.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@GuillemCForgeFlow
Copy link
Copy Markdown

@josep-tecnativa I'm not sure if you need to approve the tests' execution for this improvement.
thank you in advance. 🙂

@GuillemCForgeFlow
Copy link
Copy Markdown

@josep-tecnativa there's an issue with one job https://github.com/Tecnativa/doodba/actions/runs/23144055090/job/67228455751 which seems unrelated to the changes being added here. any clues on how to fix? 🤔

@GuillemCForgeFlow
Copy link
Copy Markdown

@josep-tecnativa I can see the CI is green now. do you think we could get this merged? 🙂

@josep-tecnativa
Copy link
Copy Markdown
Contributor

LGTM

@josep-tecnativa josep-tecnativa merged commit 04148a2 into Tecnativa:master Mar 17, 2026
37 of 39 checks passed
@LoisRForgeFlow LoisRForgeFlow deleted the custom-conf-dir branch March 17, 2026 13:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants