Skip to content

Fix CI in 14.0#3281

Merged
OCA-git-bot merged 1 commit intoOCA:14.0from
PyTech-SRL:14.0-fix-tests
Sep 17, 2025
Merged

Fix CI in 14.0#3281
OCA-git-bot merged 1 commit intoOCA:14.0from
PyTech-SRL:14.0-fix-tests

Conversation

@SirPyTech
Copy link
Copy Markdown
Contributor

We have noticed that the tests in 14.0 are failing, this is a known issue for (at least one of) @OCA/web-maintainers:

old js tests are a mess, and I've given up trying to fix them

Originally posted by @hbrunn in #2433 (review)

I have managed to fix one of the failures but can't reproduce the others, like:

2025-09-04 20:15:20,723 550 ERROR odoo odoo.addons.web_disable_export_group.tests.test_tour: FAIL: TestTour.test_user_not_export
Traceback (most recent call last):
  File "/__w/web/web/web_disable_export_group/tests/test_tour.py", line 30, in test_user_not_export
    self.start_tour("/web", "export_tour_xlsx_button_ko", login="user_not_export")
  File "/opt/odoo/odoo/tests/common.py", line 1563, in start_tour
    res = self.browser_js(url_path=url_path, code=code, ready=ready, **kwargs)
  File "/opt/odoo/odoo/tests/common.py", line 1535, in browser_js
    self.assertTrue(self.browser._wait_ready(ready), 'The ready "%s" code was always falsy' % ready)
AssertionError: False is not true : The ready "odoo.__DEBUG__.services['web_tour.tour'].tours['export_tour_xlsx_button_ko'].ready" code was always falsy

