Fix W-21968404: Make authentication_type optional in update_connections#1778
Open
vchavatapalli wants to merge 4 commits intotableau:developmentfrom
Open
Fix W-21968404: Make authentication_type optional in update_connections#1778vchavatapalli wants to merge 4 commits intotableau:developmentfrom
vchavatapalli wants to merge 4 commits intotableau:developmentfrom
Conversation
jorwoods/package install fix (jorwoods/package install fix tableau#1747) Revert "refer to single package entrypoint (refer to single package entrypoint tableau#1739)" This reverts commit 043efa1. fix: make pyproject.toml more explicity in what is included chore: remove commented out config Co-authored-by: Jordan Woods 13803242+jorwoods@users.noreply.github.com
This change addresses a usability issue where users were confused by the update_connections method name and were using it for general connection updates without realizing it required an authentication_type parameter. Changes: - Made authentication_type parameter optional in both datasource and workbook update_connections methods - Updated request_factory to only set authenticationType in XML when provided - Enhanced docstrings to clarify that authentication_type is optional and existing auth types are preserved when not specified - Updated sample script to demonstrate optional parameter usage - Added comprehensive tests for both datasources and workbooks when authentication_type is not provided Benefits: - Backward compatible: existing code continues to work - More flexible: users can now update credentials without changing auth type - Clearer intent: function can be used for both auth type changes and general credential updates - Better UX: eliminates confusion about the function's purpose The function safely iterates through each connection LUID independently, so there's no risk of cross-contamination when auth type is omitted. Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
|
Thanks for the contribution! Unfortunately we can't verify the commit author(s): Vineeth Sai Surya Chavatapalli <v***@s***.com>. One possible solution is to add that email to your GitHub account. Alternatively you can change your commits to another email and force push the change. After getting your commits associated with your GitHub account, refresh the status of this Pull Request. |
…thon into fix-update-connections-optional-auth # Conflicts: # samples/update_connection_auth.py # samples/update_connections_auth.py # tableauserverclient/server/endpoint/datasources_endpoint.py # tableauserverclient/server/endpoint/workbooks_endpoint.py # tableauserverclient/server/request_factory.py # test/test_datasource.py # test/test_workbook.py
c30fa2b to
354dc94
Compare
- Resolved remaining conflict markers in test_datasource.py and test_workbook.py - Added missing imports for read_xml_assets and asset from _utils - All black formatting checks now pass - All mypy type checks now pass These fixes ensure CI passes on macOS, Ubuntu, and Windows.
ca52d17 to
f0481fc
Compare
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.
Make the authentication_type parameter optional in update_connections
methods for both datasources and workbooks, allowing users to update
connection credentials without modifying the authentication type.
Problem
Users were confused by the update_connections method, attempting to use
it for general credential updates but encountering errors because
authentication_type was required. This forced them to specify an auth
type even when they only wanted to update usernames/passwords.
Solution
Made authentication_type parameter optional (default=None) in:
Updated XML request generation to only include authenticationType
attribute when explicitly provided
Enhanced docstrings to clarify that omitting authentication_type
preserves the existing configuration
Changes
Benefits
✓ Backward compatible - existing code continues to work
✓ More flexible - update credentials independently of auth type
✓ Better UX - eliminates confusion about method purpose
✓ Safer - no risk of accidentally changing auth type
Testing
Added comprehensive tests for both datasources and workbooks that verify: