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
[FIX] core: harden the legacy migrations
package matching regex
#136282
Conversation
Since odoo#122569, we now try to import the `migrations` sub-package of each module to find upgrade tests. However, this badly written regex match the OCA module `base_maintenance`, which generate a RecursionError.
@pedrobaeza Can you test if this solves your problem? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the quick reaction, Christophe.
This patch avoids the recursion problem indeed, tested on my local. And code reviewing it, it's correct to escape the points, as we want the literal char, not a wildcard.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the fast fix!
@robodoo r+ |
Upgrade (aka migration) scripts are a core part of Odoo, allowing database manipulations for modules during version changes. Any module, including custom ones can run upgrade scripts, even if the `--upgrade-path` flag (and with it, the `odoo.upgrade` sub-module) is not present. Currently only the "standard" modules benefit of easy upgrade script testing. Any custom modules that want to run tests of their upgrades have to import the tests in the usual `tests` folder, which is not ideal. Therefore, to allow TDD and programmatic testing of upgrade scripts in custom modules, the test discovery is here modified to also parse the module's `migrations` and `upgrades` sub-modules for tests. closes #136130 X-original-commit: 483cc20 Signed-off-by: Christophe Simonis (chs) <chs@odoo.com> Signed-off-by: Vranckx Florian (flvr) <flvr@odoo.com>
@KangOl this pull request has forward-port PRs awaiting action (not merged or closed): |
Since odoo#122569, we now try to import the migrations sub-package of each module to find upgrade tests. However, this badly written regex match the OCA module base_maintenance, which generate a RecursionError. It was partially fixed on odoo#136282 but some collateral damages where raised on tests
Since #122569, we now try to import the migrations sub-package of each module to find upgrade tests. However, this badly written regex match the OCA module base_maintenance, which generate a RecursionError. It was partially fixed on #136282 but some collateral damages where raised on tests closes #145800 Signed-off-by: Christophe Simonis (chs) <chs@odoo.com>
Since odoo#122569, we now try to import the migrations sub-package of each module to find upgrade tests. However, this badly written regex match the OCA module base_maintenance, which generate a RecursionError. It was partially fixed on odoo#136282 but some collateral damages where raised on tests closes odoo#145800 Signed-off-by: Christophe Simonis (chs) <chs@odoo.com>
Since odoo#122569, we now try to import the migrations sub-package of each module to find upgrade tests. However, this badly written regex match the OCA module base_maintenance, which generate a RecursionError. It was partially fixed on odoo#136282 but some collateral damages where raised on tests closes odoo#145800 Signed-off-by: Christophe Simonis (chs) <chs@odoo.com>
Since #122569, we now try to import the
migrations
sub-package of each module to find upgrade tests.However, this badly written regex match the OCA module
base_maintenance
, which generate a RecursionError.I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr