Skip to content

[FIX][module_auto_update] Always store changes in lower graphs - #953

Merged
pedrobaeza merged 5 commits into
OCA:9.0from
Tecnativa:9.0-module_auto_update-fix_base_endless_update
Aug 30, 2017
Merged

[FIX][module_auto_update] Always store changes in lower graphs#953
pedrobaeza merged 5 commits into
OCA:9.0from
Tecnativa:9.0-module_auto_update-fix_base_endless_update

Conversation

@yajo

@yajo yajo commented Aug 29, 2017

Copy link
Copy Markdown
Member

The same problem that was fixed for the base addon in #948 happened with random addons that do not depend on module_auto_update (a.k.a. any addon) that Odoo decided to load before that one in the graph.

Now we always check for all addons if their state has changed, and make sure to trigger the udpate mechanism that stores the right value in installed_checksum_dir field.

@Tecnativa

The same problem that was fixed for the `base` addon in OCA#948 happened with random addons that do not depend on `module_auto_update` (a.k.a. any addon) that Odoo decided to load before that one in the graph.

Now we always check for all addons if their state has changed, and make sure to trigger the udpate mechanism that stores the right value in `installed_checksum_dir` field.
@yajo yajo self-assigned this Aug 29, 2017
@yajo
yajo requested review from lasley and pedrobaeza August 29, 2017 08:59
@yajo yajo added this to the 9.0 milestone Aug 29, 2017
If you tried to uninstall the addon, you'd get a transaction lock that is now prevented by using autocommit cursor mode.

If you installed and uninstalled the addon right away, you'd get a ProgrammingError saying that some columns exist no more. Checks are done now using `search_read`, which lets us limit the fields being fetched, and the environment is cleared to make sure nothing fails.

Also we now guess if this own addon has been uninstalled and skip further logic if so, given it would hit broken triggers otherwise as it did before.
@yajo
yajo force-pushed the 9.0-module_auto_update-fix_base_endless_update branch from 0757449 to 6af33fa Compare August 29, 2017 12:59
@yajo

yajo commented Aug 29, 2017

Copy link
Copy Markdown
Member Author

This addon was being hit by several other problems as explained in last commit. Quoting myself from there:

If you tried to uninstall the addon, you'd get a transaction lock that is now prevented by using autocommit cursor mode.

If you installed and uninstalled the addon right away, you'd get a ProgrammingError saying that some columns exist no more. Checks are done now using search_read, which lets us limit the fields being fetched, and the environment is cleared to make sure nothing fails.

Also we now guess if this own addon has been uninstalled and skip further logic if so, given it would hit broken triggers otherwise as it did before.

It should work as expected in every aspect now.

@yajo
yajo force-pushed the 9.0-module_auto_update-fix_base_endless_update branch from b645684 to 8882dda Compare August 30, 2017 08:52

@pedrobaeza pedrobaeza left a comment

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.

Tested in our own instance.

@lasley lasley left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Awesome thanks @yajo

Interesting how many edge cases we ended up with here.

Tested in my own instance last night as well.

@pedrobaeza
pedrobaeza merged commit bde0289 into OCA:9.0 Aug 30, 2017
@pedrobaeza
pedrobaeza deleted the 9.0-module_auto_update-fix_base_endless_update branch August 30, 2017 16:43
sbidoul pushed a commit to acsone/server-tools that referenced this pull request Mar 22, 2018
SiesslPhillip pushed a commit to grueneerde/OCA-server-tools that referenced this pull request Nov 20, 2024
Syncing from upstream OCA/server-tools (15.0)
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.

3 participants