Repository navigation
fix: omit site attributes the server version does not support - #1931
ranjithguggilla wants to merge 2 commits into
Conversation
Site creation always sent the settings added for API 3.9, so older Tableau Servers rejected the request. Those attributes, and the ones with a documented version window, are now left out unless the negotiated API version accepts them.
|
Thanks for this, @ranjithguggilla. Omitting attributes an older server rejects is the right idea, and Needs fixing: default
Options: send everything unless the version was detected or set explicitly. Or at minimum emit a Please fix: tests ( The new test covers Question: where do the other thresholds come from? The REST reference for Create Site and Update Site gives versions for Drafted with AI assistance (Claude); reviewed and posted by Jac. |
Server() stores 2.4 as a placeholder, and use_server_version is off by default, so the version gate was dropping settings on every existing caller. Attributes are omitted only after server.version is assigned or use_server_version() detects one. Create and update are both checked at the tier, data-acceleration, and cache-warmup boundaries.
|
Addressed in 9ffe486.
The boundary test is parametrized over The thresholds are linked from the
|
Closes #806
Motivation
Creating a site sent every site setting, including the ones added for Tableau Server 2020.3 (REST API 3.9, TSC #777). Older servers reject a create-site body that contains attributes they do not know. Jac Fitzgerald asked for those attributes to be version-gated the way flow settings already are.
Behavior change
When a
Serveris passed into the site create or update request, and its version was set explicitly or detected withuse_server_version(), attributes are omitted outside the API version that accepts them:dataAccelerationMode: API 3.8 through 3.15cacheWarmupEnabled: also omitted from API 3.19, where it was removedattributeCaptureEnabled: API 3.25 and laterServer()stores"2.4"as a placeholder and leavesuse_server_versionoff. That placeholder is not treated as the server's version, so a defaultServerstill sends the attributes. Assigningserver.versionor callinguse_server_version()turns the gate on. A request built without a server also includes the attributes. Name, content URL, admin mode, storage, subscriptions, and revision history are unchanged.The version sources are in the
_site_version_allowsdocstring.Test plan
test_default_server_version_still_sends_site_attributesusesServer("http://x", False)and checks create and update still sendcommentingEnabled=false.test_site_request_omits_attributes_the_server_version_does_not_haveis parametrized over create and update and checks 2.8, 3.6/3.7, 3.7/3.8, 3.15/3.16, 3.10, 3.19, 3.24, and 3.25.Not covered: creating a site on an old Tableau Server.