(from https://github.com/OCA/web/actions/runs/17475451661/job/49634125811#step:8:674)

Does anybody have a clue?
Looks like all the failing tests are from module web_disable_export_group, should we disable them?

Let me know what you think, thanks!

Stack of error happening before this change:

2025-08-28 06:19:26,925 550 ERROR odoo odoo.tests.loader: Can not `import web_edit_user_filter`.
Traceback (most recent call last):
  File "/opt/odoo/odoo/tests/loader.py", line 29, in _get_tests_modules
    mod = importlib.import_module('.tests', modpath)
  File "/usr/lib/python3.6/importlib/__init__.py", line 126, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
  File "<frozen importlib._bootstrap>", line 994, in _gcd_import
  File "<frozen importlib._bootstrap>", line 971, in _find_and_load
  File "<frozen importlib._bootstrap>", line 955, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 665, in _load_unlocked
  File "<frozen importlib._bootstrap_external>", line 678, in exec_module
  File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed
  File "/__w/web/web/web_edit_user_filter/tests/__init__.py", line 1, in <module>
    from . import test_edit_user_filter
  File "/__w/web/web/web_edit_user_filter/tests/test_edit_user_filter.py", line 4, in <module>
    from odoo.tests.common import SingleTransactionCase, post_install
ImportError: cannot import name 'post_install'
@francesco-ooops
Copy link
Copy Markdown
Contributor

@OCA/web-maintainers could you please take a look? Thanks!

Copy link
Copy Markdown
Member

@etobella etobella left a comment

Choose a reason for hiding this comment

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

/ocabot merge patch

@OCA-git-bot
Copy link
Copy Markdown
Contributor

What a great day to merge this nice PR. Let's do it!
Prepared branch 14.0-ocabot-merge-pr-3281-by-etobella-bump-patch, awaiting test results.

OCA-git-bot added a commit that referenced this pull request Sep 11, 2025
Signed-off-by etobella
@OCA-git-bot
Copy link
Copy Markdown
Contributor

@etobella your merge command was aborted due to failed check(s), which you can inspect on this commit of 14.0-ocabot-merge-pr-3281-by-etobella-bump-patch.

After fixing the problem, you can re-issue a merge command. Please refrain from merging manually as it will most probably make the target branch red.

@francesco-ooops
Copy link
Copy Markdown
Contributor

Looks like all the failing tests are from module web_disable_export_group, should we disable them?

@etobella

@hbrunn
Copy link
Copy Markdown
Member

hbrunn commented Sep 12, 2025

thanks for looking into this. Disabling a test should be a last resort, first try to change /web into /web?debug=tests in

https://github.com/OCA/web/blob/14.0/web_disable_export_group/tests/test_tour.py#L27

and following.

I wonder why you can't reproduce this? Do you possibly not have the websocket library and/or chrome installed on your dev machine? Then -i web_disable_export_group --test-enable should give you a warning to that effect.

@etobella etobella mentioned this pull request Sep 12, 2025
@etobella
Copy link
Copy Markdown
Member

Quite funny, I made a PR to execute the module independently, and it gave the same error. However, in local the tests are executed.

It seems that the problem comes from here:

https://github.com/OCA/web/actions/runs/17665134973/job/50205409179?pr=3283#step:8:60

So, when it is making the first connection, it fails, but locally, it works as expected:

image

@hbrunn
Copy link
Copy Markdown
Member

hbrunn commented Sep 12, 2025

oh nice catch. Might be an issue with how v14 acts on github, as it looks like this is the only v14 js test. Could you try if requests.get('http://127.0.0.1:8069/web') actually returns a result before start_tour?

@etobella
Copy link
Copy Markdown
Member

It seems that it doesn't work, but why???

@hbrunn
Copy link
Copy Markdown
Member

hbrunn commented Sep 12, 2025

what error does the requests module return? timeout, connection refused, ...?

@etobella
Copy link
Copy Markdown
Member

Aborted.

2025-09-12 05:09:14,813 550 INFO odoo odoo.addons.web_disable_export_group.tests.test_tour.TestTour: Chrome pid: 561
2025-09-12 05:09:14,819 550 INFO odoo odoo.addons.web_disable_export_group.tests.test_tour.TestTour: Issuing json command http://127.0.0.1:36041/json/version
2025-09-12 05:09:14,842 550 INFO odoo odoo.addons.web_disable_export_group.tests.test_tour.TestTour: Browser version: Chrome/139.0.7258.127
2025-09-12 05:09:14,843 550 INFO odoo odoo.addons.web_disable_export_group.tests.test_tour.TestTour: Issuing json command http://127.0.0.1:36041/json
2025-09-12 05:09:14,856 550 INFO odoo odoo.addons.web_disable_export_group.tests.test_tour.TestTour: Chrome headless temporary user profile dir: /tmp/tmphkg6x4w1_chrome_odoo
2025-09-12 05:09:14,857 550 INFO odoo odoo.addons.web_disable_export_group.tests.test_tour.TestTour: Websocket url found: ws://127.0.0.1:36041/devtools/page/CD6B8E45886C1EC318B843457213ADCA
2025-09-12 05:09:14,860 550 INFO odoo odoo.addons.web_disable_export_group.tests.test_tour.TestTour: Enable chrome headless console log notification
2025-09-12 05:09:14,860 550 INFO odoo odoo.addons.web_disable_export_group.tests.test_tour.TestTour: Chrome headless enable page notifications
2025-09-12 05:09:14,934 550 INFO odoo odoo.addons.base.models.res_users: Login successful for db:odoo login:admin from n/a
2025-09-12 05:09:14,936 550 INFO odoo odoo.addons.web_disable_export_group.tests.test_tour.TestTour: Setting session cookie in browser
2025-09-12 05:09:14,940 550 INFO odoo odoo.addons.web_disable_export_group.tests.test_tour.TestTour: Open "http://127.0.0.1:8069/web" in browser
2025-09-12 05:09:14,941 550 INFO odoo odoo.addons.web_disable_export_group.tests.test_tour.TestTour: Navigating to: "http://127.0.0.1:8069/web"
2025-09-12 05:09:14,944 550 INFO odoo odoo.addons.web_disable_export_group.tests.test_tour.TestTour: Navigation result: {'id': 3, 'result': {'frameId': 'CD6B8E45886C1EC318B843457213ADCA', 'loaderId': '8C964346022E30AACF6921088E4B4A73', 'errorText': 'net::ERR_ABORTED'}}

@hbrunn
Copy link
Copy Markdown
Member

hbrunn commented Sep 12, 2025

that's chrome's quite unhelpful error message, that's why I asked you to make a request yourself and see what you get back there

@francesco-ooops
Copy link
Copy Markdown
Contributor

@hbrunn @etobella any update?

@yvaucher
Copy link
Copy Markdown
Member

@francesco-ooops OCA/oca-ci#109 was merged just few minutes ago. Let's restart the CI jobs.

@yvaucher
Copy link
Copy Markdown
Member

All green, let's merge 🚀

@yvaucher
Copy link
Copy Markdown
Member

/ocabot merge patch

@OCA-git-bot
Copy link
Copy Markdown
Contributor

This PR looks fantastic, let's merge it!
Prepared branch 14.0-ocabot-merge-pr-3281-by-yvaucher-bump-patch, awaiting test results.

OCA-git-bot added a commit that referenced this pull request Sep 17, 2025
Signed-off-by yvaucher
@OCA-git-bot
Copy link
Copy Markdown
Contributor

@yvaucher your merge command was aborted due to failed check(s), which you can inspect on this commit of 14.0-ocabot-merge-pr-3281-by-yvaucher-bump-patch.

After fixing the problem, you can re-issue a merge command. Please refrain from merging manually as it will most probably make the target branch red.

@yvaucher
Copy link
Copy Markdown
Member

Still failing on only one test, I misread the list of checks. There is progress.

@yvaucher
Copy link
Copy Markdown
Member

yvaucher commented Sep 17, 2025

The last error seems related to the ci images not properly built in some case. More on #odoo-ci/109

@SirPyTech
Copy link
Copy Markdown
Contributor Author

/ocabot merge patch

Please try again, all the builds are green now in https://github.com/OCA/oca-ci.
Thanks for your work 🙏

@yvaucher
Copy link
Copy Markdown
Member

/ocabot merge patch

@OCA-git-bot
Copy link
Copy Markdown
Contributor

What a great day to merge this nice PR. Let's do it!
Prepared branch 14.0-ocabot-merge-pr-3281-by-yvaucher-bump-patch, awaiting test results.

@OCA-git-bot
Copy link
Copy Markdown
Contributor

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

@OCA-git-bot OCA-git-bot merged commit 20fff6b into OCA:14.0 Sep 17, 2025
15 of 19 checks passed
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