Repository navigation
@W-23956009 - Add bridge_refresh_embedded_files opt-in to workbook publish - #1936
Draft
nithish12345678 wants to merge 5 commits into
Conversation
|
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
force-pushed
the
dev/nmuppala/w-23956009-workbook-publish-bridge-refresh-opt-in
branch
from
November 23, 2026 13:58
1aef134 to
26fe125
Compare
nithish12345678
force-pushed
the
dev/nmuppala/w-23956009-workbook-publish-bridge-refresh-opt-in
branch
from
November 25, 2026 11:53
a9fb918 to
128f85e
Compare
…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
force-pushed
the
dev/nmuppala/w-23956009-workbook-publish-bridge-refresh-opt-in
branch
from
November 25, 2026 11:56
128f85e to
aa1a7b1
Compare
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
force-pushed
the
dev/nmuppala/w-23956009-workbook-publish-bridge-refresh-opt-in
branch
from
November 25, 2026 13:05
47b6eda to
abe7622
Compare
This branch has not been deployed
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.
Motivation
The Publish Workbook request accepts a
bridgeRefreshEmbeddedFilesattribute 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:
WorkbookItemgains abridge_refresh_embedded_filesproperty (bool | None, defaultNone). It is also accepted as a constructor keyword argument.workbooks.publishemitsbridgeRefreshEmbeddedFiles="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 isNone, the attribute is not emitted, so existing callers see no payload change.True,FalseorNone. Other values, including"true",1and0, raiseValueError.Compatibility:
assert_at_least_version("3.30", ...)and raisesEndpointUnavailableErroron 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) andtest_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), andtest_publish_without_bridge_refresh_embedded_files_needs_no_version_check.Results:
pytest -k bridge_refreshon 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 publishestest_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 withCreateNew, and deletes the workbook afterwards. Both cases passed on a Tableau Cloud test site. Run it withpytest -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