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

[16.0][FIX] openupgrade_framework : end-migration scripts are forced … #4107

Draft
wants to merge 3 commits into
base: 16.0
Choose a base branch
from

Conversation

metaminux
Copy link

…to run at install too

Fixes #4106

@OCA-git-bot
Copy link
Contributor

Hi @hbrunn, @StefanRijnhart, @legalsylvain,
some modules you are maintaining are being modified, check this out!

Copy link
Member

@hbrunn hbrunn left a comment

Choose a reason for hiding this comment

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

thanks, the CI errors are unrelated.

do we have any core modules where this is the case in v16? If so, a test for that would be great.

@metaminux
Copy link
Author

@hbrunn
Copy link
Member

hbrunn commented Aug 22, 2023

never tried it, but I think it could just work to drop a folder with the module name and correct version into https://github.com/OCA/OpenUpgrade/tree/16.0/openupgrade_scripts/scripts, cf https://github.com/OCA/OpenUpgrade/blob/16.0/openupgrade_framework/odoo_patch/odoo/tests/loader.py#L30

Edit: ah wait, those are localization modules and those aren't installed in the test database we use. And it must be a newly pulled module anyways. How about adding an end migration script for ie spreadsheet (that's new in v16 and pulled during the migration), check for environment variable OPENUPGRADE_TESTS and if that's set, ie set some config parameter as marker that you can check for in the test?

@metaminux
Copy link
Author

Hello @hbrunn

Instead of creating an end-migration script in the "production" tree of openupgrade_scripts, I'd like to copy such script during the tests using data.py file... but I'm struggling to get a right path from the Odoo shell.

It seems I can't get the value of GITHUB_WORKSPACE... any advice ?

@metaminux metaminux force-pushed the 16.0-openupgrade_framework_end_mig_at_end branch from a38ad4e to 070a19a Compare August 29, 2023 14:03
@metaminux metaminux force-pushed the 16.0-openupgrade_framework_end_mig_at_end branch from 070a19a to 16de61e Compare August 29, 2023 14:11
@hbrunn
Copy link
Member

hbrunn commented Aug 29, 2023

just $GITHUB_WORKSPACE is empty? Not sure however what I think of this approach, anyone else an opinion?

Just to be clear, I don't insist on the test, just thought it was nice

@pedrobaeza
Copy link
Member

No idea, sorry.

@legalsylvain legalsylvain added this to the 16.0 milestone Aug 31, 2023
@hbrunn
Copy link
Member

hbrunn commented Dec 23, 2023

so... do we go ahead and merge this?

@pedrobaeza
Copy link
Member

OK, please rebase to check the CI.

@metaminux
Copy link
Author

H everyone,

CI is not OK after rebase, I'll convert this PR to draft for the moment because it seems to me that some others changes in the way odoo is loading modules are preventing post-* and end-* migration scripts to execute for newly installed ones...

@metaminux metaminux marked this pull request as draft January 9, 2024 11:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
5 participants