Fix W-21968404: Make authentication_type optional in update_connections#1778
Fix W-21968404: Make authentication_type optional in update_connections#1778vchavatapalli wants to merge 2 commits intotableau:developmentfrom
Conversation
|
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. |
ca52d17 to
f0481fc
Compare
jorwoods
left a comment
There was a problem hiding this comment.
A few nits and what may be a collision in pyproject.toml
d3dbd7f to
78e9e81
Compare
|
Thanks for the contribution! Unfortunately we can't verify the commit author(s): ivan.baldinotti@digitecgalaxus.ch <i***@.DG-CH-NBS-22242>. 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, sign the Salesforce Inc. Contributor License Agreement and this Pull Request will be revalidated. |
78e9e81 to
2a6e274
Compare
|
Thanks for the contribution! Unfortunately we can't verify the commit author(s): Chris Shin <c***@t***.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, sign the Salesforce Inc. Contributor License Agreement and this Pull Request will be revalidated. |
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>
- Remove unnecessary default=None from argparse arguments (implicit for optional args) - Add test_update_connections_without_auth_type for datasources - Add test_update_workbook_connections_without_auth_type for workbooks - Tests verify that auth_type is preserved from server response when not specified These tests ensure the optional authentication_type parameter works correctly and that existing authentication types are preserved when updating only credentials without changing auth type. Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
0571bf8 to
54fada7
Compare
|
@jorwoods Fixed your comments. |
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: