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

Merged
merged 2 commits into from
Feb 6, 2025

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.

@legalsylvain
Copy link
Contributor

Hi. @remi-filament Could you take a time to finish this PR ? (the code are conflicting for the time being).

@remi-filament remi-filament force-pushed the 16.0-ou-imp-project_update_version branch from 51e27fb to 6f994ee Compare February 6, 2025 13:11
@remi-filament
Copy link
Contributor Author

Done @legalsylvain

@MiquelRForgeFlow
Copy link
Contributor

/ocabot merge nobump

@OCA-git-bot
Copy link
Contributor

What a great day to merge this nice PR. Let's do it!
Prepared branch 16.0-ocabot-merge-pr-4362-by-MiquelRForgeFlow-bump-nobump, awaiting test results.

Copy link
Member

@StefanRijnhart StefanRijnhart left a comment

Choose a reason for hiding this comment

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

Looking good now! I see that there is already a 16.0.1.3/noupdate_changes.xml and it is identical to the one you are deleting here. The difference between 16.0.1.3/upgrade_analysis.txt and the one you are deleting here is merged by you in update_analysis_work.txt. Thanks!

diff 16.0.1.{2,3}/upgrade_analysis.txt
56a57
> NEW ir.rule: project.project_milestone_rule_portal_project_sharing (noupdate)
73a75
> DEL ir.ui.view: project_account.res_config_settings_view_form

@OCA-git-bot
Copy link
Contributor

This PR has the approved label and has been created more than 5 days ago. It should therefore be ready to merge by a maintainer (or a PSC member if the concerned addon has no declared maintainer). 🤖

@remi-filament
Copy link
Contributor Author

Looking good now! I see that there is already a 16.0.1.3/noupdate_changes.xml and it is identical to the one you are deleting here.

Thanks @StefanRijnhart and @MiquelRForgeFlow

This is because in this PR at first I just moved the repo from 16.0.1.2 to 16.0.1.3, but in the meantime there was this PR merged which created the 16.0.1.3 with new analysis : #4696

To keep it simple, I just rebased my branch on 16.0, which is why it is still moving the 16.0.1.2 to 16.0.1.3 (but since files existed in v16, it shows as if the 16.0.1.2 were removed).

@OCA-git-bot OCA-git-bot merged commit 41fd445 into OCA:16.0 Feb 6, 2025
2 checks passed
@OCA-git-bot
Copy link
Contributor

Congratulations, your PR was merged at 41fd445. Thanks a lot for contributing to OCA. ❤️

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants