Skip to content

[17.0][FIX] test.yml: prevent infinite loop of makepot commits - #3254

Closed
StefanRijnhart wants to merge 1 commit into
OCA:17.0from
StefanRijnhart:17.0-dotfiles-make_pot_only_once
Closed

StefanRijnhart wants to merge 1 commit into
OCA:17.0from
StefanRijnhart:17.0-dotfiles-make_pot_only_once

Conversation

@StefanRijnhart

@StefanRijnhart StefanRijnhart commented Apr 4, 2025

Copy link
Copy Markdown
Member

Only run makepot once. The result will be equivalent in each of those jobs because the pot files will be generated for all the addons at once.

If there are more than one test run with different sets of modules, and in one of those modules a field is added to the base model, the makepot jobs will have different outcomes and will keep on reverting each other's changes upon subsequent test runs.

image
image
image

the result will be the same in each of those jobs because the pot files will be
generated for all the addons at once.

If there are more than one test run with different sets of modules, and in one of
those modules a field is added to the base model, the makepot jobs will have different
outcomes and will keep on reverting each other's changes upon subsequent test runs.
@ivs-cetmix

Copy link
Copy Markdown
Member

Hi @StefanRijnhart , thank you for your contribution! Are you still working on this task?

@StefanRijnhart

Copy link
Copy Markdown
Member Author

@ivs-cetmix Does it need more work?

@ivs-cetmix

Copy link
Copy Markdown
Member

@ivs-cetmix Does it need more work?

Not sure, I though you know this better) If you consider this done, then we can proceed with reviewing it.

@StefanRijnhart

Copy link
Copy Markdown
Member Author

Please do!

include:
- container: ghcr.io/oca/oca-ci/py3.10-odoo17.0:latest
include: "database_cleanup"
makepot: "true"

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Removing this one, no POT will be generated for database_cleanup AFAIK.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

I don't see any filtering in this code chain

https://github.com/OCA/oca-ci/blob/master/bin/oca_export_and_commit_pot#L15
https://github.com/acsone/click-odoo-contrib/blob/master/click_odoo_contrib/makepot.py#L155
https://github.com/acsone/click-odoo-contrib/blob/master/click_odoo_contrib/manifest.py#L39-L41

so it looks to me like a single run will generate POTs for all addons in the directory, regardless of include/exclude directives. Am I missing anything?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Ah sorry, it does say 'for installed addons' in that first link, so you are right. Will amend.

@StefanRijnhart

Copy link
Copy Markdown
Member Author

@pedrobaeza Improved version included in #3345.

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.

3 participants