Skip to content

Fix publish failures when using embedded db credentials - #458

Open
fujihara wants to merge 4 commits into
tableau:mainfrom
fujihara:fix-publish-embed-credentials
Open

Fix publish failures when using embedded db credentials#458
fujihara wants to merge 4 commits into
tableau:mainfrom
fujihara:fix-publish-embed-credentials

Conversation

@fujihara

Copy link
Copy Markdown

Summary

  • Publishing a workbook with --db-username/--db-password/--save-db-password or --oauth-username always failed with ValueError: Connection must have a server address, because the ConnectionItem built for the workbook's connections= payload never set server_address. tableauserverclient 0.41 now hard-requires it.
  • Fixing that surfaced a second latent bug: publish_workbook_file() passed the bare ConnectionItem instead of wrapping it in a list, causing TypeError: object of type 'ConnectionItem' has no len().
  • Added a new optional --db-server CLI flag so users can supply the database server address to associate with the embedded connection credentials. When omitted, server_address is left unset (None), matching the flag's optional nature.
  • Fixed publish_workbook_file() to pass connections=[credentials] (a list) instead of the bare ConnectionItem, matching what tableauserverclient expects.
  • Added localized help text for the new flag (publish.options.db-server) across all supported locales (de, en, es, fr, ga, it, ja, ko, pt, sv, zh), including recompiled .mo catalogs.

Test plan

  • python -m pytest tests/ -v — 318 passed, 2 skipped (pre-existing, unrelated), 0 failed
  • python -m pytest tests/commands/test_publish_command.py -v — 10/10 passing, including coverage for server_address being set from --db-server and for the None case, and for the wrapped-list connections payload
  • Verified tabcmd publish --help renders the new --db-server flag and localized help text (spot-checked en and de/pt via LANG override)
  • Manually reproduced the original failure and confirmed the patched flow builds a valid publish request (mocked server.workbooks.publish call)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant