prometheus / prometheus/client_python

TestGauge::test_time_block_decorator_with_label failure

Đang mở
#942 4 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
4.4k
Fork
876
Merge trung bình
8 ngày 4 giờ
Pull request đã merge (30 ngày)
1

Mô tả

Hi, I am running the test suite on some obscure architectures and observed a failure on alpha, with one test:

========================================================================= FAILURES =========================================================================
______________________________________________________ TestGauge.test_time_block_decorator_with_label ______________________________________________________

self = <tests.test_core.TestGauge testMethod=test_time_block_decorator_with_label>

    def test_time_block_decorator_with_label(self):
        value = self.registry.get_sample_value
        self.assertEqual(None, value('g2', {'label1': 'foo'}))
        with self.gauge_with_label.time() as metric:
            metric.labels('foo')
>       self.assertLess(0, value('g2', {'label1': 'foo'}))
E       AssertionError: 0 not less than 0.0

metric     = <prometheus_client.context_managers.Timer object at 0x20007441790>
self       = <tests.test_core.TestGauge testMethod=test_time_block_decorator_with_label>
value      = <bound method CollectorRegistry.get_sample_value of <prometheus_client.registry.CollectorRegistry object at 0x20007441310>>

tests/test_core.py:255: AssertionError

This is fully reproducible, and I tested on both python3.10 and python3.11 with same results.

Complete log: 41y0768.log

Any help on why this test could be failing? I know this is an unusual platform, so I can provide shell access to the machine in question if somebody would mind taking a look. I can also interactively debug, or test patches as needed.

Thank you!

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

Mở hướng dẫn đóng góp

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_core.py:255 và bài kiểm tra TestGauge.test_time_block_decorator_with_label. Tái hiện lỗi trên nền tảng alpha được báo cáo bằng Python 3.10 hoặc 3.11, sau đó kiểm tra đầy đủ 41y0768.log và hành vi định thời của gauge. Công việc được xem là hoàn tất khi đã xác định được nguyên nhân đặc thù của nền tảng và bài kiểm tra chạy đạt mà không làm hồi quy hành vi đã được báo cáo.

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

Đánh giá

Công nghệ
python
Lĩnh vực
testing-qa
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
42/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.