Firebase Admin not retried on auth request connection error

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

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

Đánh giá

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

Hướng nghiên cứu

Bắt đầu tại HttpClient.init và theo dõi cách AuthorizedSession được tạo, sau đó kiểm tra AuthorizedSession.credentials.before_request để xác nhận các lần thử lại yêu cầu xác thực được cấu hình ở đâu. Xác minh rằng các yêu cầu xác thực bị ngắt kết nối sử dụng cấu hình thử lại dự kiến và hành vi thử lại yêu cầu hiện có vẫn không thay đổi.

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

Mô tả

api: core

Even though DEFAULT_RETRY_CONFIG is good enough

DEFAULT_RETRY_CONFIG = retry.Retry(
    connect=1, read=1, status=4, status_forcelist=[500, 503],
    raise_on_status=False, backoff_factor=0.5, **_ANY_METHOD)

I'm still periodically getting ('Connection aborted.', RemoteDisconnected('Remote end closed connection without response')). I started thinking it is very weird, because it seems that this connection error should be retried, no? It turned out, that this connection error occurs not in the request itself, which properly retries connection errors. It happens inside AuthorizedSession.credentials.before_request, which for auth requests instead of DEFAULT_RETRY_CONFIG uses

retry_adapter = requests.adapters.HTTPAdapter(max_retries=3)

I think the right approach would be to form auth_request manually with the correct retry config in HttpClient.__init__ and pass it to AuthorizedSession on creation.

What are your thoughts?

Ngôn ngữ chính
Python
Star
1.2k
Fork
359
Merge trung bình
5 ngày 6 phút
Pull request đã merge (30 ngày)
2

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.

Issue khác của firebase/firebase-admin-python

Tất cả issue của firebase/firebase-admin-python

Issue tương tự

Thêm issue về Python

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.