feat(configure): configure the tools each step runs from deploy.yml - #52
Draft
nilshamerlinck wants to merge 1 commit into
Draft
nilshamerlinck wants to merge 1 commit into
nilshamerlinck wants to merge 1 commit into
Conversation
This was referenced Sep 22, 2026
nilshamerlinck
force-pushed
the
feat/tool-options-from-deploy-yml
branch
from
September 22, 2026 10:03
f8f680f to
ee52795
Compare
The venv and config steps built fixed command lines:
odoo-venv create --project-dir <dir> --preset project
odoo-config create --version <v> [--preset <p>] --instance-dir=<dir> -c <conf> <overrides>
Nothing in deploy.yml could reach the rest of either tool's interface, so an
instance whose Odoo source lives outside its own directory could not pass
--odoo-dir/--addons-path, and --enterprise, --from, --output-format and friends
were out of reach entirely.
A `tools` section now holds command-line options per tool, keyed by the name of
the command it configures:
odoo-myproject-staging:
tools:
odoo-venv:
odoo-dir: /opt/odoo/code/odoo/odoo/20.0/
addons-path: /opt/odoo/code/odoo/odoo/20.0/addons
odoo-config:
enterprise: true
version: 20.0
The keys are merged over the options deploy passes by default, so each option is
passed exactly once: a matching key overrides the default in place, `true` gives
a bare flag, `false`/null drops the option, a list repeats it, and values are
shell-quoted. `tools.odoo-config.version` also short-circuits version detection,
which would otherwise prompt for a version the config already supplies.
`tools.odoo-config` is deliberately separate from `config`: odoo-config treats
any option it does not declare as an odoo.conf value, so the two cannot share a
namespace. `update`'s `odoo-venv update` is untouched — --odoo-dir/--addons-path
are creation-time concerns that .odoo-venv.toml already persists.
nilshamerlinck
force-pushed
the
feat/tool-options-from-deploy-yml
branch
from
September 22, 2026 10:03
ee52795 to
aa0f0c3
Compare
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
The venv and config steps built fixed command lines:
Nothing in
deploy.ymlcould reach the rest of either tool's interface. An instance whoseOdoo source lives outside its own directory could not pass
--odoo-dir/--addons-path, and--enterprise,--from,--from-env,--env-prefixand--output-formatwere unreachable.Solution
A
toolssection holds command-line options per tool:Keys are merged over the options deploy passes by default, so each option is passed exactly
once:
truerenders a bare flag,false/null drops the option — including a defaultfrom: [a, b]→--from a --from b)tools.odoo-config.versionadditionally short-circuits version detection, which wouldotherwise probe the codebase and prompt interactively for a version the config already gives.
Why
tools.odoo-configis separate fromconfigodoo-config createruns withignore_unknown_options, so anything it does not declarebecomes an odoo.conf value override — and a declared boolean passed as
--enterprise=trueis rejected outright. CLI options and config values cannot share one namespace.
config:isunchanged and still writes values into odoo.conf.
Scope
update'sodoo-venv updateis deliberately untouched:--odoo-dir/--addons-patharecreation-time concerns that
.odoo-venv.tomlalready persists.Cosmetic change to existing deployments:
-cis now spelled--configand--instance-dir=xas--instance-dir x, so both are merge-addressable. Click treats themidentically.
Tests
Eleven tests covering both steps: unchanged commands without a
toolssection, optionsappended, a built-in overridden, one dropped with
false, a list repeated, values quoted,a
toolssection naming only one tool, odoo.conf overrides still trailing, and versiondetection skipped when
tools.odoo-config.versionis set.Full suite: 103 passed. Ruff format clean;
ruff checkreports only the pre-existingUP042on
DeployType.