MagicStack / MagicStack/asyncpg

Test failure in test_executemany_server_failure_during_writes

Đang mở
#1,099 2 bình luận 0 reaction 0 người được giao Xem trên GitHub

Chưa có ai nhận issue này.

Ngôn ngữ chính
Python
Star
8.1k
Fork
468
Chỉ số merge pull request
Không có pull request nào được merge trong 30 ngày

Mô tả

  • asyncpg version: 0.29.0
  • PostgreSQL version: 15.4
  • Do you use a PostgreSQL SaaS? If so, which? Can you reproduce
    the issue with a local PostgreSQL install?
    : N/A, building the python-asyncpg package on Fedora Linux infrastructure
  • Python version: 3.12.0
  • Platform: Fedora Linux Rawhide, s390x architecture (only!)
  • Do you use pgbouncer?: No
  • Did you install asyncpg with pip?: No, I am the maintainer of the distribution package.
  • If you built asyncpg locally, which version of Cython did you use?: 0.29.35
  • Can the issue be reproduced under both asyncio and
    uvloop?
    : No, only asyncio. yes

This is new in 0.29.0. I don’t have any idea why it is happening.

I can’t reproduce this with PYTHONASYNCIODEBUG=1, nor can I reproduce it with USE_UVLOOP=1. I have now seen this on x86_64 with asyncio and PYTHONASYNCIODEBUG=1.

I don’t have interactive access to an s390x machine, but I am happy to run experiments or test proposed fixes by submitting package test builds on Fedora infrastructure. For the time being, I plan to simply skip this test on s390x.

=================================== FAILURES ===================================
________ TestExecuteMany.test_executemany_server_failure_during_writes _________
Traceback (most recent call last):
  File "/usr/lib64/python3.12/unittest/case.py", line 58, in testPartExecutor
    yield
  File "/usr/lib64/python3.12/unittest/case.py", line 634, in run
    self._callTestMethod(testMethod)
  File "/usr/lib64/python3.12/unittest/case.py", line 589, in _callTestMethod
    if method() is not None:
       ^^^^^^^^
  File "/builddir/build/BUILDROOT/python-asyncpg-0.29.0-1.fc40.s390x/usr/lib64/python3.12/site-packages/asyncpg/_testbase/__init__.py", line 92, in wrapper
    self.loop.run_until_complete(coro)
  File "/usr/lib64/python3.12/asyncio/base_events.py", line 664, in run_until_complete
    return future.result()
           ^^^^^^^^^^^^^^^
  File "/builddir/build/BUILD/asyncpg-0.29.0/tests/test_execute.py", line 215, in test_executemany_server_failure_during_writes
    self.assertLess(pos, 128, 'should stop early')
  File "/usr/lib64/python3.12/unittest/case.py", line 1257, in assertLess
    self.fail(self._formatMessage(msg, standardMsg))
  File "/usr/lib64/python3.12/unittest/case.py", line 715, in fail
    raise self.failureException(msg)
AssertionError: 128 not less than 128 : should stop early

Hướng dẫn đóng góp

Chưa lập chỉ mục được hướng dẫn đóng góp cho kho mã nguồn này

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Hướng nghiên cứu

Bắt đầu với tests/test_execute.py, đặc biệt là TestExecuteMany.test_executemany_server_failure_during_writes quanh assertion bị lỗi ở dòng 215. Tái hiện test bằng Python 3.12, PostgreSQL 15.4 và asyncio, sau đó so sánh vị trí quan sát được của 128 với việc dừng sớm mà test mong đợi. Được xem là hoàn tất khi đã hiểu lỗi và test luôn pass ổn định mà không có skip dành riêng cho nền tảng thiếu căn cứ.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Đánh giá

Công nghệ
postgresql, python
Lĩnh vực
backend, databases
Loại issue
Lỗi
Độ khó
3/5
Thời gian dự kiến
1-2 ngày
Mức độ hoạt động
Đình trệ
Độ rõ ràng
Khá rõ ràng
Mức phù hợp với người mới
35/100

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.