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

IMP] developer/reference/cli: add --pre-upgrade-scripts, improve --upgrade-path #12528

Closed
wants to merge 2 commits into from

Conversation

aj-fuentes
Copy link
Contributor

@aj-fuentes aj-fuentes commented Mar 17, 2025

[IMP] developer/reference/cli: --pre-upgrade-scripts

Document the new cli option.

[IMP] developer/reference/cli: improve docs of --upgrade-path

Be explicit about what we expect as parameter.

@robodoo
Copy link
Collaborator

robodoo commented Mar 17, 2025

Pull request status dashboard

@aj-fuentes aj-fuentes force-pushed the 16.0-imp_force_script2-afu branch from 62215d3 to b7c4e5a Compare March 17, 2025 15:06
@C3POdoo C3POdoo requested a review from a team March 17, 2025 15:09
@@ -94,6 +94,12 @@ Running the server

specify an additional upgrade path.

.. option:: --pre-upgrade-scripts <pre_upgrade_scripts>

specify upgrade scripts to be run before loading base module when an upgrade
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
specify upgrade scripts to be run before loading base module when an upgrade
comma-separated list of path to upgrade scripts to be run before loading base module when an upgrade

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I pushed an extra commit to improve the docs of --upgrade-path that was very thin... to say the least :D

Copy link
Collaborator

@AntoineVDV AntoineVDV left a comment

Choose a reason for hiding this comment

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

@robodoo delegate+

@aj-fuentes aj-fuentes force-pushed the 16.0-imp_force_script2-afu branch 2 times, most recently from 0fcb216 to 2d4d8ab Compare March 17, 2025 15:25
@AntoineVDV
Copy link
Collaborator

@aj-fuentes Just don't forget to adapt your commits because they don't make sense in this context and repo ;)

@aj-fuentes
Copy link
Contributor Author

Hi @AntoineVDV, I don't know what makes sense here :) Would you give a suggestion please?

@AntoineVDV
Copy link
Collaborator

AntoineVDV commented Mar 18, 2025

@aj-fuentes Same logic as in other repos, I'd say, so something like: "[IMP] developer/cli: document --pre-upgrade-scripts option"

It makes it easier to figure out what we're looking at when navigating the commit history of the developer doc, otherwise it'd just be a bunch of "[IMP] core" commits, since all odoo/odoo framework commits look alike.

@aj-fuentes aj-fuentes force-pushed the 16.0-imp_force_script2-afu branch from 2d4d8ab to 97fadd8 Compare March 18, 2025 08:55
@aj-fuentes
Copy link
Contributor Author

OK, done.

@aj-fuentes aj-fuentes changed the title [IMP] core: allow running upgrade scripts unconditionally IMP] developer/reference/cli: add --pre-upgrade-scripts, improve --upgrade-path Mar 18, 2025
@aj-fuentes
Copy link
Contributor Author

@robodoo r+

@robodoo
Copy link
Collaborator

robodoo commented Mar 19, 2025

@aj-fuentes because this PR has multiple commits, I need to know how to merge it:

  • merge to merge directly, using the PR as merge commit message
  • rebase-merge to rebase and merge, using the PR as merge commit message
  • rebase-ff to rebase and fast-forward

@aj-fuentes
Copy link
Contributor Author

@robodoo rebase-ff

@robodoo
Copy link
Collaborator

robodoo commented Mar 19, 2025

Merge method set to rebase and fast-forward.

robodoo pushed a commit to odoo/odoo that referenced this pull request Mar 19, 2025
Upgrade scripts are run only when there is an update of the module
version. This is not flexible enough. After a major upgrade developers
need to upgrade their custom modules. Unfortunately the tools in
`upgrade-util` repo that modify modules (`merge_module`,
`rename_module`, ...) should be done before loading base module. The
latter is already upgraded after a major upgrade thus no upgrade scripts
are run for it.

In this patch we add a mechanism to run specific upgrade scripts
before loading base.

closes #202014

Related: odoo/documentation#12528
Signed-off-by: Christophe Simonis (chs) <[email protected]>
Co-authored-by: Christophe Simonis <[email protected]>
robodoo pushed a commit that referenced this pull request Mar 19, 2025
Document the new cli option.

Part-of: #12528
Related: odoo/odoo#202014
Signed-off-by: Alvaro Fuentes Suarez (afu) <[email protected]>
robodoo pushed a commit that referenced this pull request Mar 19, 2025
Be explicit about what we expect as parameter.

closes #12528

Related: odoo/odoo#202014
Signed-off-by: Alvaro Fuentes Suarez (afu) <[email protected]>
@robodoo robodoo closed this Mar 19, 2025
Nokoz pushed a commit to odoo-dev/odoo that referenced this pull request Mar 25, 2025
Upgrade scripts are run only when there is an update of the module
version. This is not flexible enough. After a major upgrade developers
need to upgrade their custom modules. Unfortunately the tools in
`upgrade-util` repo that modify modules (`merge_module`,
`rename_module`, ...) should be done before loading base module. The
latter is already upgraded after a major upgrade thus no upgrade scripts
are run for it.

In this patch we add a mechanism to run specific upgrade scripts
before loading base.

closes odoo#202014

Related: odoo/documentation#12528
Signed-off-by: Christophe Simonis (chs) <[email protected]>
Co-authored-by: Christophe Simonis <[email protected]>
odoo-pda pushed a commit to odoo-dev/odoo that referenced this pull request Mar 28, 2025
Upgrade scripts are run only when there is an update of the module
version. This is not flexible enough. After a major upgrade developers
need to upgrade their custom modules. Unfortunately the tools in
`upgrade-util` repo that modify modules (`merge_module`,
`rename_module`, ...) should be done before loading base module. The
latter is already upgraded after a major upgrade thus no upgrade scripts
are run for it.

In this patch we add a mechanism to run specific upgrade scripts
before loading base.

closes odoo#202014

Related: odoo/documentation#12528
Signed-off-by: Christophe Simonis (chs) <[email protected]>
Co-authored-by: Christophe Simonis <[email protected]>
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.

4 participants