Hacktoberfest 2026: los issues que los mantenedores marcaron para octubre, abiertos y aptos para principiantes. Explorar issues de Hacktoberfest

Consider softening "Connection must have a server address" from ValueError to warning when workbook has a single embedded connection

Abierto
#1,872 0 comentarios 0 reacciones 0 asignados Ver en GitHub

Nadie ha tomado este issue todavía.

Evaluación

Dificultad
4/5
Tiempo estimado
3-5 días
Aptitud para principiantes
50/100
Tipo de issue
Nueva funcionalidad
Claridad
Bastante claro
Estado de actividad
Activo
Stack tecnológico
python
Área
api

Línea de trabajo

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.

Escrito por el modelo de indexación a partir del texto del issue.

Descripción

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) workbooksserver_address is 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 specify server_address is 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)

  1. Warn, don't raise. Log a warning when server_address is 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.
  2. Conditional strictness. If the caller passes exactly one ConnectionItem in connections=[...], allow server_address=None and omit the attribute from the emitted <connection> XML. Require it only when len(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-server CLI flag.
  • Original tabcmd 2 feature request: tabcmd/issues/255.
Lenguaje dominante
Python
Estrellas
716
Forks
446
Merge medio
8 d 8 h
PR fusionados (30 d)
2

Guía de contribución

Abrir la guía de contribución

Primeros pasos

  1. Lee el issue completo y luego la guía de contribución del proyecto.
  2. Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
  3. Haz un fork del repositorio y trabaja en una rama.
  4. Abre un pull request que haga referencia al número del issue.

Más de tableau/server-client-python

Todos los issues de tableau/server-client-python

Issues similares

Más issues de Python

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.