`connect_retries` and `connect_timeout` parameters don't have an effect

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

Maintainer thường phản hồi trong vòng 6 ngày

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

Đánh giá

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

Hướng nghiên cứu

Bắt đầu trong dbt/adapters/databricks/connections.py, tại phần mã liên quan đến việc thử lại quanh các dòng 778 và 1074, sau đó so sánh với các tham số được ghi trong tài liệu thiết lập Databricks. Tái hiện vấn đề bằng profiles.yml được cung cấp và lệnh dbt run; được xem là hoàn tất khi hành vi được ghi trong tài liệu của connect_retries và connect_timeout либо được khôi phục hoặc được ghi lại chính xác, bao gồm retry_all nếu nó vẫn còn cần thiết.

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

Mô tả

bug
Describe the bug

The connect_retries and connect_timeout parameters in the profiles.yml don't have the effect that is described in the docs.

The retry functionality seems to be implemented, but the list of exceptions for which a retry happens is empty by default (here and here). It is possible to configure the connector to retry on all exceptions by setting retry_all: true and this will make the connect_retries and connect_timeout have the documented effects, but the retry_all parameter is not documented. I only found it while checking the code.

Depending on the desired behavior I see various ways to fix this:

  1. Keep the existing behavior and update the documentation. For example by adding the retry_all parameter.
  2. Change the existing behavior to match the documentation. For example:
    a) Add transient exceptions to the retryable_exceptions list
    b) Set retry_all to true by default (not sure about the side effects though)
    c) Forward the connect_retries and connect_timeout parameters to the databricks sql connector, if this is possible.

I would be willing to implement a fix or to take a deeper look into the implications of the various fixes I've described.

Steps To Reproduce

I've created a profiles.yml with invalid connection parameters and a high number of connect_retries:

databricks:
  outputs:
    test:
      type: databricks
      host: invalid
      http_path: invalid
      token: invalid
      schema: schema
      connect_retries: 1000

then executed dbt run

Expected behavior

I expect 1000 retries. Instead dbt tries to establish the connection for 15 minutes, like it does when connect_retries is set to 1 and then fails.

System information

The output of dbt --version:

Core:
  - installed: 1.8.4
  - latest:    1.8.5 - Update available!

  Your version of dbt-core is out of date!
  You can find instructions for upgrading here:
  https://docs.getdbt.com/docs/installation

Plugins:
  - spark:      1.8.0 - Up to date!
  - databricks: 1.8.3 - Update available!

The operating system you're using:
Ubuntu 22.04
The output of python --version:
Python 3.10.12

Additional context

We use a classic warehouse on Azure for our daily jobs. By default dbt databricks tries for 15 minutes to establish a connection to the warehouse, but sometimes this is not enough for the warehouse to start.

Ngôn ngữ chính
Python
Star
391
Fork
231
Merge trung bình
9 ngày 7 giờ
Pull request đã merge (30 ngày)
29

Chuẩn bị môi trường

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 databricks/dbt-databricks

Tất cả issue của databricks/dbt-databricks

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.