Fix publish failures when using embedded db credentials - #458
Open
fujihara wants to merge 4 commits into
Open
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
--db-username/--db-password/--save-db-passwordor--oauth-usernamealways failed withValueError: Connection must have a server address, because theConnectionItembuilt for the workbook'sconnections=payload never setserver_address.tableauserverclient0.41 now hard-requires it.publish_workbook_file()passed the bareConnectionIteminstead of wrapping it in a list, causingTypeError: object of type 'ConnectionItem' has no len().--db-serverCLI flag so users can supply the database server address to associate with the embedded connection credentials. When omitted,server_addressis left unset (None), matching the flag's optional nature.publish_workbook_file()to passconnections=[credentials](a list) instead of the bareConnectionItem, matching whattableauserverclientexpects.publish.options.db-server) across all supported locales (de, en, es, fr, ga, it, ja, ko, pt, sv, zh), including recompiled.mocatalogs.Test plan
python -m pytest tests/ -v— 318 passed, 2 skipped (pre-existing, unrelated), 0 failedpython -m pytest tests/commands/test_publish_command.py -v— 10/10 passing, including coverage forserver_addressbeing set from--db-serverand for theNonecase, and for the wrapped-listconnectionspayloadtabcmd publish --helprenders the new--db-serverflag and localized help text (spot-checkedenandde/ptviaLANGoverride)server.workbooks.publishcall)