OCA / pos

GNU Affero General Public License v3.0
283 stars 602 forks source link

V16 branch looks broken. #1124

Open legalsylvain opened 10 months ago

legalsylvain commented 10 months ago

blocked PRs :

...

ivantodorovich commented 10 months ago

Indeed, it seems related to: pos_customer_comment

2024-01-03 10:39:23,225 339 ERROR odoo odoo.addons.pos_customer_comment.tests.test_module: FAIL: TestUi.test_pos_customer_comment
Traceback (most recent call last):
  File "/__w/pos/pos/pos_customer_comment/tests/test_module.py", line 17, in test_pos_customer_comment
    self.start_tour(
  File "/opt/odoo/odoo/tests/common.py", line 1789, in start_tour
    return self.browser_js(url_path=url_path, code=code, ready=ready, **kwargs)
  File "/opt/odoo/odoo/tests/common.py", line 1769, in browser_js
    self.fail('%s\n\n%s' % (message, error))
AssertionError: The test code "odoo.startTour('PosCustomerCommentTour')" failed

TypeError: Cannot read properties of null (reading 'name')
    at Chrome.template (eval at compile (http://127.0.0.1:8069/web/assets/512-2246854/web.assets_common.min.js:2058:374), <anonymous>:90:147)
    at node.renderFn (http://127.0.0.1:8069/web/assets/512-2246854/web.assets_common.min.js:1614:207)
    at Fiber._render (http://127.0.0.1:8069/web/assets/512-2246854/web.assets_common.min.js:1496:96)
    at Fiber.render (http://127.0.0.1:8069/web/assets/512-2246854/web.assets_common.min.js:1495:6)
    at ComponentNode.render (http://127.0.0.1:8069/web/assets/512-2246854/web.assets_common.min.js:1571:56)

and perhaps also pos_order_to_sale_order:

2024-01-03 10:39:46,438 339 ERROR odoo odoo.addons.pos_order_to_sale_order.tests.test_module: FAIL: TestUi.test_pos_order_to_sale_order
Traceback (most recent call last):
  File "/__w/pos/pos/pos_order_to_sale_order/tests/test_module.py", line 36, in test_pos_order_to_sale_order
    self.assertEqual(len(before_orders) + 1, len(after_orders))
AssertionError: 1 != 0
legalsylvain commented 10 months ago

Indeed, it seems related to: pos_customer_comment

Indeed. however, in both cases (pos_customer_comment and pos_order_to_sale_order), it is related to another module, that make the test failing. (I tested to install pos_customer_comment without other OCA modules, and the test are OK).

didn't more investigated though.

legalsylvain commented 10 months ago

Hi @ivantodorovich. I need help on that topic. Investigation done : 1) unit Test

2) Run the following command. Tried to reproduce error on github :

(initialize Test DB) run_odoo_16 -d test_bug -i account_financial_risk,base_automation,delivery,membership,partner_contact_birthdate,partner_firstname,point_of_sale,pos_discount,pos_loyalty,pos_sale,product_multi_barcode,product_packaging_multi_barcode,sale,sale_financial_risk,stock_available --stop-after-init

(Run test) run_odoo_16 -d test_bug -i pos_access_right,pos_customer_comment,pos_default_partner,pos_discount_all,pos_edit_order_line,pos_escpos_status,pos_financial_risk,pos_global_discount_in_line,pos_lot_barcode,pos_lot_selection,pos_loyalty_redeem_payment,pos_margin,pos_membership,pos_minimize_menu,pos_order_remove_line,pos_order_reorder,pos_order_to_sale_order,pos_order_to_sale_order_delivery,pos_order_to_sale_order_report,pos_order_to_sale_order_sale_financial_risk,pos_partner_birthdate,pos_partner_firstname,pos_payment_change,pos_payment_terminal,pos_product_display_default_code,pos_product_label,pos_product_multi_barcode,pos_product_packaging_multi_barcode,pos_product_quick_info,pos_receipt_hide_price,pos_reset_search,pos_sale_order_print,pos_stock_available_online --test-enable --stop-after-init

All is green. How to move forward ?

ivantodorovich commented 10 months ago

Indeed, I've just checked on my side and I also green lights

I've just triggered a re-run of the failed job: https://github.com/OCA/pos/actions/runs/7396233081/job/20495822404 and it seems to be green now.

It's also weird that, at the time, only the upstream odoo tests failed, whilst the OCA/OCB passed successfully.

It all seems to indicate it was either a temporary upstream bug that got fix, or a non-deterministic and difficult to reproduce bug in our project

My suggestion: let's close this for now and see if the issue comes back in the future

legalsylvain commented 10 months ago

thanks for the investigation.

legalsylvain commented 10 months ago

Hi.

new PR failing : https://github.com/OCA/pos/pull/1131 both tests are red : https://github.com/OCA/pos/actions/runs/7562994110

@OCA/pos-maintainers : Did you already faced such issue ? That's quite annoying.

In fact, before the main error, there is another error "Error received after termination: OwlError: Missing template: "Chrome" (for component "Chrome")".

Main error

2024-01-17 23:22:34,327 341 ERROR odoo odoo.addons.pos_customer_comment.tests.test_module: FAIL: TestUi.test_pos_customer_comment
Traceback (most recent call last):
  File "/__w/pos/pos/pos_customer_comment/tests/test_module.py", line 17, in test_pos_customer_comment
    self.start_tour(
  File "/opt/odoo/odoo/tests/common.py", line 1789, in start_tour
    return self.browser_js(url_path=url_path, code=code, ready=ready, **kwargs)
  File "/opt/odoo/odoo/tests/common.py", line 1769, in browser_js
    self.fail('%s\n\n%s' % (message, error))
AssertionError: The test code "odoo.startTour('PosCustomerCommentTour')" failed

UncaughtError: Service pos_discount_all.models already defined
    at odoo.define (http://127.0.0.1:8069/web/assets/512-1c02577/web.assets_common.min.js:22:29)
    at http://127.0.0.1:8069/web/assets/503-be80179/point_of_sale.assets.min.js:6071:6
    at odoo.define (http://127.0.0.1:8069/web/assets/512-1c02577/web.assets_common.min.js:21:28)
    at  (http://127.0.0.1:8069/web/assets/503-be80179/point_of_sale.assets.min.js:6070:5)

Previous Error :

2024-01-17 23:22:33,524 341 ERROR odoo odoo.addons.pos_customer_comment.tests.test_module.TestUi.browser: Error received after termination: OwlError: Missing template: "Chrome" (for component "Chrome")
    at owl.App.getTemplate (http://127.0.0.1:8069/web/assets/512-1c02577/web.assets_common.min.js:1715:7)
    at new ComponentNode (http://127.0.0.1:8069/web/assets/512-1c02577/web.assets_common.min.js:1558:133)
    at http://127.0.0.1:8069/web/assets/512-1c02577/web.assets_common.min.js:2098:6
    at ChromeAdapter.template (eval at compile (http://127.0.0.1:8069/web/assets/512-1c02577/web.assets_common.min.js:2058:374), <anonymous>:9:27)
    at Fiber._render (http://127.0.0.1:8069/web/assets/512-1c02577/web.assets_common.min.js:1496:96)
    at Fiber.render (http://127.0.0.1:8069/web/assets/512-1c02577/web.assets_common.min.js:1495:6)
    at ComponentNode.initiateRender (http://127.0.0.1:8069/web/assets/512-1c02577/web.assets_common.min.js:1563:47) 
2024-01-17 23:22:33,525 341 ERROR odoo odoo.addons.pos_customer_comment.tests.test_module.TestUi.browser: Error received after termination: OwlError: Missing template: "Chrome" (for component "Chrome")
    at owl.App.getTemplate (http://127.0.0.1:8069/web/assets/512-1c02577/web.assets_common.min.js:1715:7)
    at new ComponentNode (http://127.0.0.1:8069/web/assets/512-1c02577/web.assets_common.min.js:1558:133)
    at http://127.0.0.1:8069/web/assets/512-1c02577/web.assets_common.min.js:2098:6
    at ChromeAdapter.template (eval at compile (http://127.0.0.1:8069/web/assets/512-1c02577/web.assets_common.min.js:2058:374), <anonymous>:9:27)
    at Fiber._render (http://127.0.0.1:8069/web/assets/512-1c02577/web.assets_common.min.js:1496:96)
    at Fiber.render (http://127.0.0.1:8069/web/assets/512-1c02577/web.assets_common.min.js:1495:6)
    at ComponentNode.initiateRender (http://127.0.0.1:8069/web/assets/512-1c02577/web.assets_common.min.js:1563:47) 
legalsylvain commented 9 months ago

I don't understand such bug. OCB is failing, Odoo is working...

image

https://github.com/OCA/pos/pull/1127

ivantodorovich commented 9 months ago

I'm puzzled, too :(

I'll try to allocate some time to investigate soon

github-actions[bot] commented 3 months ago

There hasn't been any activity on this issue in the past 6 months, so it has been marked as stale and it will be closed automatically if no further activity occurs in the next 30 days. If you want this issue to never become stale, please ask a PSC member to apply the "no stale" label.