Consider softening "Connection must have a server address" from ValueError to warning when workbook has a single embedded connection
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
- 50/100
Hướng nghiên cứu
Start in request_factory.py at _add_connections_element around lines 45-46, then inspect how ConnectionItem values become connection XML. Confirm the single-connection and multi-connection cases described in the issue, and check existing tests around connection generation if present. Done means a missing server_address is allowed for one connection while the multi-connection requirement remains enforced.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
Summary
_add_connections_element in request_factory.py:45-46 raises ValueError("Connection must have a server address") whenever a caller passes a ConnectionItem with no server_address. That check has been in place since TSC 0.19 (June 2022, commit 1eeaca87). Proposing that we consider softening it, or at minimum making the requirement conditional.
Why this is worth revisiting
This isn't required for workbooks with only a single connection:
- Multi-connection (federated) workbooks —
server_addressis genuinely needed as the matching key so Tableau Server can bind credentials to the right embedded connection. The current strict check is correct here. - Single-connection workbooks — the workbook's TWB has exactly one
<connection>element; the server can unambiguously match credentials to it. Requiring the caller to specifyserver_addressis redundant.
Practical impact today: tabcmd Classic (--db-username/--db-password) never required a database-server flag from users, because the vast majority of published workbooks have a single embedded connection. tabcmd 2 is now being forced to add a --db-server flag (tabcmd PR #458) purely to satisfy this TSC precondition, which regresses parity with Classic and breaks existing user workflows.
Suggested options (in order of scope)
- Warn, don't raise. Log a warning when
server_addressis missing and let the Tableau Server REST API reject the request if it genuinely cannot disambiguate. Server-side errors will be more informative than a client-side blanket rejection. - Conditional strictness. If the caller passes exactly one
ConnectionIteminconnections=[...], allowserver_address=Noneand omit the attribute from the emitted<connection>XML. Require it only whenlen(connections) > 1.
Option (2) seems like the best balance: keeps the safety net for the ambiguous case, restores the ergonomic single-connection path.
References
- Failure surfaced by tabcmd/pull/458, which works around this by adding a new required
--db-serverCLI flag. - Original tabcmd 2 feature request: tabcmd/issues/255.
- Ngôn ngữ chính
- Python
- Star
- 716
- Fork
- 446
- Merge trung bình
- 8 ngày 8 giờ
- Pull request đã merge (30 ngày)
- 2
Hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- 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.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của tableau/server-client-python
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 70/100
tableau/server-client-python#1865 ·
-
in-progress
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
tableau/server-client-python#1829 · 1 bình luận ·
-
enhancement gap needs investigation
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 68/100
tableau/server-client-python#1322 · 1 bình luận ·
-
[Type2] Allow Incremental Refresh type schedules to be added via `server.schedules.add_to_schedule` Đang mởhelp wanted Server-Side Enhancement ui-exists
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 68/100
tableau/server-client-python#1101 · 3 bình luận ·
-
enhancement good first issue
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 68/100
tableau/server-client-python#783 · 5 bình luận ·
Tất cả issue của tableau/server-client-python
Issue tương tự
-
sponsored
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 65/100
-
opensubtitlescom: moviehash never sent when opensubtitles (.org) is not in the provider list Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 86/100
Diaoul/subliminal#1382 ·
-
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 92/100
-
triage/confirmed
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 88/100
agentscope-ai/agentscope#2775 ·
-
worker.gpuVendors silently accepts unsupported/misspelled vendor names — no validation guard Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 84/100