Fix #437: add 10 editsite flags for tabcmd Classic parity - #452
Open
jacalata wants to merge 2 commits into
Open
Conversation
tabcmd Classic exposes 12 site-configuration flags on editsite that tabcmd 2 was missing. This adds 10 of them (the 2 skipped items are --metrics-level, which is Tableau-internal VizQL telemetry likely Cloud-N/A pending VizQL team confirmation, and --cache-warmup-threshold, which is server-only). Flags added, with the SiteItem attribute each wires: - --guest-access-enabled / -g -> guest_access_enabled - --cache-warmup / --no-cache-warmup -> cache_warmup_enabled - --subscription-email / -e -> custom_subscription_email + _enabled - --subscription-footer / -f -> custom_subscription_footer + _enabled - --web-extraction-enabled -> web_extraction_enabled - --allow-subscriptions / --no-* -> disable_subscriptions (inverted) - --allow-web-authoring / --no-* -> authoring_enabled - --allow-mobile-snapshots / --no-* -> sheet_image_enabled - --time-zone STRING -> time_zone - --use-default-time-zone -> use_default_time_zone Design notes: - Paired positive/negative boolean flags default to None so an unpassed flag never touches the server setting (critical: a naive default=False would flip cache-warmup / subscriptions / etc. off on every editsite). - --time-zone and --use-default-time-zone are argparse-enforced mutually exclusive. - Flags live in a new set_edit_site_only_args helper (not set_common_site_args) because create_site_command doesn't wire these attributes; adding to the shared helper would advertise unwired flags in `createsite --help`. - --allow-mobile-snapshots maps onto sheet_image_enabled, NOT mobile_biometrics_enabled (that's a separate biometric-auth feature). - --allow-subscriptions is inverted onto disable_subscriptions because that's how the REST API expresses the setting. Two upstream TSC bugs surfaced during implementation but not fixed here: RequestFactory.py lowercases both customSubscriptionEmail and customSubscriptionFooter on the wire, so `user@Domain.com` will be sent as `user@domain.com`. To be filed separately. Tests: 30 new parser tests in tests/parsers/test_parser_edit_site.py cover each flag's arg form, mutual exclusion, and default None behavior. Full parsers suite: 127 passed, 1 skipped (pre-existing). Fixes #437.
The initial commit predated a black run; CI's black check failed on this file (repo pins black 22).
3 tasks
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.
Summary
tabcmd Classic exposes 12 site-configuration flags on
editsitethat tabcmd 2 was missing. This adds 10 of them. The 2 skipped:--metrics-level— Tableau-internal VizQL telemetry, likely Cloud-N/A (pending VizQL team confirmation)--cache-warmup-threshold— server-only, not applicable to CloudFlags added, with the
SiteItemattribute each wires:--guest-access-enabled/-gguest_access_enabled--cache-warmup/--no-cache-warmupcache_warmup_enabled--subscription-email/-ecustom_subscription_email+_enabled--subscription-footer/-fcustom_subscription_footer+_enabled--web-extraction-enabledweb_extraction_enabled--allow-subscriptions/--no-allow-subscriptionsdisable_subscriptions(inverted)--allow-web-authoring/--no-allow-web-authoringauthoring_enabled--allow-mobile-snapshots/--no-allow-mobile-snapshotssheet_image_enabled--time-zone STRINGtime_zone--use-default-time-zoneuse_default_time_zoneDesign notes
Noneso an unpassed flag never touches the server setting. A naivedefault=Falsewould flip cache-warmup, subscriptions, etc. OFF on everyeditsitecall.--time-zoneand--use-default-time-zoneare argparse-enforced mutually exclusive.set_edit_site_only_argshelper (notset_common_site_args) becausecreate_site_commanddoesn't wire these attributes; adding to the shared helper would advertise unwired flags increatesite --help.--allow-mobile-snapshotsmaps ontosheet_image_enabled, NOTmobile_biometrics_enabled(a separate biometric-auth feature).--allow-subscriptionsis inverted ontodisable_subscriptionsbecause that's how the REST API expresses the setting.Upstream TSC bugs discovered (not fixed here)
RequestFactory.pylowercases bothcustomSubscriptionEmailandcustomSubscriptionFooteron the wire, souser@Domain.comwill be sent asuser@domain.com. To be filed separately inserver-client-python.Test plan
tests/parsers/test_parser_edit_site.pycover each flag's arg form, mutual exclusion, anddefault=NonebehaviorCloses #437.
🤖 Generated with Claude Code