Skip to content

Upgrade a configured module list with its installed local dependencies - #143

Merged
shiny-code-app[bot] merged 1 commit into
mainfrom
work/update-local-dependencies
Sep 30, 2026
Merged

shiny-code-app[bot] merged 1 commit into
mainfrom
work/update-local-dependencies

Conversation

@shiny-code-app

Copy link
Copy Markdown
Contributor

Why

A deploy never loaded data changes in a tenant's dependency addons. Launchplane's post-deploy names the artifact's install list in ODOO_UPDATE_MODULES, and Odoo's -u upgrades a module's dependents, not its dependencies. So a new cron, view or record in an addon such as OPW's shopify_sync stayed unloaded until the next restore, while its Python code was already live. Tonight's opw/testing deploy is the evidence (#142): opw_custom was upgraded and shopify_sync wasn't, so the cron from odoo-tenant-opw#170 doesn't exist there.

What changed

  • When ODOO_UPDATE_MODULES names modules, update_addons also upgrades their installed local dependencies: the same dependency closure AUTO already uses, now one helper shared by both.
    • Core and enterprise addons are never added, and neither are uninstalled modules.
    • Callers that pass explicit_modules still get exactly what they pass.
  • The log names the added dependencies.

Verification

  • New test: a configured tenant_core whose local dependency tenant_helper is installed upgrades both. The core sale and the uninstalled tenant_deep are not added.
  • The existing test for a configured list with no local dependencies is unchanged and still passes.
  • tests.test_odoo_data_workflows (59 tests) and the full unittest discover (321) pass; ruff check and format are clean.

Rollout

Tenants pick this up when their devkit pin moves and they publish a new artifact. On OPW that loads #170's Check Product Payloads Offline cron on the next testing deploy.

Refs #142

Odoo's -u upgrades a module's dependents, not its dependencies, so a deploy that
names the tenant's install list never loaded data changes in the local addons it
depends on until the next restore. Add their installed local dependency closure,
the same closure AUTO already uses.

Refs #142
@shiny-code-app

Copy link
Copy Markdown
Contributor Author

Review by another model: OpenAI gpt-6.1-sol, read-only against this branch. It checked for unwanted upgrades (core, enterprise, uninstalled or non-tenant modules), deploys this could break, and explicit_modules callers. Result: none.

@shiny-code-app shiny-code-app Bot added the ready-to-merge Every Code PR is ready for repository owner merge review label Sep 30, 2026
shiny-code-app Bot added a commit that referenced this pull request Sep 30, 2026
@shiny-code-app
shiny-code-app Bot merged commit e45c916 into main Sep 30, 2026
5 checks passed
@shiny-code-app
shiny-code-app Bot deleted the work/update-local-dependencies branch September 30, 2026 03:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ready-to-merge Every Code PR is ready for repository owner merge review

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant