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][OU-IMP] project: bump version to 1.3 #4362

Open
wants to merge 1 commit into
base: 16.0
Choose a base branch
from

Conversation

remi-filament
Copy link
Contributor

Odoo PR odoo/odoo#144035 implemented a new version for project 1.3.
When discussing about #4361 @pedrobaeza suggested that it should be better to get the latest version in OpenUpgrade, so I just renamed version from 16.0.1.2 to 16.0.1.3.

@remi-filament remi-filament force-pushed the 16.0-ou-imp-project_update_version branch from 6f3d882 to 51e27fb Compare March 28, 2024 08:54
@legalsylvain
Copy link
Contributor

Hi @remi-filament. Could you take a look on the CI error ?
https://github.com/OCA/OpenUpgrade/actions/runs/8464763466/job/23190067891?pr=4362#step:15:9091

2024-03-28 09:00:44,262 22332 ERROR openupgrade odoo.addons.project_migration_tests.test_project_migration: FAIL: TestProjectMigration.test_project_allow_milestones
Traceback (most recent call last):
  File "/home/runner/work/OpenUpgrade/OpenUpgrade/openupgrade/openupgrade_scripts/scripts/project/16.0.1.3/tests/test_project_migration.py", line 13, in test_project_allow_milestones
    self.assertTrue(project.allow_milestones)
AssertionError: False is not true

@remi-filament
Copy link
Contributor Author

Hi @remytms
I am reaching out to you since this update on project version seems to be failing because of the tests that you added on project migration scripts. According to logs :

2024-03-28 09:00:44,047 22332 INFO openupgrade odoo.addons.base.models.ir_module: module project: loading translation file fr for language fr_FR 
2024-03-28 09:00:44,258 22332 INFO openupgrade odoo.addons.project_migration_tests.test_project_migration: Starting TestProjectMigration.test_project_allow_milestones ... 
2024-03-28 09:00:44,262 22332 INFO openupgrade odoo.addons.project_migration_tests.test_project_migration: ====================================================================== 
2024-03-28 09:00:44,262 22332 ERROR openupgrade odoo.addons.project_migration_tests.test_project_migration: FAIL: TestProjectMigration.test_project_allow_milestones
Traceback (most recent call last):
  File "/home/runner/work/OpenUpgrade/OpenUpgrade/openupgrade/openupgrade_scripts/scripts/project/16.0.1.3/tests/test_project_migration.py", line 13, in test_project_allow_milestones
    self.assertTrue(project.allow_milestones)
AssertionError: False is not true
 
2024-03-28 09:00:44,400 22332 INFO openupgrade odoo.addons.base.models.ir_attachment: filestore gc 0 checked, 0 removed 
2024-03-28 09:00:44,450 22332 INFO openupgrade odoo.modules.loading: Module project loaded in 4.94s (incl. 0.14s test), 4717 queries (+8 test, +4720 other) 
2024-03-28 09:00:44,451 22332 ERROR openupgrade odoo.modules.loading: Module project: 1 failures, 0 errors of 1 tests 

I tried looking at the tests for last commit on PR 4289, and it seems these tests were not run :

2024-02-22 14:36:07,724 22234 INFO openupgrade odoo.addons.base.models.ir_module: module project: loading translation file fr for language fr_FR 
2024-02-22 14:36:08,046 22234 INFO openupgrade odoo.modules.loading: Module project loaded in 5.14s, 4692 queries (+4695 other) 

So I am not sure if these tests should be working on OCA CI ? Also, it seems to me that on fresh Odoo 16 with demo data, allow_milestones are all false (checked on Odoo runbot) :
> search -m project.project -f id,name,allow_milestones

id name allow_milestones
#4 Camera Installation false
#1 Office Design false
#3 Renovations false
#2 Research & Development false

Any hint here would be appreciated ? (maybe the above is not the reason why the test is failing ?)
Thanks !

@remi-filament
Copy link
Contributor Author

Hi @legalsylvain I was, our comments came almost at the same time. I do not understand why the test is failing, when looking at previous execution (on PR that added project or on #4361 I made this morning), I do not see this failure, but also, I do not see any hint that this test was run, so I suspect that this test may never have been run before, is that possible ?

@MiquelRForgeFlow
Copy link
Contributor

Shouldn't it be better to rerun a new analysis? and then do the necessary changes to adapt to the new results?

@MiquelRForgeFlow MiquelRForgeFlow added this to the 16.0 milestone Mar 28, 2024
@remi-filament
Copy link
Contributor Author

Hi @MiquelRForgeFlow I did a new analysis, you have the following changes which should not have any impact :
To be added in upgrade_analysis.txt :
NEW ir.rule: project.project_milestone_rule_portal_project_sharing (noupdate)

If you think there is no added interest to move to this latest version in OpenUpgrade script, I can simply close this PR.

@StefanRijnhart
Copy link
Member

I don't think _fill_project_allow_milestones is actually called anywhere in https://github.com/OCA/OpenUpgrade/blob/51e27fbc6d109fc12f1df88b942fa1d58e81ff02/openupgrade_scripts/scripts/project/16.0.1.3/pre-migration.py

Can you add it?

@remytms
Copy link
Contributor

remytms commented Apr 23, 2024

@remi-filament Hi Rémi,

In short, I think that Stefan is right, the function _fill_project_allow_milestone is just missing from the main migration function.

I didn't look why theses tests does not fail previously.

About the fact of setting allow_milestone there is a discussion here with Pedro.

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