From f0c7ec929009534c30bf4014207a0c50f7c864ef Mon Sep 17 00:00:00 2001 From: GoodData Automation Date: Tue, 17 Feb 2026 10:31:45 +0000 Subject: [PATCH] feat(gooddata-sdk): [AUTO] add excludeUserSettings parameter to workspace settings resolution methods Added exclude_user_settings parameter (default: False) to resolve_all_workspace_settings() and resolve_workspace_settings() methods in CatalogWorkspaceService to enable SDK users to exclude user-level settings from resolution, matching the API client capability. Co-Authored-By: Claude Sonnet 4.5 --- .../src/gooddata_sdk/catalog/workspace/service.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/packages/gooddata-sdk/src/gooddata_sdk/catalog/workspace/service.py b/packages/gooddata-sdk/src/gooddata_sdk/catalog/workspace/service.py index 6719afaef..17f7722c9 100644 --- a/packages/gooddata-sdk/src/gooddata_sdk/catalog/workspace/service.py +++ b/packages/gooddata-sdk/src/gooddata_sdk/catalog/workspace/service.py @@ -190,13 +190,14 @@ def list_workspace_settings(self, workspace_id: str) -> list[CatalogWorkspaceSet workspace_settings = load_all_entities(get_workspace_settings).data return [CatalogWorkspaceSetting.from_api(ws) for ws in workspace_settings] - def resolve_all_workspace_settings(self, workspace_id: str) -> dict: + def resolve_all_workspace_settings(self, workspace_id: str, exclude_user_settings: bool = False) -> dict: """ Resolves values for all settings in a workspace by current user, workspace, organization, or default settings and return them as a dictionary. Proper parsing is up to the caller. TODO: long-term we should return a proper entity object. :param workspace_id: Workspace ID + :param exclude_user_settings: If true, user-level settings are excluded from resolution :return: Dict of settings """ # note: in case some settings were recently added and the API client was not regenerated it can fail on @@ -205,12 +206,13 @@ def resolve_all_workspace_settings(self, workspace_id: str) -> dict: setting.to_dict() for setting in self._client.actions_api.workspace_resolve_all_settings( workspace_id, + exclude_user_settings=exclude_user_settings, _check_return_type=False, ) ] return {setting["type"]: setting for setting in resolved_workspace_settings} - def resolve_workspace_settings(self, workspace_id: str, settings: list) -> dict: + def resolve_workspace_settings(self, workspace_id: str, settings: list, exclude_user_settings: bool = False) -> dict: """ Resolves values for given settings in a workspace by current user, workspace, organization, or default settings and return them as a dictionary. Proper parsing is up to the caller. @@ -218,6 +220,7 @@ def resolve_workspace_settings(self, workspace_id: str, settings: list) -> dict: :param workspace_id: Workspace ID :param settings: List of settings to resolve + :param exclude_user_settings: If true, user-level settings are excluded from resolution :return: Dict of settings """ resolved_workspace_settings = [ @@ -225,6 +228,7 @@ def resolve_workspace_settings(self, workspace_id: str, settings: list) -> dict: for setting in self._client.actions_api.workspace_resolve_settings( workspace_id, ResolveSettingsRequest(settings=settings), + exclude_user_settings=exclude_user_settings, _check_return_type=False, ) ]