Skip to content

@W-23956009 - Add bridge_refresh_embedded_files opt-in to workbook publish - #1936

Draft
nithish12345678 wants to merge 5 commits into
tableau:developmentfrom
nithish12345678:dev/nmuppala/w-23956009-workbook-publish-bridge-refresh-opt-in
Draft

nithish12345678 wants to merge 5 commits into
tableau:developmentfrom
nithish12345678:dev/nmuppala/w-23956009-workbook-publish-bridge-refresh-opt-in

Conversation

@nithish12345678

@nithish12345678 nithish12345678 commented Nov 23, 2026 •

Copy link
Copy Markdown

Motivation

The Publish Workbook request accepts a bridgeRefreshEmbeddedFiles attribute on the <workbook> element. Setting it opts the workbook's embedded extracts over file-based connections in to Bridge refresh. TSC has no way to set it, so Python callers (for example REST-based migrations) cannot opt in without hand-rolling the publish request.

Behavior change

Additive, opt-in, backward compatible. For users:

  • WorkbookItem gains a bridge_refresh_embedded_files property (bool | None, default None). It is also accepted as a constructor keyword argument.
  • workbooks.publish emits bridgeRefreshEmbeddedFiles="true" or "false" on the <workbook> element when the property is set. This applies to both single-request and chunked publish, because both use the same request builder. When the property is None, the attribute is not emitted, so existing callers see no payload change.
  • The property is write-only. It is sent on publish and not read back from server responses, because the server does not return it. A workbook fetched and republished does not keep the setting unless the caller sets it again.
  • The setter accepts only True, False or None. Other values, including "true", 1 and 0, raise ValueError.

Compatibility:

  • The attribute is intended for Tableau Cloud sites that use Bridge.
  • The client requires REST API 3.30+. Publishing with the property set calls assert_at_least_version("3.30", ...) and raises EndpointUnavailableError on a lower REST version, before any upload. Publishing without the property needs no version check. The 3.30 minimum is the client's own rule and has not been confirmed against the first server build that accepts the attribute.

Test plan

Unit tests (all mocked, no live server):

  • test/test_workbook_model.py: test_bridge_refresh_embedded_files_accepts_bool_or_none[True|False|None], test_bridge_refresh_embedded_files_can_be_cleared, test_bridge_refresh_embedded_files_rejects_non_boolean[yes|true|1|0].
  • test/request_factory/test_workbook_requests.py: test_generate_xml_bridge_refresh_embedded_files[True|False] (checks the attribute is on the <workbook> element) and test_generate_xml_omits_bridge_refresh_embedded_files_when_unset.
  • test/test_workbook.py: test_publish_sends_bridge_refresh_embedded_files (checks the real publish request body), test_publish_bridge_refresh_embedded_files_requires_rest_3_30 (raises, no HTTP call), and test_publish_without_bridge_refresh_embedded_files_needs_no_version_check.

Results: pytest -k bridge_refresh on the three files above: 14 passed. Full unit suite: 1063 passed, 1 skipped. black and mypy are clean.

Live e2e test: test_e2e/test_publish.py::test_publish_with_bridge_refresh_embedded_files[True|False]. It publishes test_e2e/assets/WorkbookWithExcelExtract.twbx (13 KB, an embedded Excel extract over a file connection) with the attribute set to True and to False. Each run uses a unique workbook name, publishes with CreateNew, and deletes the workbook afterwards. Both cases passed on a Tableau Cloud test site. Run it with pytest -n0 test_e2e/test_publish.py: parallel workers share one personal access token, and a parallel run fails with a 401. The e2e tests are not run in CI.

What the e2e test shows: the server accepts a publish with the attribute set to True and to False. The server does not return the stored value, so the test does not read it back.

Not tested: a real Bridge refresh of the published workbook, behavior on Tableau Server, and behavior on a Cloud build that does not know the attribute.

🤖 Generated with Claude Code

@salesforce-cla

Copy link
Copy Markdown

Thanks for the contribution! Unfortunately we can't verify the commit author(s): Nithish Kumar Raju Muppala <n***@n***.i***.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, sign the Salesforce Inc. Contributor License Agreement and this Pull Request will be revalidated.

@nithish12345678
nithish12345678 force-pushed the dev/nmuppala/w-23956009-workbook-publish-bridge-refresh-opt-in branch from 1aef134 to 26fe125 Compare November 23, 2026 13:58
@nithish12345678
nithish12345678 force-pushed the dev/nmuppala/w-23956009-workbook-publish-bridge-refresh-opt-in branch from a9fb918 to 128f85e Compare November 25, 2026 11:53
nithish12345678 and others added 4 commits November 25, 2026 17:25
…blish

Add a publish-only bridge_refresh_embedded_files attribute to WorkbookItem.
It is sent as bridgeRefreshEmbeddedFiles on the publish request when set and
omitted when None. Publishing with it set requires REST API 3.30 or later and
raises EndpointUnavailableError on older versions. Adds unit tests and a
live-site e2e test.
…lement in tests

The tests only checked that the attribute text appeared somewhere in the
request. Match it inside the opening <workbook ...> tag instead, so a
misplaced attribute fails the test.

Co-Authored-By: Claude Code <noreply@anthropic.com>
@nithish12345678
nithish12345678 force-pushed the dev/nmuppala/w-23956009-workbook-publish-bridge-refresh-opt-in branch from 128f85e to aa1a7b1 Compare November 25, 2026 11:56
Say the property is intended for Tableau Cloud sites that use Bridge,
instead of 'Tableau Cloud only', and drop the note about server
responses.

Co-Authored-By: Claude Code <noreply@anthropic.com>
@nithish12345678
nithish12345678 force-pushed the dev/nmuppala/w-23956009-workbook-publish-bridge-refresh-opt-in branch from 47b6eda to abe7622 Compare November 25, 2026 13:05

This branch has not been deployed

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant